| Server IP : 217.160.0.135 / Your IP : 216.73.217.37 Web Server : Apache System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64 User : sws1074145052 ( 1074145052) PHP Version : 8.3.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/share/emacs/28.2/lisp/emacs-lisp/ |
Upload File : |
;ELC
;;; Compiled
;;; in Emacs version 28.2
;;; with all optimizations.
#@1629 Return a regexp to match a string in the list STRINGS.
Each member of STRINGS is treated as a fixed string, not as a regexp.
Optional PAREN specifies how the returned regexp is surrounded by
grouping constructs.
If STRINGS is the empty list, the return value is a regexp that
never matches anything.
The optional argument PAREN can be any of the following:
a string
the resulting regexp is preceded by PAREN and followed by
\), e.g. use "\\(?1:" to produce an explicitly numbered
group.
`words'
the resulting regexp is surrounded by \=\<\( and \)\>.
`symbols'
the resulting regexp is surrounded by \_<\( and \)\_>.
non-nil
the resulting regexp is surrounded by \( and \).
nil
the resulting regexp is surrounded by \(?: and \), if it is
necessary to ensure that a postfix operator appended to it will
apply to the whole expression.
The returned regexp is ordered in such a way that it will always
match the longest string possible.
Up to reordering, the resulting regexp is equivalent to but
usually more efficient than that of a simplified version:
(defun simplified-regexp-opt (strings &optional paren)
(let ((parens
(cond ((stringp paren) (cons paren "\\)"))
((eq paren \='words) \='("\\\=<\\(" . "\\)\\>"))
((eq paren \='symbols) \='("\\_<\\(" . "\\)\\_>"))
((null paren) \='("\\(?:" . "\\)"))
(t \='("\\(" . "\\)")))))
(concat (car parens)
(mapconcat \='regexp-quote strings "\\|")
(cdr parens))))
(fn STRINGS &optional PAREN)
(defalias 'regexp-opt #[513 "\305 \306\307\"\216\310\211\311\211;\203 \202 \205 \312\2036 \313\314\315\316!\317\"!\2060 \320?#\202>