Mercurial > emacs
comparison lisp/gnus/gnus-score.el @ 41059:70987a4f43c8
Fixed some doc strings to properly quote symbols.
author | Sam Steingold <sds@gnu.org> |
---|---|
date | Wed, 14 Nov 2001 20:22:13 +0000 |
parents | ea17c28c6476 |
children | 933ab100fb4a |
comparison
equal
deleted
inserted
replaced
41058:3532d3226828 | 41059:70987a4f43c8 |
---|---|
57 (\"REGEXP\" [ \"SCORE-FILE-1\" ] [ \"SCORE-FILE-2\" ] ... ) | 57 (\"REGEXP\" [ \"SCORE-FILE-1\" ] [ \"SCORE-FILE-2\" ] ... ) |
58 | 58 |
59 If the name of a group is matched by REGEXP, the corresponding scorefiles | 59 If the name of a group is matched by REGEXP, the corresponding scorefiles |
60 will be used for that group. | 60 will be used for that group. |
61 The first match found is used, subsequent matching entries are ignored (to | 61 The first match found is used, subsequent matching entries are ignored (to |
62 use multiple matches, see gnus-score-file-multiple-match-alist). | 62 use multiple matches, see `gnus-score-file-multiple-match-alist'). |
63 | 63 |
64 These score files are loaded in addition to any files returned by | 64 These score files are loaded in addition to any files returned by |
65 gnus-score-find-score-files-function (which see)." | 65 `gnus-score-find-score-files-function'." |
66 :group 'gnus-score-files | 66 :group 'gnus-score-files |
67 :type '(repeat (cons regexp (repeat file)))) | 67 :type '(repeat (cons regexp (repeat file)))) |
68 | 68 |
69 (defcustom gnus-score-file-multiple-match-alist nil | 69 (defcustom gnus-score-file-multiple-match-alist nil |
70 "Alist mapping regexps to lists of score files. | 70 "Alist mapping regexps to lists of score files. |
73 | 73 |
74 If the name of a group is matched by REGEXP, the corresponding scorefiles | 74 If the name of a group is matched by REGEXP, the corresponding scorefiles |
75 will be used for that group. | 75 will be used for that group. |
76 If multiple REGEXPs match a group, the score files corresponding to each | 76 If multiple REGEXPs match a group, the score files corresponding to each |
77 match will be used (for only one match to be used, see | 77 match will be used (for only one match to be used, see |
78 gnus-score-file-single-match-alist). | 78 `gnus-score-file-single-match-alist'). |
79 | 79 |
80 These score files are loaded in addition to any files returned by | 80 These score files are loaded in addition to any files returned by |
81 gnus-score-find-score-files-function (which see)." | 81 `gnus-score-find-score-files-function'." |
82 :group 'gnus-score-files | 82 :group 'gnus-score-files |
83 :type '(repeat (cons regexp (repeat file)))) | 83 :type '(repeat (cons regexp (repeat file)))) |
84 | 84 |
85 (defcustom gnus-score-file-suffix "SCORE" | 85 (defcustom gnus-score-file-suffix "SCORE" |
86 "Suffix of the score files." | 86 "Suffix of the score files." |
99 should return a list of score files to apply to that group. The score | 99 should return a list of score files to apply to that group. The score |
100 files do not actually have to exist. | 100 files do not actually have to exist. |
101 | 101 |
102 Predefined values are: | 102 Predefined values are: |
103 | 103 |
104 gnus-score-find-single: Only apply the group's own score file. | 104 `gnus-score-find-single': Only apply the group's own score file. |
105 gnus-score-find-hierarchical: Also apply score files from parent groups. | 105 `gnus-score-find-hierarchical': Also apply score files from parent groups. |
106 gnus-score-find-bnews: Apply score files whose names matches. | 106 `gnus-score-find-bnews': Apply score files whose names matches. |
107 | 107 |
108 See the documentation to these functions for more information. | 108 See the documentation to these functions for more information. |
109 | 109 |
110 This variable can also be a list of functions to be called. Each | 110 This variable can also be a list of functions to be called. Each |
111 function is given the group name as argument and should either return | 111 function is given the group name as argument and should either return |
1495 "Lower the score on THREAD with SCORE-ADJUST. | 1495 "Lower the score on THREAD with SCORE-ADJUST. |
1496 THREAD is expected to contain a list of the form `(PARENT [CHILD1 | 1496 THREAD is expected to contain a list of the form `(PARENT [CHILD1 |
1497 CHILD2 ...])' where PARENT is a header array and each CHILD is a list | 1497 CHILD2 ...])' where PARENT is a header array and each CHILD is a list |
1498 of the same form as THREAD. The empty list `nil' is valid. For each | 1498 of the same form as THREAD. The empty list `nil' is valid. For each |
1499 article in the tree, the score of the corresponding entry in | 1499 article in the tree, the score of the corresponding entry in |
1500 GNUS-NEWSGROUP-SCORED is adjusted by SCORE-ADJUST." | 1500 `gnus-newsgroup-scored' is adjusted by SCORE-ADJUST." |
1501 (while thread | 1501 (while thread |
1502 (let ((head (car thread))) | 1502 (let ((head (car thread))) |
1503 (if (listp head) | 1503 (if (listp head) |
1504 ;; handle a child and its descendants | 1504 ;; handle a child and its descendants |
1505 (gnus-score-lower-thread head score-adjust) | 1505 (gnus-score-lower-thread head score-adjust) |
1513 (defun gnus-score-orphans (score) | 1513 (defun gnus-score-orphans (score) |
1514 "Score orphans. | 1514 "Score orphans. |
1515 A root is an article with no references. An orphan is an article | 1515 A root is an article with no references. An orphan is an article |
1516 which has references, but is not connected via its references to a | 1516 which has references, but is not connected via its references to a |
1517 root article. This function finds all the orphans, and adjusts their | 1517 root article. This function finds all the orphans, and adjusts their |
1518 score in GNUS-NEWSGROUP-SCORED by SCORE." | 1518 score in `gnus-newsgroup-scored' by SCORE." |
1519 (let ((threads (gnus-make-threads))) | 1519 (let ((threads (gnus-make-threads))) |
1520 ;; gnus-make-threads produces a list, where each entry is a "thread" | 1520 ;; gnus-make-threads produces a list, where each entry is a "thread" |
1521 ;; as described in the gnus-score-lower-thread docs. This function | 1521 ;; as described in the gnus-score-lower-thread docs. This function |
1522 ;; will be called again (after limiting has been done) if the display | 1522 ;; will be called again (after limiting has been done) if the display |
1523 ;; is threaded. It would be nice to somehow save this info and use | 1523 ;; is threaded. It would be nice to somehow save this info and use |
2676 (lambda (f) (cdr f)) | 2676 (lambda (f) (cdr f)) |
2677 (sort alist 'car-less-than-car))))) | 2677 (sort alist 'car-less-than-car))))) |
2678 | 2678 |
2679 (defun gnus-score-find-alist (group) | 2679 (defun gnus-score-find-alist (group) |
2680 "Return list of score files for GROUP. | 2680 "Return list of score files for GROUP. |
2681 The list is determined from the variable gnus-score-file-alist." | 2681 The list is determined from the variable `gnus-score-file-alist'." |
2682 (let ((alist gnus-score-file-multiple-match-alist) | 2682 (let ((alist gnus-score-file-multiple-match-alist) |
2683 score-files) | 2683 score-files) |
2684 ;; if this group has been seen before, return the cached entry | 2684 ;; if this group has been seen before, return the cached entry |
2685 (if (setq score-files (assoc group gnus-score-file-alist-cache)) | 2685 (if (setq score-files (assoc group gnus-score-file-alist-cache)) |
2686 (cdr score-files) ;ensures caching groups with no matches | 2686 (cdr score-files) ;ensures caching groups with no matches |