[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master f5672b2: Don't use the return value of 'push'
From: |
Mattias Engdeg�rd |
Subject: |
master f5672b2: Don't use the return value of 'push' |
Date: |
Wed, 4 Dec 2019 05:41:59 -0500 (EST) |
branch: master
commit f5672b24a8510ee5c62b9e366e4ab6b1fde5ed77
Author: Mattias Engdegård <address@hidden>
Commit: Mattias Engdegård <address@hidden>
Don't use the return value of 'push'
Although 'push' returns the modified list, it isn't actually
documented to do so, so don't rely on it.
* lisp/emacs-lisp/rx.el (rx--translate-any): Add progn.
---
lisp/emacs-lisp/rx.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el
index 6fde278..0dc6e19 100644
--- a/lisp/emacs-lisp/rx.el
+++ b/lisp/emacs-lisp/rx.el
@@ -378,7 +378,7 @@ If NEGATED, negate the sense."
(let ((class (cdr (assq arg rx--char-classes))))
(and class
(or (memq class classes)
- (push class classes))))))
+ (progn (push class classes) t))))))
(t (error "Invalid rx `any' argument: %s" arg))))
(let ((items
;; Translate strings and conses into nonoverlapping intervals,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master f5672b2: Don't use the return value of 'push',
Mattias Engdeg�rd <=