diff options
| -rw-r--r-- | lisp/simple.el | 13 |
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. |