branch: elpa/helm commit 202a70168ff9afb03f6d540fce9aa9424b489d67 Author: Thierry Volpiatto <thie...@posteo.net> Commit: Thierry Volpiatto <thie...@posteo.net>
Mofify helm--run-init-hooks but less restrictive than previous change #2534 --- helm-core.el | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/helm-core.el b/helm-core.el index 67be4243a8..d303b6177d 100644 --- a/helm-core.el +++ b/helm-core.el @@ -3697,15 +3697,10 @@ For RESUME INPUT DEFAULT and SOURCES see `helm'." (defun helm--run-init-hooks (hook sources) "Run after and before init hooks local to source. See :after-init-hook and :before-init-hook in `helm-source'." - (cl-loop with sname = (cl-ecase hook - (before-init-hook "h-before-init-hook") - (after-init-hook "h-after-init-hook")) - with h = (cl-gensym sname) - for s in sources + (cl-loop for s in sources for hv = (assoc-default hook s) - if (and hv (not (symbolp hv))) - do (set h hv) - and do (helm-log-run-hook h) + if (and hv (not (symbolp hv))) ; A lambda. + do (funcall hv) ; Should raise an error with a list of lambdas. else do (helm-log-run-hook hv))) (defun helm-restore-position-on-quit ()