Function: move-to-left-margin
move-to-left-margin is an interactive and byte-compiled function
defined in indent.el.gz.
Signature
(move-to-left-margin &optional N FORCE)
Documentation
Move to the left margin of the current line.
With optional argument, move forward N-1 lines first.
The column moved to is the one given by the current-left-margin function.
If the line's indentation appears to be wrong, and this command is called
interactively or with optional argument FORCE, it will be fixed.
Probably introduced at or before Emacs version 19.29.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/indent.el.gz
(defun move-to-left-margin (&optional n force)
"Move to the left margin of the current line.
With optional argument, move forward N-1 lines first.
The column moved to is the one given by the `current-left-margin' function.
If the line's indentation appears to be wrong, and this command is called
interactively or with optional argument FORCE, it will be fixed."
(interactive (list (prefix-numeric-value current-prefix-arg) t))
(beginning-of-line n)
(skip-chars-forward " \t")
(if (minibufferp (current-buffer))
(if (save-excursion (beginning-of-line) (bobp))
(goto-char (minibuffer-prompt-end))
(beginning-of-line))
(let ((lm (current-left-margin))
(cc (current-column)))
(cond ((> cc lm)
(if (> (move-to-column lm force) lm)
;; If lm is in a tab and we are not forcing, move before tab
(backward-char 1)))
((and force (< cc lm))
(indent-to-left-margin))))))