Function: gnus-score-load-score-alist
gnus-score-load-score-alist is a byte-compiled function defined in
gnus-score.el.gz.
Signature
(gnus-score-load-score-alist FILE)
Documentation
Read score FILE.
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/gnus-score.el.gz
(defun gnus-score-load-score-alist (file)
"Read score FILE."
(let (alist)
(if (not (file-readable-p file))
;; Couldn't read file.
(setq gnus-score-alist nil)
;; Read file.
(with-temp-buffer
(let ((coding-system-for-read score-mode-coding-system))
(insert-file-contents file))
(goto-char (point-min))
;; Only do the loading if the score file isn't empty.
(when (save-excursion (re-search-forward "[()0-9a-zA-Z]" nil t))
(setq alist
(condition-case ()
(read (current-buffer))
(error
(gnus-error 3.2 "Problem with score file %s" file))))))
(cond
((and alist
(atom alist))
;; Bogus score file.
(error "Invalid syntax with score file %s" file))
((eq (car alist) 'setq)
;; This is an old-style score file.
(setq gnus-score-alist (gnus-score-transform-old-to-new alist)))
(t
(setq gnus-score-alist alist)))
;; Check the syntax of the score file.
(setq gnus-score-alist
(gnus-score-check-syntax gnus-score-alist file)))))