Function: gnus-home-score-file

gnus-home-score-file is a byte-compiled function defined in gnus-score.el.gz.

Signature

(gnus-home-score-file GROUP &optional ADAPT)

Documentation

Return the home score file for GROUP.

If ADAPT, return the home adaptive file instead.

Probably introduced at or before Emacs version 20.1.

Source Code

;; Defined in /usr/src/emacs/lisp/gnus/gnus-score.el.gz
;;; Home score file.

(defun gnus-home-score-file (group &optional adapt)
  "Return the home score file for GROUP.
If ADAPT, return the home adaptive file instead."
  (let ((list (ensure-list (if adapt gnus-home-adapt-file gnus-home-score-file)))
	elem found)
    (while (and (not found)
		(setq elem (pop list)))
      (setq found
	    (cond
	     ;; Simple string.
	     ((stringp elem)
	      elem)
	     ;; Function.
	     ((functionp elem)
	      (funcall elem group))
	     ;; Regexp-file cons.
	     ((consp elem)
	      (when (string-match (gnus-globalify-regexp (car elem)) group)
		(replace-match (cadr elem) t nil group))))))
    (when found
      (setq found (nnheader-translate-file-chars found))
      (if (file-name-absolute-p found)
	  found
	(nnheader-concat gnus-kill-files-directory found)))))