GNU bug report logs -
#19324
25.0.50; add-function and nil
Previous Next
Reported by: Leo Liu <sdl.web <at> gmail.com>
Date: Tue, 9 Dec 2014 04:56:02 UTC
Severity: normal
Found in version 25.0.50
Done: Leo Liu <sdl.web <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> 1. Goto a buffer (e.g. text-mode) with eldoc-documentation-function nil
> 2. (add-function :after-until (local 'eldoc-documentation-function) #'ignore)
> 3. Move around to trigger eldoc error: (void-function nil)
> Looks like the orig function is unconditionally called without checking
> it's a function object.
Indeed. But I don't think advice.el should handle this case.
IOW the way I see it there are 2 ways to fix this problem:
- Change the default value so it's always a function.
- Make sure all the functions you add use either :override or :around
and check that the orig is not nil before calling it.
Obviously, the first option is much better, which is why I've been
changing various foo-function variables so that their default value is
not nil.
Stefan
This bug report was last modified 10 years and 168 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.