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

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

[nongnu] elpa/helm 133ca16604 2/2: Fix helm-cr-default


From: ELPA Syncer
Subject: [nongnu] elpa/helm 133ca16604 2/2: Fix helm-cr-default
Date: Wed, 31 Aug 2022 17:58:35 -0400 (EDT)

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

    Fix helm-cr-default
    
    Make it working with something else than strings.
---
 helm-mode.el | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/helm-mode.el b/helm-mode.el
index 9d2e674d63..3816457abc 100644
--- a/helm-mode.el
+++ b/helm-mode.el
@@ -533,10 +533,16 @@ If COLLECTION is an `obarray', a TEST should be needed. 
See `obarray'."
 
 (defun helm-cr-default (default cands)
   (delq nil
-        (cond ((and (stringp default)
-                    (not (string= default ""))
+        (cond ((and (not (equal default ""))
                     (string= helm-pattern ""))
-               (cons default (delete default cands)))
+               (cons default (delete (pcase default
+                                       ((and def (pred (stringp)))
+                                        def)
+                                       ((and def (pred (symbolp)))
+                                        (symbol-name def))
+                                       ((and def (pred (numberp)))
+                                        (number-to-string def)))
+                                     cands)))
               ((and (consp default) (string= helm-pattern ""))
                (append (cl-loop for d in default
                                 ;; Don't convert



reply via email to

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