aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/emacs-lisp/rx.el2
-rw-r--r--test/lisp/emacs-lisp/rx-tests.el6
2 files changed, 4 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el
index cf02df239fe..87b3133b7f5 100644
--- a/lisp/emacs-lisp/rx.el
+++ b/lisp/emacs-lisp/rx.el
@@ -136,7 +136,7 @@ Each entry is:
136 ;; Use `list' instead of a quoted list to wrap the strings here, 136 ;; Use `list' instead of a quoted list to wrap the strings here,
137 ;; since the return value may be mutated. 137 ;; since the return value may be mutated.
138 ((or 'nonl 'not-newline 'any) (cons (list ".") t)) 138 ((or 'nonl 'not-newline 'any) (cons (list ".") t))
139 ((or 'anychar 'anything) (rx--translate-form '(or nonl "\n"))) 139 ((or 'anychar 'anything) (cons (list "[^z-a]") t))
140 ('unmatchable (rx--empty)) 140 ('unmatchable (rx--empty))
141 ((or 'bol 'line-start) (cons (list "^") 'lseq)) 141 ((or 'bol 'line-start) (cons (list "^") 'lseq))
142 ((or 'eol 'line-end) (cons (list "$") 'rseq)) 142 ((or 'eol 'line-end) (cons (list "$") 'rseq))
diff --git a/test/lisp/emacs-lisp/rx-tests.el b/test/lisp/emacs-lisp/rx-tests.el
index 903b191c98e..ef2541d83af 100644
--- a/test/lisp/emacs-lisp/rx-tests.el
+++ b/test/lisp/emacs-lisp/rx-tests.el
@@ -126,9 +126,9 @@
126 (should (equal (rx (not (any "!a" "0-8" digit nonascii))) 126 (should (equal (rx (not (any "!a" "0-8" digit nonascii)))
127 "[^!0-8a[:digit:][:nonascii:]]")) 127 "[^!0-8a[:digit:][:nonascii:]]"))
128 (should (equal (rx (any) (not (any))) 128 (should (equal (rx (any) (not (any)))
129 "\\`a\\`\\(?:.\\|\n\\)")) 129 "\\`a\\`[^z-a]"))
130 (should (equal (rx (any "") (not (any ""))) 130 (should (equal (rx (any "") (not (any "")))
131 "\\`a\\`\\(?:.\\|\n\\)"))) 131 "\\`a\\`[^z-a]")))
132 132
133(ert-deftest rx-pcase () 133(ert-deftest rx-pcase ()
134 (should (equal (pcase "a 1 2 3 1 1 b" 134 (should (equal (pcase "a 1 2 3 1 1 b"
@@ -185,7 +185,7 @@
185 185
186(ert-deftest rx-atoms () 186(ert-deftest rx-atoms ()
187 (should (equal (rx anychar anything) 187 (should (equal (rx anychar anything)
188 "\\(?:.\\|\n\\)\\(?:.\\|\n\\)")) 188 "[^z-a][^z-a]"))
189 (should (equal (rx unmatchable) 189 (should (equal (rx unmatchable)
190 "\\`a\\`")) 190 "\\`a\\`"))
191 (should (equal (rx line-start not-newline nonl any line-end) 191 (should (equal (rx line-start not-newline nonl any line-end)