branch: externals/embark commit 5b34b2b60370cea5ad9da5931856667a6fae0501 Author: Omar Antolín <omar.anto...@gmail.com> Commit: Omar Antolín <omar.anto...@gmail.com>
Don't use lambda as a hook, define a function instead The main advantage is the more specific docstring. --- embark.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/embark.el b/embark.el index 3a1d918..4e0025e 100644 --- a/embark.el +++ b/embark.el @@ -389,7 +389,7 @@ replaced by the single `embark-allow-edit-actions' variable." '((async-shell-command embark--shell-prep) (shell-command embark--shell-prep) (pp-eval-expression embark--eval-prep) - (package-delete (lambda (&rest _) (minibuffer-force-complete)))) + (package-delete embark--force-complete)) "Alist associating commands with post-injection setup hooks. For commands appearing as keys in this alist, run the corresponding value as a setup hook after injecting the target @@ -3304,6 +3304,10 @@ and leaves the point to the left of it." (insert " " (shell-quote-wildcard-pattern contents)) (goto-char (minibuffer-prompt-end)))) +(defun embark--force-complete (&rest _) + "Select first minibuffer completion candidate matching target." + (minibuffer-force-complete)) + (defun embark--eval-prep (&rest _) "If target is: a variable, skip edit; a function, wrap in parens." (if (not (fboundp (intern-soft (minibuffer-contents))))