diff options
| author | Richard M. Stallman | 2007-10-24 08:10:57 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2007-10-24 08:10:57 +0000 |
| commit | caadec436df8b452370bd24187ef56b90bf55918 (patch) | |
| tree | e44f017667b97a41c0f648cad836a78d5f3282fd /lisp | |
| parent | 8c89fb87b43d3b95101e257681a42b498c85e1a4 (diff) | |
| download | emacs-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.el | 7 |
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. |