Function: display-buffer-assq-regexp
display-buffer-assq-regexp is a byte-compiled function defined in
window.el.gz.
Signature
(display-buffer-assq-regexp BUFFER-NAME ALIST ACTION)
Documentation
Retrieve ALIST entry corresponding to BUFFER-NAME.
This returns the cdr of the alist entry ALIST if either its key
is a string that matches BUFFER-NAME, as reported by
string-match-p; or if the key is a function that returns
non-nil when called with three arguments: the ALIST key,
BUFFER-NAME and ACTION. ACTION should have the form of the
action argument passed to display-buffer.
Source Code
;; Defined in /usr/src/emacs/lisp/window.el.gz
(defun display-buffer-assq-regexp (buffer-name alist action)
"Retrieve ALIST entry corresponding to BUFFER-NAME.
This returns the cdr of the alist entry ALIST if either its key
is a string that matches BUFFER-NAME, as reported by
`string-match-p'; or if the key is a function that returns
non-nil when called with three arguments: the ALIST key,
BUFFER-NAME and ACTION. ACTION should have the form of the
action argument passed to `display-buffer'."
(catch 'match
(dolist (entry alist)
(let ((key (car entry)))
(when (or (and (stringp key)
(string-match-p key buffer-name))
(and (functionp key)
(funcall key buffer-name action)))
(throw 'match (cdr entry)))))))