Subject: Re: bug#19338: [PATCH 1/3] eldoc: use default eldoc function if local one gives no results

From: Stefan Monnier <[email-masked]>
Date: Wed, 10 Dec 2014 15:05:26 -0500

> -	 (eldoc-message (funcall eldoc-documentation-function)))))
> +         (eldoc-message
> +          (or (funcall eldoc-documentation-function)
> +              ;; If local documentation function did not return anything, try
> +              ;; global one.
> +              (when (local-variable-p 'eldoc-documentation-function)
> +                (let ((func (default-value 'eldoc-documentation-function)))
> +                  (when func (funcall func)))))))))

We don't need that: if the major-mode wants that to happen, it can do
that with an appropriate call to add-function, which will take care of
delegating to the global value if/when applicable.

This works very much like the add-hook's `local' argument.

        Stefan