changeset 18229:d8db4d037677

(fill-context-prefix): Don't crash if RESULT is nil when AT-SECOND is t.
author Richard M. Stallman <rms@gnu.org>
date Thu, 12 Jun 1997 18:42:28 +0000
parents 81fa1f5547eb
children 2f1f942f25ca
files lisp/textmodes/fill.el
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/fill.el	Thu Jun 12 05:22:15 1997 +0000
+++ b/lisp/textmodes/fill.el	Thu Jun 12 18:42:28 1997 +0000
@@ -200,10 +200,11 @@
 	(if at-second
 	    ;; If we get a fill prefix from the second line,
 	    ;; make sure it's on the first line too.
-	    (save-excursion
-	      (forward-line -1)
-	      (if (looking-at (regexp-quote result))
-		  result))
+	    (and result
+		 (save-excursion
+		   (forward-line -1)
+		   (if (looking-at (regexp-quote result))
+		       result)))
 	  ;; 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.