diff options
author | Richard M. Stallman <rms@gnu.org> | 1997-07-27 19:56:21 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1997-07-27 19:56:21 +0000 |
commit | c61005b96d00f639613adcab2cc4aa28ecc60b01 (patch) | |
tree | 3f16a7f405f0cb60fda68de40645dfc17f595c36 /lisp/textmodes/fill.el | |
parent | 487e6fcbdd955bad494e5d576375e4c18b1892d2 (diff) | |
download | emacs-c61005b96d00f639613adcab2cc4aa28ecc60b01.tar.gz |
(fill-context-prefix): Be stricter about
whether first-line prefix is compatible with second-line prefix.
Diffstat (limited to 'lisp/textmodes/fill.el')
-rw-r--r-- | lisp/textmodes/fill.el | 8 |
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." ;; If we get a fill prefix from the second line, ;; make sure it or something compatible is on the first line too. (and second-line-prefix first-line-prefix - (if (or (string-match (regexp-quote second-line-prefix) + (if (or (string-match (concat "\\`" + (regexp-quote second-line-prefix) + "\\(\\'\\|[ \t]\\)") first-line-prefix) - (and (string-match "[ \t]" second-line-prefix) + (and (string-match "\\`[ \t]+\\'" second-line-prefix) (>= (string-width first-line-prefix) (string-width second-line-prefix)))) - second-line-prefix)) + second-line-prefix)) ;; If we get a fill prefix from a one-line paragraph, ;; maybe change it to whitespace, ;; and check that it isn't a paragraph starter. |