aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-06-12 18:42:28 +0000
committerRichard M. Stallman1997-06-12 18:42:28 +0000
commit536d3fc556cb4c158f60cda48d2679b1e6d6313e (patch)
treec83f011c7b0b67b60e06059454403a298ab92166
parent48cd9fe9ec7989256bd7fa9ff715b40d0bbf4a3b (diff)
downloademacs-536d3fc556cb4c158f60cda48d2679b1e6d6313e.tar.gz
emacs-536d3fc556cb4c158f60cda48d2679b1e6d6313e.zip
(fill-context-prefix): Don't crash if RESULT is nil when AT-SECOND is t.
-rw-r--r--lisp/textmodes/fill.el9
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/textmodes/fill.el b/lisp/textmodes/fill.el
index 552bd4fb68c..c3628be99f8 100644
--- a/lisp/textmodes/fill.el
+++ b/lisp/textmodes/fill.el
@@ -200,10 +200,11 @@ act as a paragraph-separator."
200 (if at-second 200 (if at-second
201 ;; If we get a fill prefix from the second line, 201 ;; If we get a fill prefix from the second line,
202 ;; make sure it's on the first line too. 202 ;; make sure it's on the first line too.
203 (save-excursion 203 (and result
204 (forward-line -1) 204 (save-excursion
205 (if (looking-at (regexp-quote result)) 205 (forward-line -1)
206 result)) 206 (if (looking-at (regexp-quote result))
207 result)))
207 ;; If we get a fill prefix from a one-line paragraph, 208 ;; If we get a fill prefix from a one-line paragraph,
208 ;; maybe change it to whitespace, 209 ;; maybe change it to whitespace,
209 ;; and check that it isn't a paragraph starter. 210 ;; and check that it isn't a paragraph starter.