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

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

[nongnu] elpa/helm 84f4e1e375 4/9: Simplify checking category and DRY


From: ELPA Syncer
Subject: [nongnu] elpa/helm 84f4e1e375 4/9: Simplify checking category and DRY
Date: Tue, 29 Aug 2023 07:00:19 -0400 (EDT)

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

    Simplify checking category and DRY
---
 helm-mode.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/helm-mode.el b/helm-mode.el
index 2689633ade..e67ec7f858 100644
--- a/helm-mode.el
+++ b/helm-mode.el
@@ -1294,10 +1294,10 @@ dynamically otherwise use 
`helm-completing-read-default-2'."
                      (lambda (candidates)
                        (sort candidates #'helm-generic-sort-fn)))))
          flags)
-    (helm-aif (assoc-default name helm-completing-read-command-categories)
-        (unless (completion-metadata-get metadata 'category)
-          (setq metadata `(metadata (category . ,it))
-                category it)))
+    (helm-aif (and (null category)
+                   (assoc-default name 
helm-completing-read-command-categories))
+        (setq metadata `(metadata (category . ,it))
+              category it))
     ;; FIXME: Actually we are using completions-detailed as a flag to decide if
     ;; we add affixations or not, but as we do our own implementation probably
     ;; we could provide this feature as well for earlier Emacs (27.2 looks a



reply via email to

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