aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-01-19 04:04:28 +0000
committerRichard M. Stallman1995-01-19 04:04:28 +0000
commit11fbdf1f6c98b375f3a300dbda120cfae3bccade (patch)
tree2588bc189bbd445066f21195c72188e40f1b8bb0
parenta72632181c9680ef65c1dc5bac1c8a60f34db62c (diff)
downloademacs-11fbdf1f6c98b375f3a300dbda120cfae3bccade.tar.gz
emacs-11fbdf1f6c98b375f3a300dbda120cfae3bccade.zip
(center-line): Use current-left-margin function, not variable.
-rw-r--r--lisp/textmodes/text-mode.el9
1 files changed, 4 insertions, 5 deletions
diff --git a/lisp/textmodes/text-mode.el b/lisp/textmodes/text-mode.el
index 0a721419619..404302c431f 100644
--- a/lisp/textmodes/text-mode.el
+++ b/lisp/textmodes/text-mode.el
@@ -147,15 +147,14 @@ This means adjusting the indentation so that it equals
147the distance between the end of the text and `fill-column'." 147the distance between the end of the text and `fill-column'."
148 (interactive) 148 (interactive)
149 (save-excursion 149 (save-excursion
150 (let (line-length) 150 (let ((lm (current-left-margin))
151 line-length)
151 (beginning-of-line) 152 (beginning-of-line)
152 (delete-horizontal-space) 153 (delete-horizontal-space)
153 (end-of-line) 154 (end-of-line)
154 (delete-horizontal-space) 155 (delete-horizontal-space)
155 (setq line-length (current-column)) 156 (setq line-length (current-column))
156 (beginning-of-line) 157 (indent-line-to
157 (indent-to 158 (+ lm (/ (- (fill-column) lm line-length) 2))))))
158 (+ left-margin
159 (/ (- fill-column left-margin line-length) 2))))))
160 159
161;;; text-mode.el ends here 160;;; text-mode.el ends here