comparison lisp/textmodes/fill.el @ 19419:b03d1adefe72

(fill-individual-paragraphs): Fix handling of adaptive-fill. Call fill-context-prefix, but bind adaptive-fill-first-line-regexp to a null string.
author Richard M. Stallman <rms@gnu.org>
date Mon, 18 Aug 1997 20:08:38 +0000
parents 09398d892cf7
children 495951c8a761
comparison
equal deleted inserted replaced
19418:142900099257 19419:b03d1adefe72
949 ;; Update the fill-prefix on the first line 949 ;; Update the fill-prefix on the first line
950 ;; and whenever the prefix good so far is too long. 950 ;; and whenever the prefix good so far is too long.
951 (if (not (and fill-prefix 951 (if (not (and fill-prefix
952 (looking-at fill-prefix-regexp))) 952 (looking-at fill-prefix-regexp)))
953 (setq fill-prefix 953 (setq fill-prefix
954 (if (and adaptive-fill-mode adaptive-fill-regexp 954 (or (let ((adaptive-fill-first-line-regexp ""))
955 (looking-at adaptive-fill-regexp)) 955 (fill-context-prefix
956 (match-string 0) 956 (point)
957 (buffer-substring 957 (save-excursion (forward-line 2) (point))))
958 (point) 958 (buffer-substring
959 (save-excursion (skip-chars-forward " \t") 959 (point)
960 (point)))) 960 (save-excursion (skip-chars-forward " \t")
961 (point))))
961 fill-prefix-regexp (regexp-quote fill-prefix))) 962 fill-prefix-regexp (regexp-quote fill-prefix)))
962 (forward-line 1) 963 (forward-line 1)
963 (if (bolp) 964 (if (bolp)
964 ;; If forward-line went past a newline, 965 ;; If forward-line went past a newline,
965 ;; move further to the left margin. 966 ;; move further to the left margin.