comparison lisp/textmodes/fill.el @ 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 a2f48aef1741
children 4538edcbe94e
comparison
equal deleted inserted replaced
36609:8e1755c3dd2b 36610:0598c5e629d2
223 second-line-prefix 223 second-line-prefix
224 start) 224 start)
225 (move-to-left-margin) 225 (move-to-left-margin)
226 (setq start (point)) 226 (setq start (point))
227 (setq first-line-prefix 227 (setq first-line-prefix
228 (cond ((looking-at paragraph-start) nil) 228 ;; We don't need to consider `paragraph-start' here since it
229 ;; will be explicitly checked later on.
230 ;; Also setting first-line-prefix to nil prevents
231 ;; second-line-prefix from being used.
232 (cond ;; ((looking-at paragraph-start) nil)
229 ((and adaptive-fill-regexp (looking-at adaptive-fill-regexp)) 233 ((and adaptive-fill-regexp (looking-at adaptive-fill-regexp))
230 (buffer-substring-no-properties start (match-end 0))) 234 (buffer-substring-no-properties start (match-end 0)))
231 (adaptive-fill-function (funcall adaptive-fill-function)))) 235 (adaptive-fill-function (funcall adaptive-fill-function))))
232 (forward-line 1) 236 (forward-line 1)
233 (if (>= (point) to) 237 (if (>= (point) to)
754 (unless (memq justify '(t nil none full center left right)) 758 (unless (memq justify '(t nil none full center left right))
755 (setq justify 'full)) 759 (setq justify 'full))
756 (let (end beg fill-pfx) 760 (let (end beg fill-pfx)
757 (save-restriction 761 (save-restriction
758 (goto-char (max from to)) 762 (goto-char (max from to))
759 (if to-eop 763 (when to-eop
760 (progn (skip-chars-backward "\n") 764 (skip-chars-backward "\n")
761 (forward-paragraph))) 765 (forward-paragraph))
762 (setq end (point)) 766 (setq end (point))
763 (goto-char (setq beg (min from to))) 767 (goto-char (setq beg (min from to)))
764 (beginning-of-line) 768 (beginning-of-line)
765 (narrow-to-region (point) end) 769 (narrow-to-region (point) end)
766 (while (not (eobp)) 770 (while (not (eobp))