emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3] RFC: eldoc-documentation-functions hook


From: Clément Pit--Claudel
Subject: Re: [PATCH v3] RFC: eldoc-documentation-functions hook
Date: Tue, 19 Jul 2016 21:50:31 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0

On 2016-07-19 19:20, Mark Oteiza wrote:
> Ok, then perhaps something to the effect of
> 
> (defun run-single-function-hook (hook)
>   (let ((global-hook (default-value hook))
>         (local-hook (when (local-variable-p hook) (symbol-value hook))))
>     (or (and (functionp local-hook) (funcall local-hook))
>         (and (functionp global-hook) (funcall global-hook)))))
> 
> can instead be used.  Haven't bothered looking to see if this is useful
> outside of eldoc…

Looks nice; does it call global-hook on purpose if local-hook is a function 
that returns false?

Btw, (I hope this isn't a silly suggestion) is there any way to extend add-hook 
and run-hook* to work with both traditional "list of functions" hooks and 
single-function hooks?

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]