SHA256
1
0
forked from pool/emacs
emacs/emacs-24.4-flyspell.patch
2014-10-21 15:54:37 +00:00

42 lines
1.7 KiB
Diff

---
lisp/textmodes/flyspell.el | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
--- lisp/textmodes/flyspell.el
+++ lisp/textmodes/flyspell.el 2014-10-21 14:14:59.191838679 +0000
@@ -286,6 +286,12 @@ If this variable is nil, all regions are
:type 'key-sequence
:group 'flyspell)
+(defvar flyspell-signature-separator
+ (if (boundp 'message-signature-separator)
+ message-signature-separator
+ "^-- $")
+ "*String used to recognize .signatures.")
+
;;*---------------------------------------------------------------------*/
;;* Mode specific options */
;;* ------------------------------------------------------------- */
@@ -309,7 +315,6 @@ property of the major mode name.")
;;*--- mail mode -------------------------------------------------------*/
(put 'mail-mode 'flyspell-mode-predicate 'mail-mode-flyspell-verify)
(put 'message-mode 'flyspell-mode-predicate 'mail-mode-flyspell-verify)
-(defvar message-signature-separator)
(defun mail-mode-flyspell-verify ()
"Function used for `flyspell-generic-check-word-predicate' in Mail mode."
(let ((header-end (save-excursion
@@ -321,11 +326,11 @@ property of the major mode name.")
nil t)
(point)))
(signature-begin
- (if (not (boundp 'message-signature-separator))
+ (if (not (boundp 'flyspell-signature-separator))
(point-max)
(save-excursion
(goto-char (point-max))
- (re-search-backward message-signature-separator nil t)
+ (re-search-backward flyspell-signature-separator nil t)
(point)))))
(cond ((< (point) header-end)
(and (save-excursion (beginning-of-line)