Function: gnus-get-split-value
gnus-get-split-value is a byte-compiled function defined in
gnus-sum.el.gz.
Signature
(gnus-get-split-value METHODS)
Documentation
Return a value based on the split METHODS.
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-sum.el.gz
(defun gnus-get-split-value (methods)
"Return a value based on the split METHODS."
(let (split-name method result match)
(when methods
(with-current-buffer gnus-original-article-buffer
(save-restriction
(nnheader-narrow-to-headers)
(while (and methods (not split-name))
(goto-char (point-min))
(setq method (pop methods))
(setq match (car method))
(when (cond
((stringp match)
;; Regular expression.
(ignore-errors
(re-search-forward match nil t)))
((functionp match)
;; Function.
(save-restriction
(widen)
(setq result (funcall match gnus-newsgroup-name))))
((consp match)
;; Form.
(save-restriction
(widen)
(setq result (eval match t)))))
(setq split-name (cdr method))
(cond ((stringp result)
(push (expand-file-name
result gnus-article-save-directory)
split-name))
((consp result)
(setq split-name (append result split-name)))))))))
(nreverse split-name)))