mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-26 07:11:34 -08:00
; * lisp/emacs-lisp/rx.el: slight modernisation of internal rx usage
This commit is contained in:
parent
08bf8533bb
commit
163e7dac5f
1 changed files with 7 additions and 7 deletions
|
|
@ -26,7 +26,7 @@
|
|||
;; The translation to string regexp is done by a macro and does not
|
||||
;; incur any extra processing during run time. Example:
|
||||
;;
|
||||
;; (rx bos (or (not (any "^"))
|
||||
;; (rx bos (or (not "^")
|
||||
;; (seq "^" (or " *" "["))))
|
||||
;;
|
||||
;; => "\\`\\(?:[^^]\\|\\^\\(?: \\*\\|\\[\\)\\)"
|
||||
|
|
@ -616,7 +616,7 @@ classes."
|
|||
;; Empty set (or any char).
|
||||
((and (null intervals) (null classes))
|
||||
(if negated
|
||||
(rx--translate-symbol 'anything)
|
||||
(rx--translate-symbol 'anychar)
|
||||
(rx--empty)))
|
||||
|
||||
;; More than one character, or at least one class.
|
||||
|
|
@ -1095,15 +1095,15 @@ Return (REGEXP . PRECEDENCE)."
|
|||
(opt "^")
|
||||
(opt "]")
|
||||
(* (or (seq "[:" (+ (any "a-z")) ":]")
|
||||
(not (any "]"))))
|
||||
(not "]")))
|
||||
"]")
|
||||
(not (any "*+?^$[\\"))
|
||||
(seq "\\"
|
||||
(or anything
|
||||
(seq (any "sScC_") anything)
|
||||
(or anychar
|
||||
(seq (any "sScC_") anychar)
|
||||
(seq "("
|
||||
(* (or (not (any "\\"))
|
||||
(seq "\\" (not (any ")")))))
|
||||
(* (or (not "\\")
|
||||
(seq "\\" (not ")"))))
|
||||
"\\)"))))
|
||||
eos)
|
||||
t)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue