From a83b66923cfb71bb477d7a1f426f7426f91917da Mon Sep 17 00:00:00 2001 From: Hong Xu Date: Thu, 16 Feb 2017 13:28:56 -0800 Subject: [PATCH] Avoid errors when flyspell-generic-check-word-predicate is a lambda. * flyspell.el (flyspell-auto-correct-word, flyspell-word): Apply functionp instead of fboundp on flyspell-generic-check-word-predicate (Bug#25765). --- 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 3a32b755349..0edf9b1a47e 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el @@ -1111,8 +1111,8 @@ misspelling and skips redundant spell-checking step." (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 (functionp flyspell-generic-check-word-predicate) + (not (funcall flyspell-generic-check-word-predicate)))) t (progn ;; destructure return flyspell-word info list. @@ -1918,7 +1918,7 @@ This command proposes various successive corrections for the current 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) + (functionp flyspell-generic-check-word-predicate) (not (funcall flyspell-generic-check-word-predicate)) (equal (where-is-internal 'flyspell-auto-correct-word nil t) [?\M-\t])) -- 2.39.5