branch: externals/embark commit af471d095a2be0c725f8a5e208b9a023b080d9de Merge: 528a383e5d f29e08a2a8 Author: Omar Antolín <omar.anto...@gmail.com> Commit: Omar Antolín <omar.anto...@gmail.com>
Merge branch 'master' of https://github.com/oantolin/embark --- embark.el | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/embark.el b/embark.el index 4179414c49..5bd5b9b5f2 100644 --- a/embark.el +++ b/embark.el @@ -1826,10 +1826,10 @@ minibuffer before executing the action." (cons 'general target))) (defun embark--refine-symbol-type (_type target) - "Refine symbol TARGET to command or variable if possible." + "Refine symbol TARGET to more specific type if possible." (cons (let ((symbol (intern-soft target)) (library (ffap-el-mode target))) - (cond + (cond ((and library (looking-back "\\(?:require\\|use-package\\).*" (line-beginning-position))) @@ -1838,11 +1838,13 @@ minibuffer before executing the action." ((commandp symbol) 'command) ((and symbol (boundp symbol)) 'variable) ;; Prefer variables over functions for backward compatibility. - ;; Command > variable > function > symbol seems like a - ;; reasonable order with decreasing usefulness of the actions. + ;; Command > variable > function > face > library > package > symbol + ;; seems like a reasonable order with decreasing usefulness + ;; of the actions. ((fboundp symbol) 'function) ((facep symbol) 'face) (library 'library) + ((and (featurep 'package) (embark--package-desc symbol)) 'package) (t 'symbol))) target))