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

From: Leo Liu <[email-masked]>
Date: Thu, 11 Dec 2014 08:57:33 +0800

On 2014-12-10 14:54 -0500, Stefan Monnier wrote:
> - Make sure all the functions you add use either :override or :around
>   and check that the orig is not nil before calling it.

Yes, I had expected this to work and obviously not so filed this bug.
Otherwise it is not a bad workaround.

Go to a buffer in text mode where the default
eldoc-documentation-function is nil and eval

  (add-function :around (local 'eldoc-documentation-function)
                        (lambda (orig) (or (and orig (funcall orig)) (ignore))))

Move around to get the error.

Leo