changeset 36610:0598c5e629d2

(fill-context-prefix): Allow first-line-prefix to match paragraph-start.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 07 Mar 2001 00:12:59 +0000
parents 8e1755c3dd2b
children c0360458748f
files lisp/textmodes/fill.el
diffstat 1 files changed, 8 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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)