aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-07-04 09:44:09 +0000
committerRichard M. Stallman1998-07-04 09:44:09 +0000
commitc22139944529fcc0f6010c9dc463370a281fdf60 (patch)
tree5af8fa1fe020a8464a0d40740005d7ce52ec93c6
parent031bf182c0e3c9f415c5e2de25724173bf115c26 (diff)
downloademacs-c22139944529fcc0f6010c9dc463370a281fdf60.tar.gz
emacs-c22139944529fcc0f6010c9dc463370a281fdf60.zip
(fill-individual-paragraphs): If JUST-ONE-LINE-PREFIX matches
TWO-LINES-PREFIX except with longer whitespace, treat that as a match even is spaces are replaced with a tab.
-rw-r--r--lisp/textmodes/fill.el15
1 files changed, 13 insertions, 2 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index 4f0d16ffc68..abb04746d58 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -1027,7 +1027,8 @@ MAIL-FLAG for a mail message, i. e. don't fill header lines."
1027 ;; use that. 1027 ;; use that.
1028 (or (let ((adaptive-fill-first-line-regexp "") 1028 (or (let ((adaptive-fill-first-line-regexp "")
1029 just-one-line-prefix 1029 just-one-line-prefix
1030 two-lines-prefix) 1030 two-lines-prefix
1031 adjusted-two-lines-prefix)
1031 (setq just-one-line-prefix 1032 (setq just-one-line-prefix
1032 (fill-context-prefix 1033 (fill-context-prefix
1033 (point) 1034 (point)
@@ -1038,10 +1039,17 @@ MAIL-FLAG for a mail message, i. e. don't fill header lines."
1038 (point) 1039 (point)
1039 (save-excursion (forward-line 2) 1040 (save-excursion (forward-line 2)
1040 (point)))) 1041 (point))))
1042 (setq adjusted-two-lines-prefix
1043 (substring two-lines-prefix 0
1044 (string-match "[ \t]*\\'"
1045 two-lines-prefix)))
1046 ;; See if JUST-ONE-LINE-PREFIX
1047 ;; is the same as TWO-LINES-PREFIX
1048 ;; except perhaps with longer whitespace.
1041 (if (and just-one-line-prefix 1049 (if (and just-one-line-prefix
1042 two-lines-prefix 1050 two-lines-prefix
1043 (string-match (concat "\\`" 1051 (string-match (concat "\\`"
1044 (regexp-quote two-lines-prefix) 1052 (regexp-quote adjusted-two-lines-prefix)
1045 "[ \t]*\\'") 1053 "[ \t]*\\'")
1046 just-one-line-prefix)) 1054 just-one-line-prefix))
1047 two-lines-prefix 1055 two-lines-prefix
@@ -1080,4 +1088,7 @@ MAIL-FLAG for a mail message, i. e. don't fill header lines."
1080 (fill-region-as-paragraph start (point) justify) 1088 (fill-region-as-paragraph start (point) justify)
1081 (or had-newline (delete-char -1)))))))) 1089 (or had-newline (delete-char -1))))))))
1082 1090
1091(defun fill-strip-trailing-space (string)
1092))
1093
1083;;; fill.el ends here 1094;;; fill.el ends here