# HG changeset patch # User Richard M. Stallman # Date 804396086 0 # Node ID d6d785d9645518a120b5318ea471fa062e96b209 # Parent e4c0623f4a2ea98406e88d40b9e52bec039327d6 (current-fill-column): If fill-column is nil, return nil. diff -r e4c0623f4a2e -r d6d785d96455 lisp/textmodes/fill.el --- a/lisp/textmodes/fill.el Thu Jun 29 03:18:29 1995 +0000 +++ b/lisp/textmodes/fill.el Thu Jun 29 03:21:26 1995 +0000 @@ -72,21 +72,22 @@ The fill column to use for a line is the first column at which the column number equals or exceeds the local fill-column - right-margin difference." (save-excursion - (let* ((here (progn (beginning-of-line) (point))) - (here-col 0) - (eol (progn (end-of-line) (point))) - margin fill-col change col) - ;; Look separately at each region of line with a different right-margin - (while (and (setq margin (get-text-property here 'right-margin) - fill-col (- fill-column (or margin 0)) - change (text-property-not-all here eol - 'right-margin margin)) - (progn (goto-char (1- change)) - (setq col (current-column)) - (< col fill-col))) - (setq here change - here-col col)) - (max here-col fill-col)))) + (if fill-column + (let* ((here (progn (beginning-of-line) (point))) + (here-col 0) + (eol (progn (end-of-line) (point))) + margin fill-col change col) + ;; Look separately at each region of line with a different right-margin. + (while (and (setq margin (get-text-property here 'right-margin) + fill-col (- fill-column (or margin 0)) + change (text-property-not-all + here eol 'right-margin margin)) + (progn (goto-char (1- change)) + (setq col (current-column)) + (< col fill-col))) + (setq here change + here-col col)) + (max here-col fill-col))))) (defun canonically-space-region (beg end) "Remove extra spaces between words in region.