diff options
| author | Mattias EngdegÄrd | 2023-08-13 10:36:21 +0200 |
|---|---|---|
| committer | Mattias EngdegÄrd | 2023-08-13 10:38:29 +0200 |
| commit | 163e7dac5f2f9e1154ee5ae76fee9e4602a9b7cb (patch) | |
| tree | b41e284b7c87f177faecd264bb384b9e468c09ea | |
| parent | 08bf8533bb1d0e4a07e644799d25e4551024126f (diff) | |
| download | emacs-163e7dac5f2f9e1154ee5ae76fee9e4602a9b7cb.tar.gz emacs-163e7dac5f2f9e1154ee5ae76fee9e4602a9b7cb.zip | |
; * lisp/emacs-lisp/rx.el: slight modernisation of internal rx usage
| -rw-r--r-- | lisp/emacs-lisp/rx.el | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/rx.el b/lisp/emacs-lisp/rx.el index aa1174ea08b..afc9826eefa 100644 --- a/lisp/emacs-lisp/rx.el +++ b/lisp/emacs-lisp/rx.el | |||
| @@ -26,7 +26,7 @@ | |||
| 26 | ;; The translation to string regexp is done by a macro and does not | 26 | ;; The translation to string regexp is done by a macro and does not |
| 27 | ;; incur any extra processing during run time. Example: | 27 | ;; incur any extra processing during run time. Example: |
| 28 | ;; | 28 | ;; |
| 29 | ;; (rx bos (or (not (any "^")) | 29 | ;; (rx bos (or (not "^") |
| 30 | ;; (seq "^" (or " *" "[")))) | 30 | ;; (seq "^" (or " *" "[")))) |
| 31 | ;; | 31 | ;; |
| 32 | ;; => "\\`\\(?:[^^]\\|\\^\\(?: \\*\\|\\[\\)\\)" | 32 | ;; => "\\`\\(?:[^^]\\|\\^\\(?: \\*\\|\\[\\)\\)" |
| @@ -616,7 +616,7 @@ classes." | |||
| 616 | ;; Empty set (or any char). | 616 | ;; Empty set (or any char). |
| 617 | ((and (null intervals) (null classes)) | 617 | ((and (null intervals) (null classes)) |
| 618 | (if negated | 618 | (if negated |
| 619 | (rx--translate-symbol 'anything) | 619 | (rx--translate-symbol 'anychar) |
| 620 | (rx--empty))) | 620 | (rx--empty))) |
| 621 | 621 | ||
| 622 | ;; More than one character, or at least one class. | 622 | ;; More than one character, or at least one class. |
| @@ -1095,15 +1095,15 @@ Return (REGEXP . PRECEDENCE)." | |||
| 1095 | (opt "^") | 1095 | (opt "^") |
| 1096 | (opt "]") | 1096 | (opt "]") |
| 1097 | (* (or (seq "[:" (+ (any "a-z")) ":]") | 1097 | (* (or (seq "[:" (+ (any "a-z")) ":]") |
| 1098 | (not (any "]")))) | 1098 | (not "]"))) |
| 1099 | "]") | 1099 | "]") |
| 1100 | (not (any "*+?^$[\\")) | 1100 | (not (any "*+?^$[\\")) |
| 1101 | (seq "\\" | 1101 | (seq "\\" |
| 1102 | (or anything | 1102 | (or anychar |
| 1103 | (seq (any "sScC_") anything) | 1103 | (seq (any "sScC_") anychar) |
| 1104 | (seq "(" | 1104 | (seq "(" |
| 1105 | (* (or (not (any "\\")) | 1105 | (* (or (not "\\") |
| 1106 | (seq "\\" (not (any ")"))))) | 1106 | (seq "\\" (not ")")))) |
| 1107 | "\\)")))) | 1107 | "\\)")))) |
| 1108 | eos) | 1108 | eos) |
| 1109 | t))) | 1109 | t))) |