# HG changeset patch # User Stefan Monnier # Date 983923979 0 # Node ID 0598c5e629d2983185cf526cf75928704f7c5da0 # Parent 8e1755c3dd2ba6172fffdf9bed1c6c726c55bcbd (fill-context-prefix): Allow first-line-prefix to match paragraph-start. diff -r 8e1755c3dd2b -r 0598c5e629d2 lisp/textmodes/fill.el --- a/lisp/textmodes/fill.el Wed Mar 07 00:03:50 2001 +0000 +++ b/lisp/textmodes/fill.el Wed Mar 07 00:12:59 2001 +0000 @@ -225,7 +225,11 @@ (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 @@ (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)