Function: consult--join-regexps
consult--join-regexps is a byte-compiled function defined in
consult.el.
Signature
(consult--join-regexps REGEXPS TYPE)
Documentation
Join REGEXPS of TYPE.
Source Code
;; Defined in ~/.emacs.d/elpa/consult-20260805.1130/consult.el
(defun consult--join-regexps (regexps type)
"Join REGEXPS of TYPE."
;; Add look-ahead wrapper only if there is more than one regular expression
(cond
((and (eq type 'pcre) (cdr regexps))
(concat "^" (mapconcat (lambda (x) (format "(?=.*%s)" x))
regexps "")))
((eq type 'basic)
(string-join regexps ".*"))
(t
(when (length> regexps 3)
(consult--minibuffer-message
"Too many regexps, %S ignored. Use post-filtering!"
(string-join (seq-drop regexps 3) " "))
(setq regexps (seq-take regexps 3)))
(consult--join-regexps-permutations regexps (and (eq type 'emacs) "\\")))))