Subject: bug#19324: 25.0.50; add-function and nil

From: Stefan Monnier <[email-masked]>
Date: Wed, 10 Dec 2014 14:54:42 -0500

> 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