aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1995-11-18 16:46:53 +0000
committerRichard M. Stallman1995-11-18 16:46:53 +0000
commite4b62d7c109baabff4351208334be2f7890a69c2 (patch)
tree63dbe9d232ef3fe28186c616b875d0d04ca91c5c
parent0bcfa3ac91f3aec6e792125d24a05f17ccf0f91c (diff)
downloademacs-e4b62d7c109baabff4351208334be2f7890a69c2.tar.gz
emacs-e4b62d7c109baabff4351208334be2f7890a69c2.zip
(do-auto-fill): Look at 2nd line for fill prefix
even when on the first line. Don't accept non-whitespace prefix from the first line. (do-auto-fill): Ignore the result of fill-context-prefix if it is empty.
-rw-r--r--lisp/simple.el13
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 9d34a467d96..fa442280255 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -2331,10 +2331,15 @@ Setting this variable automatically makes it local to the current buffer.")
2331 ;; Choose a fill-prefix automatically. 2331 ;; Choose a fill-prefix automatically.
2332 (if (and adaptive-fill-mode 2332 (if (and adaptive-fill-mode
2333 (or (null fill-prefix) (string= fill-prefix ""))) 2333 (or (null fill-prefix) (string= fill-prefix "")))
2334 (setq fill-prefix 2334 (let ((prefix
2335 (fill-context-prefix 2335 (fill-context-prefix
2336 (save-excursion (backward-paragraph 1) (point)) 2336 (save-excursion (backward-paragraph 1) (point))
2337 (point)))) 2337 (save-excursion (forward-paragraph 1) (point))
2338 ;; Don't accept a non-whitespace fill prefix
2339 ;; from the first line of a paragraph.
2340 "^[ \t]*$")))
2341 (and prefix (not (equal prefix ""))
2342 (setq fill-prefix prefix))))
2338 2343
2339 (while (and (not give-up) (> (current-column) fc)) 2344 (while (and (not give-up) (> (current-column) fc))
2340 ;; Determine where to split the line. 2345 ;; Determine where to split the line.