]> git.eshelyaron.com Git - emacs.git/commitdiff
(center-line): Use current-left-margin function, not variable.
authorRichard M. Stallman <rms@gnu.org>
Thu, 19 Jan 1995 04:04:28 +0000 (04:04 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 19 Jan 1995 04:04:28 +0000 (04:04 +0000)
lisp/textmodes/text-mode.el

index 0a72141961950ab59180b94c37e8a5e090705ae1..404302c431fe1eac182651346bc59326a0a2ecce 100644 (file)
@@ -147,15 +147,14 @@ This means adjusting the indentation so that it equals
 the distance between the end of the text and `fill-column'."
   (interactive)
   (save-excursion
-    (let (line-length)
+    (let ((lm (current-left-margin))
+         line-length)
       (beginning-of-line)
       (delete-horizontal-space)
       (end-of-line)
       (delete-horizontal-space)
       (setq line-length (current-column))
-      (beginning-of-line)
-      (indent-to 
-       (+ left-margin 
-          (/ (- fill-column left-margin line-length) 2))))))
+      (indent-line-to 
+       (+ lm (/ (- (fill-column) lm line-length) 2))))))
 
 ;;; text-mode.el ends here