changeset 6646:d3e3efcd8461

(ispell-message): Fixed infinite loop on shortened msg.
author Richard M. Stallman <rms@gnu.org>
date Sun, 03 Apr 1994 06:04:35 +0000
parents ba0c1af167e6
children e6611521fb67
files lisp/textmodes/ispell.el
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/ispell.el	Sun Apr 03 02:04:38 1994 +0000
+++ b/lisp/textmodes/ispell.el	Sun Apr 03 06:04:35 1994 +0000
@@ -1756,14 +1756,14 @@
     (beginning-of-buffer)
     (let* ((internal-messagep 
 	    (search-forward mail-header-separator nil t))
-	   (limit
+	   (limit (copy-marker
 	    (cond
 	     ((not ispell-message-text-end) (point-max))
 	     ((char-or-string-p ispell-message-text-end)
 	      (if (re-search-forward ispell-message-text-end nil t)
 		  (match-beginning 0)
 		(point-max)))
-	     (t (min (point-max) (funcall ispell-message-text-end)))))
+	     (t (min (point-max) (funcall ispell-message-text-end))))))
 	   (cite-regexp			;Prefix of inserted text
 	    (cond
 	     ((featurep 'supercite)	; sc 3.0
@@ -1833,7 +1833,8 @@
 			     (match-beginning 0)
 			   limit))))
 	      (ispell-region (point) end)
-	      (goto-char end))))))))
+	      (goto-char end)))))
+    (set-marker limit nil))))
 
 (defun ispell-non-empty-string (string)
   (if (or (not string) (string-equal string ""))