[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/compat 658db90 47/99: Simplify and-let* implementation
From: |
ELPA Syncer |
Subject: |
[elpa] externals/compat 658db90 47/99: Simplify and-let* implementation |
Date: |
Sun, 17 Oct 2021 05:57:55 -0400 (EDT) |
branch: externals/compat
commit 658db907c52cbe829efc11acfd44236e7dcd995c
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
Simplify and-let* implementation
---
compat-25.1.el | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/compat-25.1.el b/compat-25.1.el
index de9e824..c14a8b6 100644
--- a/compat-25.1.el
+++ b/compat-25.1.el
@@ -125,17 +125,7 @@ Like `when-let*', except if BODY is empty and all the
bindings
are non-nil, then the result is non-nil."
:feature subr-x
(declare (indent 1) (debug if-let*))
- (let ((empty (make-symbol "s"))
- (last t) list)
- (dolist (var varlist)
- (push `(,(if (cdr var) (car var) empty)
- (and ,last ,(or (cdr var) (car var))))
- list)
- (when (or (cdr var) (consp (car var)))
- (setq last (caar list))))
- `(let* (,(nreverse list))
- (when ,(caar list)
- ,@body))))
+ `(when-let* ,varlist ,@(or body '(t))))
(compat-defmacro if-let (spec then &rest else)
"Bind variables according to SPEC and evaluate THEN or ELSE.
- [elpa] externals/compat 797930f 34/99: Declare temporary-file-directory for make-nearby-temp-file, (continued)
- [elpa] externals/compat 797930f 34/99: Declare temporary-file-directory for make-nearby-temp-file, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 26acf1f 48/99: Use compatibility macros in ...-let definitions, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 8f64282 49/99: Use compatibility functions in string-trim definition, ELPA Syncer, 2021/10/17
- [elpa] externals/compat e6b5f08 53/99: Load all compatibility code unconditionally, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 021ffd1 59/99: Handle legacy bytecode argument lists, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 956db9b 60/99: Improve handling of conditional compatibility definitions, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 9be46b0 16/99: Add check for Emacs 28 to compat-tests.el, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 10ef8f4 36/99: Declare string-trim-left and directory-name-p, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 9df8e0c 38/99: Add GitHub action file for CI, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 4364563 43/99: Use unprefixed symbols where possible, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 658db90 47/99: Simplify and-let* implementation,
ELPA Syncer <=
- [elpa] externals/compat ad92d70 61/99: Add decoded-time-* functions from 27.1, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 476aa10 62/99: Add json-* functions from 27.1, ELPA Syncer, 2021/10/17
- [elpa] externals/compat a0ea4ae 65/99: Call alist-get-full-elisp from alist-get-handle-testfn, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 4513631 70/99: Fix compat-func-arity advice handling, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 09bf8d8 75/99: Declare nadvice functions for compat-func-arity, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 80ab781 77/99: Use advice.el for advising functions previously to Emacs 24.4, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 20afc89 78/99: Add :cond checks to json-* functions in compat-27.1, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 72c0781 81/99: Mention Chris Wellons' article on lambdas and byte compilation, ELPA Syncer, 2021/10/17
- [elpa] externals/compat ee068f0 82/99: Revert back to manual advising, ELPA Syncer, 2021/10/17
- [elpa] externals/compat 7bef68b 84/99: Mark regexp-opt as part of regexp-opt.el, ELPA Syncer, 2021/10/17