aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman2007-10-24 08:10:57 +0000
committerRichard M. Stallman2007-10-24 08:10:57 +0000
commitcaadec436df8b452370bd24187ef56b90bf55918 (patch)
treee44f017667b97a41c0f648cad836a78d5f3282fd /lisp
parent8c89fb87b43d3b95101e257681a42b498c85e1a4 (diff)
downloademacs-caadec436df8b452370bd24187ef56b90bf55918.tar.gz
emacs-caadec436df8b452370bd24187ef56b90bf55918.zip
(indent-to-left-margin): If point's in the indentation,
move to the end of the indentation.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/indent.el7
1 files changed, 6 insertions, 1 deletions
diff --git a/lisp/indent.el b/lisp/indent.el
index a005abebee5..3c51b4f37a8 100644
--- a/lisp/indent.el
+++ b/lisp/indent.el
@@ -184,7 +184,12 @@ interactively or with optional argument FORCE, it will be fixed."
184;; used in Fundamental Mode, Text Mode, etc. 184;; used in Fundamental Mode, Text Mode, etc.
185(defun indent-to-left-margin () 185(defun indent-to-left-margin ()
186 "Indent current line to the column given by `current-left-margin'." 186 "Indent current line to the column given by `current-left-margin'."
187 (indent-line-to (current-left-margin))) 187 (save-excursion (indent-line-to (current-left-margin)))
188 ;; If we are within the indentation, move past it.
189 (when (save-excursion
190 (skip-chars-backward " \t")
191 (bolp))
192 (skip-chars-forward " \t")))
188 193
189(defun delete-to-left-margin (&optional from to) 194(defun delete-to-left-margin (&optional from to)
190 "Remove left margin indentation from a region. 195 "Remove left margin indentation from a region.