Function: delete-to-left-margin
delete-to-left-margin is a byte-compiled function defined in
indent.el.gz.
Signature
(delete-to-left-margin &optional FROM TO)
Documentation
Remove left margin indentation from a region.
This deletes to the column given by current-left-margin.
In no case will it delete non-whitespace.
Args FROM and TO are optional; default is the whole buffer.
Probably introduced at or before Emacs version 19.29.
Source Code
;; Defined in /usr/src/emacs/lisp/indent.el.gz
(defun delete-to-left-margin (&optional from to)
"Remove left margin indentation from a region.
This deletes to the column given by `current-left-margin'.
In no case will it delete non-whitespace.
Args FROM and TO are optional; default is the whole buffer."
(save-excursion
(goto-char (or to (point-max)))
(setq to (point-marker))
(goto-char (or from (point-min)))
(or (bolp) (forward-line 1))
(while (< (point) to)
(delete-region (point) (progn (move-to-left-margin nil t) (point)))
(forward-line 1))
(move-marker to nil)))