;ELC ;;; Compiled ;;; in Emacs version 27.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #@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\310\311\312!\313\"\314$\216\315\211\316\211;\203\202$\205$\317\203=\320\321\322\323!\324\"!\2067\325?#\202E\211\206B\326\f\327Q\330\267\202Y\331\332Q\202Z\333\334Q\202Z\211,\266\202)\207" [max-lisp-eval-depth max-specpdl-size completion-ignore-case completion-regexp-list regexp-unmatchable match-data make-byte-code 0 "\301\300\302\"\207" vconcat vector [set-match-data evaporate] 3 10000 nil "\\(" regexp-opt-group delete-dups sort copy-sequence string-lessp t "\\(?:" "\\)" #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (words 75 symbols 82)) "\\<" "\\>" "\\_<" "\\_>"] 10 (#$ . 410)]) #@141 Return the depth of REGEXP. This means the number of non-shy regexp grouping constructs (parenthesized expressions) in REGEXP. (fn REGEXP) (defalias 'regexp-opt-depth #[257 "\300 \301\302\303\304\305!\306\"\307$\216\310\311\"\210\302\312\211\310\313#\203;\302\225\262\314\224\204\315\302\224#\203\262T\262\202\266\203)\207" [match-data make-byte-code 0 "\301\300\302\"\207" vconcat vector [set-match-data evaporate] 3 string-match "" nil "\\\\(\\(\\?[0-9]*:\\)?" 1 subregexp-context-p] 9 (#$ . 2743)]) #@299 Return a regexp to match a string in the sorted list STRINGS. If PAREN non-nil, output regexp parentheses around returned regexp. If LAX non-nil, don't output parentheses if it doesn't require them. Merges keywords to avoid backtracking in Emacs's regexp matcher. (fn STRINGS &optional PAREN LAX) (defalias 'regexp-opt-group #[769 ";\203 \202\203\300\202\301\203\302\202\301\203#\301\202$\203,\301\202-G\303U\2039\301\202sG\304U\203`@G\304U\203U\305@!Q\202s\305@!Q\202s@G\303U\203w\306A\307\211#\310R\202s@G\304U\203\344A\211\203\227\211@G\304U\204\227\211A\266\202\202\203\211\262\203\344\311\211\211\203\304\211@\211G\304U\203\270\312!B\262\202\275\211B\262A\266\202\202\241\210\211\203\331\306\237!\313\314!\260\202\337\314!Q\266\202\202s\315\301\"\211G\303V\203\211G\316\317\320\321\322\323!\324\"\325\326%\n\"\305!\306\307\211#R\266\202\202q\316\327 \"\315\301\"\211G\303V\203O\211G[\330\316\317\320\331\322\323!\332\"\333\326% \"\334\"\306\307\211#\305\237!\nR\266\202\202o\335\n@\303\304#\336\f\"\211G\f\233 \306!\313\306!\f\260\266\203\266\202\262\207" ["\\(?:" "" "\\)" 0 1 regexp-quote regexp-opt-group t "?" nil string-to-char "\\|" regexp-opt-charset try-completion mapcar make-byte-code 257 "\301\300\"\207" vconcat vector [substring] 4 "\n\n(fn S)" reverse sort "\301\302\300#\207" [substring 0] 5 string-lessp substring-no-properties all-completions] 19 (#$ . 3273)]) #@184 Return a regexp to match a character in CHARS. CHARS should be a list of characters. If CHARS is the empty list, the return value is a regexp that never matches anything. (fn CHARS) (defalias 'regexp-opt-charset #[257 "\301\302!\303C\304C\305C\305\211\211\211\2039\211@\211\306\267\202,\307\262\2022\310\262\2022\311\262\2022\312I\210A\266\202\202\210\313\314\315\316\317\320   #\321\"\322\323%\"\210\242\242Y\203\224\242\242\324\\V\203v\325\326\242 \242 \242$\240\210\202\224\242\242Y\203\224\325\327\242 \242#\240\210\211\242T\240\210\202v\242R\211G\211\330\267\202\254\202\272\331!\202\272\332\230\203\266\333\202\272\334\307Q\262\262\207" [regexp-unmatchable make-char-table regexp-opt-charset -1 -2 "" #s(hash-table size 3 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (93 26 94 32 45 38)) "]" "^" "-" t map-char-table make-byte-code 514 "\211\205\234:\203U@S\301\242U\203\301A\240\207\301\242\300\242\303\\V\2030\302\304\305\302\242\300\242\301\242$\240\210\202K\301\242\300\242Y\203K\302\304\306\302\242\300\242#\240\210\300\211\242T\240\210\2020\300@\240\210\301A\240\207S\301\242U\203a\301\240\207\301\242\300\242\303\\V\203z\302\304\305\302\242\300\242\301\242$\240\210\202\225\301\242\300\242Y\203\225\302\304\306\302\242\300\242#\240\210\300\211\242T\240\210\202z\300\240\210\301\240\207" vconcat vector [2 format "%s%c-%c" "%s%c"] 8 "\n\n(fn C V)" 2 format "%s%c-%c" "%s%c" #s(hash-table size 2 test eql rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (0 162 1 166)) regexp-quote "^-" "[-^]" "["] 17 (#$ . 4788)]) (provide 'regexp-opt)