emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[nongnu] elpa/helm 256eeddc8a 1/3: Ensure file category is used when set


From: ELPA Syncer
Subject: [nongnu] elpa/helm 256eeddc8a 1/3: Ensure file category is used when set from
Date: Sun, 13 Aug 2023 12:59:45 -0400 (EDT)

branch: elpa/helm
commit 256eeddc8aea57a8b889f61fb0b3bd7ea93a1ca8
Author: Thierry Volpiatto <thievol@posteo.net>
Commit: Thierry Volpiatto <thievol@posteo.net>

    Ensure file category is used when set from
    
    helm-completing-read-command-categories.
---
 helm-mode.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/helm-mode.el b/helm-mode.el
index 58c7ec1314..55d4a0e0fc 100644
--- a/helm-mode.el
+++ b/helm-mode.el
@@ -996,6 +996,7 @@ behavior as emacs vanilla.")
     ("customize-group" . symbol-help)
     ("find-function" . symbol-help)
     ("find-variable" . symbol-help)
+    ("find-library" . file) ; FIXME needs a special category library.
     ("kill-buffer" . buffer)
     ("package-install" . package)
     ("package-vc-install" . package)
@@ -1168,7 +1169,8 @@ dynamically otherwise use 
`helm-completing-read-default-2'."
                    (completion-metadata-get metadata 'annotation-function)))
          (afix (or (plist-get completion-extra-properties :affixation-function)
                    (completion-metadata-get metadata 'affixation-function)))
-         (file-comp-p (eq (completion-metadata-get metadata 'category) 'file))
+         (category (completion-metadata-get metadata 'category))
+         (file-comp-p (eq category 'file))
          (sort-fn (unless (eq helm-completion-style 'helm-fuzzy)
                     (or
                      (completion-metadata-get
@@ -1178,11 +1180,11 @@ dynamically otherwise use 
`helm-completing-read-default-2'."
          flags)
     (helm-aif (assoc-default name helm-completing-read-command-categories)
         (unless (completion-metadata-get metadata 'category)
-          (setq metadata
-                `(metadata (category . ,it)))))
+          (setq metadata `(metadata (category . ,it))
+                category it
+                file-comp-p (eq category 'file))))
     (helm-aif (and completions-detailed
-                   (assoc-default (completion-metadata-get metadata 'category)
-                                  helm-completing-read-extra-metadata))
+                   (assoc-default category 
helm-completing-read-extra-metadata))
         (progn
           (setq metadata it)
           (setq afun (completion-metadata-get metadata 'annotation-function)



reply via email to

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