diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-01-19 04:04:28 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-01-19 04:04:28 +0000 |
commit | 11fbdf1f6c98b375f3a300dbda120cfae3bccade (patch) | |
tree | 2588bc189bbd445066f21195c72188e40f1b8bb0 /lisp | |
parent | a72632181c9680ef65c1dc5bac1c8a60f34db62c (diff) | |
download | emacs-11fbdf1f6c98b375f3a300dbda120cfae3bccade.tar.gz emacs-11fbdf1f6c98b375f3a300dbda120cfae3bccade.tar.bz2 emacs-11fbdf1f6c98b375f3a300dbda120cfae3bccade.zip |
(center-line): Use current-left-margin function, not variable.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/textmodes/text-mode.el | 9 |
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 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 |