*** empty log message ***
[gnus] / lisp / gnus-score.el
index 27c2d40..36692c7 100644 (file)
@@ -1,4 +1,4 @@
-;;; gnus-score.el --- scoring code for Gnus
+1;;; gnus-score.el --- scoring code for Gnus
 ;; Copyright (C) 1995,96,97 Free Software Foundation, Inc.
 
 ;; Author: Per Abrahamsen <amanda@iesd.auc.dk>
 
 ;;; Code:
 
+(eval-when-compile (require 'cl))
+
 (require 'gnus)
 (require 'gnus-sum)
 (require 'gnus-range)
+(require 'message)
 
 (defcustom gnus-global-score-files nil
   "List of global score files and directories.
@@ -37,13 +40,13 @@ for each score file or each score file directory.  Gnus will decide
 by itself what score files are applicable to which group.
 
 Say you want to use the single score file
-\"/ftp.ifi.uio.no@ftp:/pub/larsi/ding/score/soc.motss.SCORE\" and all
+\"/ftp.gnus.org@ftp:/pub/larsi/ding/score/soc.motss.SCORE\" and all
 score files in the \"/ftp.some-where:/pub/score\" directory.
 
  (setq gnus-global-score-files
-       '(\"/ftp.ifi.uio.no:/pub/larsi/ding/score/soc.motss.SCORE\"
+       '(\"/ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE\"
          \"/ftp.some-where:/pub/score\"))"
-  :group 'gnus-score
+  :group 'gnus-score-files
   :type '(repeat file))
 
 (defcustom gnus-score-file-single-match-alist nil
@@ -58,7 +61,7 @@ use multiple matches, see gnus-score-file-multiple-match-alist).
 
 These score files are loaded in addition to any files returned by
 gnus-score-find-score-files-function (which see)."
-  :group 'gnus-score
+  :group 'gnus-score-files
   :type '(repeat (cons regexp (repeat file))))
 
 (defcustom gnus-score-file-multiple-match-alist nil
@@ -74,17 +77,18 @@ gnus-score-file-single-match-alist).
 
 These score files are loaded in addition to any files returned by
 gnus-score-find-score-files-function (which see)."
-  :group 'gnus-score
+  :group 'gnus-score-files
   :type '(repeat (cons regexp (repeat file))))
 
 (defcustom gnus-score-file-suffix "SCORE"
   "Suffix of the score files."
-  :group 'gnus-score
+  :group 'gnus-score-files
   :type 'string)
 
 (defcustom gnus-adaptive-file-suffix "ADAPT"
   "Suffix of the adaptive score files."
-  :group 'gnus-score
+  :group 'gnus-score-files
+  :group 'gnus-score-adapt
   :type 'string)
 
 (defcustom gnus-score-find-score-files-function 'gnus-score-find-bnews
@@ -104,7 +108,7 @@ See the documentation to these functions for more information.
 This variable can also be a list of functions to be called.  Each
 function should either return a list of score files, or a list of
 score alists."
-  :group 'gnus-score
+  :group 'gnus-score-files
   :type '(radio (function-item gnus-score-find-single)
                (function-item gnus-score-find-hierarchical)
                (function-item gnus-score-find-bnews)
@@ -112,13 +116,13 @@ score alists."
 
 (defcustom gnus-score-interactive-default-score 1000
   "*Scoring commands will raise/lower the score with this number as the default."
-  :group 'gnus-score
+  :group 'gnus-score-default
   :type 'integer)
 
 (defcustom gnus-score-expiry-days 7
   "*Number of days before unused score file entries are expired.
 If this variable is nil, no score file entries will be expired."
-  :group 'gnus-score
+  :group 'gnus-score-expire
   :type '(choice (const :tag "never" nil)
                 number))
 
@@ -126,34 +130,35 @@ If this variable is nil, no score file entries will be expired."
   "*In non-nil, update matching score entry dates.
 If this variable is nil, then score entries that provide matches
 will be expired along with non-matching score entries."
-  :group 'gnus-score
+  :group 'gnus-score-expire
   :type 'boolean)
 
 (defcustom gnus-orphan-score nil
   "*All orphans get this score added.  Set in the score file."
-  :group 'gnus-score
-  :type 'integer)
+  :group 'gnus-score-default
+  :type '(choice (const nil)
+                integer))
 
 (defcustom gnus-decay-scores nil
   "*If non-nil, decay non-permanent scores."
-  :group 'gnus-score
+  :group 'gnus-score-decay
   :type 'boolean)
 
 (defcustom gnus-decay-score-function 'gnus-decay-score
   "*Function called to decay a score.
 It is called with one parameter -- the score to be decayed."
-  :group 'gnus-score
+  :group 'gnus-score-decay
   :type '(radio (function-item gnus-decay-score)
                (function :tag "Other")))
 
 (defcustom gnus-score-decay-constant 3
   "*Decay all \"small\" scores with this amount."
-  :group 'gnus-score
+  :group 'gnus-score-decay
   :type 'integer)
 
 (defcustom gnus-score-decay-scale .05
   "*Decay all \"big\" scores with this factor."
-  :group 'gnus-score
+  :group 'gnus-score-decay
   :type 'number)
 
 (defcustom gnus-home-score-file nil
@@ -179,14 +184,14 @@ It can be:
 
    * A function.
      If the function returns non-nil, the result will be used
-     as the home score file.  The function will be passed the 
+     as the home score file.  The function will be passed the
      name of the group as its parameter.
 
    * A string.  Use the string as the home score file.
 
    The list will be traversed from the beginning towards the end looking
    for matches."
-  :group 'gnus-score
+  :group 'gnus-score-files
   :type '(choice string
                 (repeat (choice string
                                 (cons regexp (repeat file))
@@ -196,14 +201,15 @@ It can be:
 (defcustom gnus-home-adapt-file nil
   "Variable to control where new adaptive score entries are to go.
 This variable allows the same syntax as `gnus-home-score-file'."
-  :group 'gnus-score
+  :group 'gnus-score-adapt
+  :group 'gnus-score-files
   :type '(choice string
                 (repeat (choice string
                                 (cons regexp (repeat file))
                                 function))
                 function))
 
-(defcustom gnus-default-adaptive-score-alist  
+(defcustom gnus-default-adaptive-score-alist
   '((gnus-kill-file-mark)
     (gnus-unread-mark)
     (gnus-read-mark (from 3) (subject 30))
@@ -211,7 +217,7 @@ This variable allows the same syntax as `gnus-home-score-file'."
     (gnus-killed-mark (from -1) (subject -20))
     (gnus-del-mark (from -2) (subject -15)))
 "Alist of marks and scores."
-:group 'gnus-score
+:group 'gnus-score-adapt
 :type '(repeat (cons (symbol :tag "Mark")
                   &n