diff options
Diffstat (limited to 'lisp/indent.el')
-rw-r--r-- | lisp/indent.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/indent.el b/lisp/indent.el index 77354444cfa..30ba4ec2b88 100644 --- a/lisp/indent.el +++ b/lisp/indent.el @@ -191,7 +191,12 @@ interactively or with optional argument FORCE, it will be fixed." ;; used in Fundamental Mode, Text Mode, etc. (defun indent-to-left-margin () "Indent current line to the column given by `current-left-margin'." - (indent-line-to (current-left-margin))) + (save-excursion (indent-line-to (current-left-margin))) + ;; If we are within the indentation, move past it. + (when (save-excursion + (skip-chars-backward " \t") + (bolp)) + (skip-chars-forward " \t"))) (defun delete-to-left-margin (&optional from to) "Remove left margin indentation from a region. |