summaryrefslogtreecommitdiff
path: root/lisp/indent.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-10-27 09:07:17 +0000
committerMiles Bader <miles@gnu.org>2007-10-27 09:07:17 +0000
commitfdc9061358d3654e14bfc1419632e1d6c6c5c13e (patch)
tree00f5484d576513deddd938a9a277d0db860b9a5b /lisp/indent.el
parentebe4c71027cd6ec8583631e895e7fdd3decfc099 (diff)
parentb6ff295c434269fe824ec47cbfc87c6a02dfd94d (diff)
downloademacs-fdc9061358d3654e14bfc1419632e1d6c6c5c13e.tar.gz
Merge from emacs--rel--22
Patches applied: * emacs--rel--22 (patch 131-137) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 261-262) - Update from CVS Revision: emacs@sv.gnu.org/emacs--devo--0--patch-908
Diffstat (limited to 'lisp/indent.el')
-rw-r--r--lisp/indent.el7
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.