From a7523ba955005d546d7b3d0351dfefc1347b4b47 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Wed, 7 Dec 2016 23:17:37 -0500 Subject: Fix rx-any with range with ?\] and ?- * lisp/emacs-lisp/rx.el: Make sure not to produce a circular list (Bug#25123). * test/lisp/emacs-lisp/rx-tests.el (rx-char-any): New test. --- lisp/emacs-lisp/rx.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/emacs-lisp') diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el index 66d295e221f..d305597631a 100644 --- a/lisp/emacs-lisp/rx.el +++ b/lisp/emacs-lisp/rx.el @@ -521,7 +521,7 @@ ARG is optional." (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)) -- cgit v1.2.3