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

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

[elpa] externals/setup 17a41e64d0 1/2: Fix :and when last expression is


From: ELPA Syncer
Subject: [elpa] externals/setup 17a41e64d0 1/2: Fix :and when last expression is a symbol
Date: Sun, 18 Sep 2022 05:58:09 -0400 (EDT)

branch: externals/setup
commit 17a41e64d0d3f80e58d6b1e92c3cd14368a0c30d
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Fix :and when last expression is a symbol
---
 setup.el | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/setup.el b/setup.el
index 8cd8a84545..31c46aad00 100644
--- a/setup.el
+++ b/setup.el
@@ -638,9 +638,13 @@ yourself."
 
 (setup-define :and
   (lambda (&rest conds)
-    `(if (and ,@(butlast conds))
-         ,@(last conds)
-       ,(setup-quit)))
+    (let ((tail (car (last conds))))
+      `(if (and ,@(butlast conds))
+           ,@(cond
+              ((symbolp tail) '(nil))
+              ((consp tail) (last conds))
+              ((error "Illegal tail")))
+         ,(setup-quit))))
   :documentation "Abort evaluation of CONDS are not all true.
 The expression of the last condition is used to deduce the
 feature context."



reply via email to

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