summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/rx.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el
index 52a35ffa2a7..6fde27831a0 100644
--- a/lisp/emacs-lisp/rx.el
+++ b/lisp/emacs-lisp/rx.el
@@ -376,7 +376,9 @@ If NEGATED, negate the sense."
(push (cons arg arg) conses))
((and (symbolp arg)
(let ((class (cdr (assq arg rx--char-classes))))
- (and class (push class classes)))))
+ (and class
+ (or (memq class classes)
+ (push class classes))))))
(t (error "Invalid rx `any' argument: %s" arg))))
(let ((items
;; Translate strings and conses into nonoverlapping intervals,