|
From: | Stefan Monnier |
Subject: | bug#19338: [PATCH 1/3] eldoc: use default eldoc function if local one gives no results |
Date: | Wed, 10 Dec 2014 15:05:26 -0500 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> - (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
[Prev in Thread] | Current Thread | [Next in Thread] |