From: Richard M. Stallman Date: Thu, 19 Jan 1995 04:04:28 +0000 (+0000) Subject: (center-line): Use current-left-margin function, not variable. X-Git-Tag: emacs-19.34~5392 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=11fbdf1f6c98b375f3a300dbda120cfae3bccade;p=emacs.git (center-line): Use current-left-margin function, not variable. --- 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