Function: bug-reference-maybe-setup-from-mail
bug-reference-maybe-setup-from-mail is a byte-compiled function
defined in bug-reference.el.gz.
Signature
(bug-reference-maybe-setup-from-mail GROUP HEADER-VALUES)
Documentation
Set up according to mail GROUP or HEADER-VALUES.
Group is a mail group/folder name and HEADER-VALUES is a list of mail header values, e.g., the values of From, To, Cc, List-ID, and Newsgroup.
If any GROUP-REGEXP or HEADER-REGEXP of
bug-reference-setup-from-mail-alist matches GROUP or any
element in HEADER-VALUES, the corresponding BUG-REGEXP and
URL-FORMAT are set.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/bug-reference.el.gz
(defun bug-reference-maybe-setup-from-mail (group header-values)
"Set up according to mail GROUP or HEADER-VALUES.
Group is a mail group/folder name and HEADER-VALUES is a list of
mail header values, e.g., the values of From, To, Cc, List-ID,
and Newsgroup.
If any GROUP-REGEXP or HEADER-REGEXP of
`bug-reference-setup-from-mail-alist' matches GROUP or any
element in HEADER-VALUES, the corresponding BUG-REGEXP and
URL-FORMAT are set."
(catch 'setup-done
(dolist (config bug-reference-setup-from-mail-alist)
(when (or
(and group
(car config)
(string-match-p (car config) group))
(and header-values
(nth 1 config)
(catch 'matching-header
(dolist (h header-values)
(when (and h (string-match-p (nth 1 config) h))
(throw 'matching-header t))))))
(setq-local bug-reference-bug-regexp (nth 2 config))
(setq-local bug-reference-url-format (nth 3 config))
(throw 'setup-done t)))))