(rx-any-condense-range): Explode 2-char ranges.
Fixes: debbugs:6984
+2010-09-05 Stefan Monnier <monnier@iro.umontreal.ca>
+
+ * emacs-lisp/rx.el (rx-any): Don't explode ranges that end in special
+ chars like - or ] (bug#6984).
+ (rx-any-condense-range): Explode 2-char ranges.
+
2010-09-02 Stefan Monnier <monnier@iro.umontreal.ca>
* textmodes/bibtex.el:
(mapcar (lambda (e)
(cond
((= (car e) (cdr e)) (list (car e)))
- ;; ((= (1+ (car e)) (cdr e)) (list (car e) (cdr e)))
+ ((= (1+ (car e)) (cdr e)) (list (car e) (cdr e)))
((list e))))
l))
(delete-dups str))))
((numberp e) (string e))
((consp e)
(if (and (= (1+ (car e)) (cdr e))
- (null (memq (car e) '(?\] ?-))))
+ ;; rx-any-condense-range should
+ ;; prevent this case from happening.
+ (null (memq (car e) '(?\] ?-)))
+ (null (memq (cdr e) '(?\] ?-))))
(string (car e) (cdr e))
(string (car e) ?- (cdr e))))
(e)))