[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master ae9bfaa: Simplify condition in kbd
From: |
Stefan Kangas |
Subject: |
master ae9bfaa: Simplify condition in kbd |
Date: |
Sat, 16 Oct 2021 16:25:29 -0400 (EDT) |
branch: master
commit ae9bfaa891c4f3cacb118aef6e35432d5fbeb88d
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>
Simplify condition in kbd
* lisp/subr.el (kbd): Simplify condition. This was discussed in:
https://lists.gnu.org/r/emacs-devel/2021-10/msg01136.html
---
lisp/subr.el | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/lisp/subr.el b/lisp/subr.el
index e55c94a..a9669ab 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -1068,13 +1068,8 @@ and should normally not be needed."
(nreverse lres)
lres))))
(if (and (not need-vector)
- (let ((ret t))
- (dolist (ch (append res nil))
- (unless (and (characterp ch)
- (let ((ch2 (logand ch (lognot ?\M-\^@))))
- (and (>= ch2 0) (<= ch2 127))))
- (setq ret nil)))
- ret))
+ (not (memq nil (mapcar (lambda (ch) (<= 0 ch 127))
+ (append res nil)))))
(concat (mapcar (lambda (ch)
(if (= (logand ch ?\M-\^@) 0)
ch (+ ch 128)))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master ae9bfaa: Simplify condition in kbd,
Stefan Kangas <=