GNU bug report logs -
#25765
[PATCH] Avoid errors when flyspell-generic-check-word-predicate is a lambda.
Previous Next
Reported by: Hong Xu <hong <at> topbug.net>
Date: Thu, 16 Feb 2017 21:31:01 UTC
Severity: minor
Tags: fixed, patch
Fixed in version 26.1
Done: npostavs <at> users.sourceforge.net
Bug is archived. No further changes may be made.
Full log
Message #11 received at 25765 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On 2017-02-16 Thu 13:36 GMT-0800, Noam Postavsky <npostavs <at> users.sourceforge.net> wrote:
> On Thu, Feb 16, 2017 at 4:30 PM, Hong Xu <hong <at> topbug.net> wrote:
>
> I don't think that's the right fix, rather the fboundp should be
> replaced with functionp.
I agree. I've attached a new version of this patch.
[0001-Avoid-errors-when-flyspell-generic-check-word-predic.patch (text/x-diff, inline)]
From 3011a0c7ce7ce2c505b663743c79915b18fd0404 Mon Sep 17 00:00:00 2001
From: Hong Xu <hong <at> topbug.net>
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. 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..fecfd2fc3ecb 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 (functionp flyspell-generic-check-word-predicate)
+ (not (funcall flyspell-generic-check-word-predicate))))
t
(progn
;; 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)
+ (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.11.0
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 8 years and 95 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.