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

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

[nongnu] elpa/helm 02e1570c12: DRY compute 'special' during *acase macro


From: ELPA Syncer
Subject: [nongnu] elpa/helm 02e1570c12: DRY compute 'special' during *acase macro expand
Date: Tue, 3 Dec 2024 06:59:53 -0500 (EST)

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

    DRY compute 'special' during *acase macro expand
---
 helm-lib.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/helm-lib.el b/helm-lib.el
index 11499ab5a5..39a559768f 100644
--- a/helm-lib.el
+++ b/helm-lib.el
@@ -599,15 +599,16 @@ usable in all clauses to refer to EXPR.
            (key      (car clause1))
            (isguard  (eq 'guard (car-safe key)))
            (isdst    (eq 'dst (car-safe key)))
+           (special  (or isguard isdst))
            (sexp     (and isguard (cadr key)))
            (dst-sexp (and isdst (cadr key))))
       `(let* ((it ,expr)
               (guard ,sexp)
-              (dst (and (consp it) ',dst-sexp))
-              (special (or ,isguard ,isdst)))
+              (dst (and (consp it) ',dst-sexp)))
          (cond ((or guard
-                    (and (not special) (equal it ',key))
-                    (and (not special) (listp ',key) (member it ',key))
+                    (and ,(not special)
+                         (or (equal it ',key)
+                             (and (listp ',key) (member it ',key))))
                     (and (symbolp ',key)
                          (or (eq ',key t) (eq ',key 'otherwise))))
                 ;; When this branch is expanded the compiler complain about not



reply via email to

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