summaryrefslogtreecommitdiff
path: root/lisp/indent.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-11-17 22:43:35 +0000
committerRichard M. Stallman <rms@gnu.org>1995-11-17 22:43:35 +0000
commit54505d728cf748f1bb19d2f8c9e33f47184a414a (patch)
treeff4a5d1f3a056235e729f45e48079f1ee95a20f7 /lisp/indent.el
parentc20032c4e8ed922921b2fd903221fe3dfb12b35f (diff)
downloademacs-54505d728cf748f1bb19d2f8c9e33f47184a414a.tar.gz
(move-to-left-margin): Removed left-over code that
made it fail on right-justified and centered text.
Diffstat (limited to 'lisp/indent.el')
-rw-r--r--lisp/indent.el20
1 files changed, 9 insertions, 11 deletions
diff --git a/lisp/indent.el b/lisp/indent.el
index 19786237d6d..08f90e2997f 100644
--- a/lisp/indent.el
+++ b/lisp/indent.el
@@ -110,17 +110,15 @@ 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)
- (let ((lm (current-left-margin)))
- (if (memq (current-justification) '(right center))
- (move-to-column lm)
- (skip-chars-forward " \t"))
- (let ((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))))))
+ (skip-chars-forward " \t")
+ (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)))))
;; This is the default indent-line-function,
;; used in Fundamental Mode, Text Mode, etc.