[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#25765: [PATCH] Avoid errors when flyspell-generic-check-word-predica

From: Hong Xu
Subject: bug#25765: [PATCH] Avoid errors when flyspell-generic-check-word-predicate is a lambda.
Date: Thu, 16 Feb 2017 13:30:26 -0800

        * flyspell.el (flyspell-auto-correct-word, flyspell-word): Quote
        flyspell-generic-check-word-predicate when applying fboundp on
        it. This avoids (wrong-type-argument symbolp) when
        flyspell-generic-check-word-predicate is a lambda.
 lisp/textmodes/flyspell.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index f7683d967905..f05624b55194 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -1097,8 +1097,8 @@ flyspell-word
            (flyspell-word (flyspell-get-word following))
            start end poss word ispell-filter)
       (if (or (eq flyspell-word nil)
-             (and (fboundp flyspell-generic-check-word-predicate)
-                  (not (funcall flyspell-generic-check-word-predicate))))
+              (and (fboundp 'flyspell-generic-check-word-predicate)
+                   (not (funcall flyspell-generic-check-word-predicate))))
          ;; destructure return flyspell-word info list.
@@ -1914,7 +1914,7 @@ flyspell-auto-correct-word
   ;; invoke the original binding of M-TAB, if that was recorded.
   (if (and (local-variable-p 'flyspell--prev-meta-tab-binding)
            (commandp flyspell--prev-meta-tab-binding t)
-           (fboundp flyspell-generic-check-word-predicate)
+           (fboundp 'flyspell-generic-check-word-predicate)
            (not (funcall flyspell-generic-check-word-predicate))
            (equal (where-is-internal 'flyspell-auto-correct-word nil t)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]