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

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

[nongnu] elpa/helm b24f676798 5/6: Use helm-acase in helm-completing-rea


From: ELPA Syncer
Subject: [nongnu] elpa/helm b24f676798 5/6: Use helm-acase in helm-completing-read-default-1/2
Date: Tue, 27 Feb 2024 13:04:39 -0500 (EST)

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

    Use helm-acase in helm-completing-read-default-1/2
---
 helm-mode.el | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/helm-mode.el b/helm-mode.el
index be33cad3e4..fb9fe7dd06 100644
--- a/helm-mode.el
+++ b/helm-mode.el
@@ -1369,10 +1369,9 @@ handling properties, see `helm-comp-read'.
 This handler should be used when candidate list doesn't need to be rebuilt
 dynamically otherwise use `helm-completing-read-default-2'."
   (let* ((history (or (car-safe hist) hist))
-         (initial-input (pcase init
-                          ((pred (stringp)) init)
-                          ;; INIT is a cons cell.
-                          (`(,l . ,_ll) l)))
+         (initial-input (helm-acase init
+                          ((guard (stringp it)) it)
+                          ((guard (consp it)) (car it))))
          (minibuffer-completion-table collection)
          (metadata (or (completion-metadata (or initial-input "") collection 
test)
                        '(metadata)))
@@ -1452,10 +1451,9 @@ Call `helm-comp-read' with same args as 
`completing-read'.
 For the meaning of optional args see `helm-completing-read-default-1'.
 This handler uses dynamic matching which allows honouring `completion-styles'."
   (let* ((history (or (car-safe hist) hist))
-         (input (pcase init
-                  ((pred (stringp)) init)
-                  ;; INIT is a cons cell.
-                  (`(,l . ,_ll) l)))
+         (input (helm-acase init
+                  ((guard (stringp it)) it)
+                  ((guard (consp it)) (car it)))
          (completion-flex-nospace t)
          (minibuffer-completion-table collection)
          ;; (completion-styles



reply via email to

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