From: Stefan Monnier Date: Wed, 7 Mar 2001 00:12:59 +0000 (+0000) Subject: (fill-context-prefix): Allow first-line-prefix to match paragraph-start. X-Git-Tag: emacs-pretest-21.0.100~164 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3212cc84cdc50b300a0f4648f8f2a1c831c506a9;p=emacs.git (fill-context-prefix): Allow first-line-prefix to match paragraph-start. --- diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el index 17162ceac8a..61f1ca88658 100644 --- a/lisp/textmodes/fill.el +++ b/lisp/textmodes/fill.el @@ -225,7 +225,11 @@ act as a paragraph-separator." (move-to-left-margin) (setq start (point)) (setq first-line-prefix - (cond ((looking-at paragraph-start) nil) + ;; We don't need to consider `paragraph-start' here since it + ;; will be explicitly checked later on. + ;; Also setting first-line-prefix to nil prevents + ;; second-line-prefix from being used. + (cond ;; ((looking-at paragraph-start) nil) ((and adaptive-fill-regexp (looking-at adaptive-fill-regexp)) (buffer-substring-no-properties start (match-end 0))) (adaptive-fill-function (funcall adaptive-fill-function)))) @@ -756,9 +760,9 @@ space does not end a sentence, so don't break a line there." (let (end beg fill-pfx) (save-restriction (goto-char (max from to)) - (if to-eop - (progn (skip-chars-backward "\n") - (forward-paragraph))) + (when to-eop + (skip-chars-backward "\n") + (forward-paragraph)) (setq end (point)) (goto-char (setq beg (min from to))) (beginning-of-line)