aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHong Xu2017-02-16 13:28:56 -0800
committerNoam Postavsky2017-02-17 21:50:46 -0500
commita83b66923cfb71bb477d7a1f426f7426f91917da (patch)
tree4206b7de3a68424d0c71e868353181cfdf024819
parent22b2207471807bda86534b4faf1a29b3a6447536 (diff)
downloademacs-a83b66923cfb71bb477d7a1f426f7426f91917da.tar.gz
emacs-a83b66923cfb71bb477d7a1f426f7426f91917da.zip
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).
-rw-r--r--lisp/textmodes/flyspell.el6
1 files 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."
1111 (flyspell-word (flyspell-get-word following)) 1111 (flyspell-word (flyspell-get-word following))
1112 start end poss word ispell-filter) 1112 start end poss word ispell-filter)
1113 (if (or (eq flyspell-word nil) 1113 (if (or (eq flyspell-word nil)
1114 (and (fboundp flyspell-generic-check-word-predicate) 1114 (and (functionp flyspell-generic-check-word-predicate)
1115 (not (funcall flyspell-generic-check-word-predicate)))) 1115 (not (funcall flyspell-generic-check-word-predicate))))
1116 t 1116 t
1117 (progn 1117 (progn
1118 ;; destructure return flyspell-word info list. 1118 ;; destructure return flyspell-word info list.
@@ -1918,7 +1918,7 @@ This command proposes various successive corrections for the current word."
1918 ;; invoke the original binding of M-TAB, if that was recorded. 1918 ;; invoke the original binding of M-TAB, if that was recorded.
1919 (if (and (local-variable-p 'flyspell--prev-meta-tab-binding) 1919 (if (and (local-variable-p 'flyspell--prev-meta-tab-binding)
1920 (commandp flyspell--prev-meta-tab-binding t) 1920 (commandp flyspell--prev-meta-tab-binding t)
1921 (fboundp flyspell-generic-check-word-predicate) 1921 (functionp flyspell-generic-check-word-predicate)
1922 (not (funcall flyspell-generic-check-word-predicate)) 1922 (not (funcall flyspell-generic-check-word-predicate))
1923 (equal (where-is-internal 'flyspell-auto-correct-word nil t) 1923 (equal (where-is-internal 'flyspell-auto-correct-word nil t)
1924 [?\M-\t])) 1924 [?\M-\t]))