diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2001-03-07 00:12:59 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2001-03-07 00:12:59 +0000 |
commit | 3212cc84cdc50b300a0f4648f8f2a1c831c506a9 (patch) | |
tree | 520f608ccc0197d4fff5b6701a402f1e6c1ab2b9 /lisp/textmodes | |
parent | 4afa094d3a93dd3e6544f571e0c4671dd19b04cc (diff) | |
download | emacs-3212cc84cdc50b300a0f4648f8f2a1c831c506a9.tar.gz |
(fill-context-prefix): Allow first-line-prefix to match paragraph-start.
Diffstat (limited to 'lisp/textmodes')
-rw-r--r-- | lisp/textmodes/fill.el | 12 |
1 files changed, 8 insertions, 4 deletions
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) |