[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19324: 25.0.50; add-function and nil
From: |
Stefan Monnier |
Subject: |
bug#19324: 25.0.50; add-function and nil |
Date: |
Wed, 10 Dec 2014 14:54:42 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> 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
- bug#19324: 25.0.50; add-function and nil, Leo Liu, 2014/12/08
- bug#19324: 25.0.50; add-function and nil,
Stefan Monnier <=
- bug#19324: 25.0.50; add-function and nil, Leo Liu, 2014/12/10
- bug#19324: 25.0.50; add-function and nil, Stefan Monnier, 2014/12/10
- bug#19324: 25.0.50; add-function and nil, Leo Liu, 2014/12/10
- bug#19324: 25.0.50; add-function and nil, Stefan Monnier, 2014/12/11
- bug#19324: 25.0.50; add-function and nil, Leo Liu, 2014/12/11
- bug#19324: 25.0.50; add-function and nil, Stefan Monnier, 2014/12/11
- bug#19324: 25.0.50; add-function and nil, Leo Liu, 2014/12/11