comparison lisp/textmodes/=ispell4.el @ 4929:2b5e416494d1

(ispell-message): If gnus, but no mail-yank-prefix, use ispell-message-cite-regexp. Turn off case-fold-search for the searching and matching in this function.
author Richard M. Stallman <rms@gnu.org>
date Mon, 08 Nov 1993 12:47:05 +0000
parents 24bb9fff22ce
children 581f2c0b75f2
comparison
equal deleted inserted replaced
4928:a53f01945d43 4929:2b5e416494d1
944 Or you can bind the function to C-c i in gnus or mail with: 944 Or you can bind the function to C-c i in gnus or mail with:
945 (setq mail-mode-hook (setq news-reply-mode-hook 945 (setq mail-mode-hook (setq news-reply-mode-hook
946 (function (lambda () (local-set-key \"\\C-ci\" 'ispell-message)))))" 946 (function (lambda () (local-set-key \"\\C-ci\" 'ispell-message)))))"
947 (interactive) 947 (interactive)
948 (save-excursion 948 (save-excursion
949 (let (non-internal-message) 949 (let (non-internal-message
950 (old-case-fold-search case-fold-search)
951 (case-fold-search nil))
950 (goto-char (point-min)) 952 (goto-char (point-min))
951 ;; Don't spell-check the headers. 953 ;; Don't spell-check the headers.
952 (if (search-forward mail-header-separator nil t) 954 (if (search-forward mail-header-separator nil t)
953 ;; Move to first body line. 955 ;; Move to first body line.
954 (forward-line 1) 956 (forward-line 1)
969 (concat "In [a-zA-Z.]+ you write:" "\\|" 971 (concat "In [a-zA-Z.]+ you write:" "\\|"
970 "In <[^,;&+=]+> [^,;&+=]+ writes:" "\\|" 972 "In <[^,;&+=]+> [^,;&+=]+ writes:" "\\|"
971 " *> *")) 973 " *> *"))
972 ((equal major-mode 'news-reply-mode) ;Gnus 974 ((equal major-mode 'news-reply-mode) ;Gnus
973 (concat "In article <" "\\|" 975 (concat "In article <" "\\|"
974 (ispell-non-empty-string mail-yank-prefix) 976 (if mail-yank-prefix
975 )) 977 (ispell-non-empty-string mail-yank-prefix)
978 ispell-message-cite-regexp)))
976 ((boundp 'vm-included-text-prefix) ; VM mail message 979 ((boundp 'vm-included-text-prefix) ; VM mail message
977 (concat "[^,;&+=]+ writes:" "\\|" 980 (concat "[^,;&+=]+ writes:" "\\|"
978 (ispell-non-empty-string vm-included-text-prefix) 981 (ispell-non-empty-string vm-included-text-prefix)
979 )) 982 ))
980 ((boundp 'mh-ins-buf-prefix) ; mh mail message 983 ((boundp 'mh-ins-buf-prefix) ; mh mail message
988 ;; Skip across text cited from other messages. 991 ;; Skip across text cited from other messages.
989 (while (and (looking-at (concat "^[ \t]*$\\|" cite-regexp)) 992 (while (and (looking-at (concat "^[ \t]*$\\|" cite-regexp))
990 (not (eobp))) 993 (not (eobp)))
991 (forward-line 1)) 994 (forward-line 1))
992 (if (not (eobp)) 995 (if (not (eobp))
993 ;; Fill the next batch of lines that *aren't* cited. 996 ;; Check the next batch of lines that *aren't* cited.
994 (let ((start (point))) 997 (let ((start (point)))
995 (if (re-search-forward 998 (if (re-search-forward
996 (concat "^\\(" cite-regexp "\\)") nil 'end) 999 (concat "^\\(" cite-regexp "\\)") nil 'end)
997 (beginning-of-line)) 1000 (beginning-of-line))
998 (beginning-of-line) 1001 (beginning-of-line)
999 (save-excursion 1002 (let ((case-fold-search old-case-fold-search))
1000 (setq continue (ispell-region (- start 1) (point))))))))))) 1003 (save-excursion
1004 (setq continue (ispell-region (- start 1) (point))))))))))))
1001 1005
1002 (provide 'ispell) 1006 (provide 'ispell)
1003 1007
1004 ;;; ispell.el ends here 1008 ;;; ispell.el ends here