summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/rx.el
diff options
context:
space:
mode:
authorNoam Postavsky <npostavs@gmail.com>2016-12-07 23:17:37 -0500
committerNoam Postavsky <npostavs@gmail.com>2016-12-18 08:44:45 -0500
commita7523ba955005d546d7b3d0351dfefc1347b4b47 (patch)
treedf5a2d6f4b6d8f8625e4559637553146a8aa718e /lisp/emacs-lisp/rx.el
parentb21a3e726feb521d013d3bda6dd8fd8e0c78ad37 (diff)
downloademacs-a7523ba955005d546d7b3d0351dfefc1347b4b47.tar.gz
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.
Diffstat (limited to 'lisp/emacs-lisp/rx.el')
-rw-r--r--lisp/emacs-lisp/rx.el2
1 files changed, 1 insertions, 1 deletions
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))