]> git.eshelyaron.com Git - emacs.git/commitdiff
(ispell-message): Handle cited messages.
authorRichard M. Stallman <rms@gnu.org>
Fri, 24 Sep 1993 20:02:03 +0000 (20:02 +0000)
committerRichard M. Stallman <rms@gnu.org>
Fri, 24 Sep 1993 20:02:03 +0000 (20:02 +0000)
lisp/textmodes/ispell4.el

index 9d37d0a124672d21892ca513a7afba0841b74544..7ffbb8caf28a55edd02e8402bf6e97a92564f1bb 100644 (file)
@@ -612,8 +612,21 @@ L lookup; Q quit\n")
   (interactive)
   (save-excursion
     (beginning-of-buffer)
+    ;; Don't spell-check the headers.
     (search-forward mail-header-separator nil t)
-    (ispell (current-buffer) (point))))
+    (while (not (eobp))
+      ;; Skip across text cited from other messages.
+      (while (and (looking-at (concat "^[ \t]*$\\|"
+                                     ispell-message-cite-regexp))
+                 (not (eobp)))
+       (forward-line 1))
+      (if (not (eobp))
+         ;; Fill the next batch of lines that *aren't* cited.
+         (let ((start (point)))
+           (re-search-forward
+            (concat "^\\(" ispell-message-cite-regexp "\\)") nil 'end)
+           (beginning-of-line)
+           (save-excursion (ispell-region (- start 1) (point))))))))
 
 (provide 'ispell)