changeset 10466:795d0e6cda6b

(center-line): Use current-left-margin function, not variable.
author Richard M. Stallman <rms@gnu.org>
date Thu, 19 Jan 1995 04:04:28 +0000
parents 00e1546cc687
children b8053ce05ab5
files lisp/textmodes/text-mode.el
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/text-mode.el	Thu Jan 19 04:02:50 1995 +0000
+++ b/lisp/textmodes/text-mode.el	Thu Jan 19 04:04:28 1995 +0000
@@ -147,15 +147,14 @@
 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