aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-07-27 19:56:21 +0000
committerRichard M. Stallman1997-07-27 19:56:21 +0000
commitc61005b96d00f639613adcab2cc4aa28ecc60b01 (patch)
tree3f16a7f405f0cb60fda68de40645dfc17f595c36
parent487e6fcbdd955bad494e5d576375e4c18b1892d2 (diff)
downloademacs-c61005b96d00f639613adcab2cc4aa28ecc60b01.tar.gz
emacs-c61005b96d00f639613adcab2cc4aa28ecc60b01.zip
(fill-context-prefix): Be stricter about
whether first-line prefix is compatible with second-line prefix.
-rw-r--r--lisp/textmodes/fill.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index e4ebd2a9030..d73da1105f6 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -210,12 +210,14 @@ act as a paragraph-separator."
210 ;; If we get a fill prefix from the second line, 210 ;; If we get a fill prefix from the second line,
211 ;; make sure it or something compatible is on the first line too. 211 ;; make sure it or something compatible is on the first line too.
212 (and second-line-prefix first-line-prefix 212 (and second-line-prefix first-line-prefix
213 (if (or (string-match (regexp-quote second-line-prefix) 213 (if (or (string-match (concat "\\`"
214 (regexp-quote second-line-prefix)
215 "\\(\\'\\|[ \t]\\)")
214 first-line-prefix) 216 first-line-prefix)
215 (and (string-match "[ \t]" second-line-prefix) 217 (and (string-match "\\`[ \t]+\\'" second-line-prefix)
216 (>= (string-width first-line-prefix) 218 (>= (string-width first-line-prefix)
217 (string-width second-line-prefix)))) 219 (string-width second-line-prefix))))
218 second-line-prefix)) 220 second-line-prefix))
219 ;; If we get a fill prefix from a one-line paragraph, 221 ;; If we get a fill prefix from a one-line paragraph,
220 ;; maybe change it to whitespace, 222 ;; maybe change it to whitespace,
221 ;; and check that it isn't a paragraph starter. 223 ;; and check that it isn't a paragraph starter.