From ccb763c86dbb58972b49a26d5ffe5cf195a5975a Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Wed, 7 Dec 2016 23:17:37 -0500 Subject: [PATCH v1] Fix rx-any with range with ?\] and ?- * lisp/emacs-lisp/rx.el: Make sure not to produce a circular list. --- 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 66d295e..d305597 100644 --- a/lisp/emacs-lisp/rx.el +++ b/lisp/emacs-lisp/rx.el @@ -521,7 +521,7 @@ rx-any (setq args (nconc (delq ?- args) (list ?-)))) ((setq m (assq ?- args)) ;; next to the bracket's range, make the second range - (setcdr args (cons m (delq m args)))))) + (setcdr args (cons m (delq m (cdr args))))))) ;; bracket in the end range ;; => "[]...-]" ((setq m (rassq ?\] args)) -- 2.9.3