Commit 59896c4c authored by Dave Love's avatar Dave Love
Browse files

(gnus-score-load-file): Use expand-file-name.

	(gnus-score-find-bnews): Don't concat "".

2000-10-07 09:18:53  ShengHuo ZHU  <zsh@cs.rochester.edu>

        * gnus-score.el (gnus-score-body): Don't score body when
        agent-fetching.
        (gnus-score-followup): Don't score followup either.
2000-09-21 16:15:25  ShengHuo ZHU  <zsh@cs.rochester.edu>

	* gnus-score.el (gnus-score-use-all-scores): New variable.
	(gnus-all-score-files): Use it.
2000-09-20 18:33:00  ShengHuo ZHU  <zsh@cs.rochester.edu>

	* gnus-score.el (gnus-score-find-bnews): Use directory-sep-char.
parent 9db2706e
2000-11-08 ShengHuo ZHU <zsh@cs.rochester.edu>
* gnus-score.el (gnus-score-body): Don't score body when
agent-fetching.
(gnus-score-followup): Don't score followup either.
(gnus-score-use-all-scores): New variable.
(gnus-all-score-files): Use it.
(gnus-score-find-bnews): Use directory-sep-char.
2000-11-08 Dave Love <fx@gnu.org>
* gnus-score.el (gnus-score-load-file): Use expand-file-name.
(gnus-score-find-bnews): Don't concat "".
* cu-exit.xpm, prev-ur.xpm, next-ur.xpm, post.xpm, fuwo.xpm:
* followup.xpm, uu-post.xpm, uu-decode.xpm, mail-reply.xpm:
* reply.xpm, reply-wo.xpm, rot13.xpm, save-aif.xpm, save-art.xpm:
......
......@@ -395,6 +395,9 @@ If nil, the user will be asked for a duration."
;; Internal variables.
(defvar gnus-score-use-all-scores t
"If nil, only `gnus-score-find-score-files-function' is used.")
(defvar gnus-adaptive-word-syntax-table
(let ((table (copy-syntax-table (standard-syntax-table)))
(numbers '(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9)))
......@@ -1099,8 +1102,7 @@ EXTRA is the possible non-standard header."
gnus-kill-files-directory)))
(expand-file-name file))
file)
(concat (file-name-as-directory gnus-kill-files-directory)
file))))
(expand-file-name file gnus-kill-files-directory))))
(cached (assoc file gnus-score-cache))
(global (member file gnus-internal-global-score-files))
lists alist)
......@@ -1636,6 +1638,8 @@ score in GNUS-NEWSGROUP-SCORED by SCORE."
nil)
(defun gnus-score-body (scores header now expire &optional trace)
(if gnus-agent-fetching
nil
(save-excursion
(setq gnus-scores-articles
(sort gnus-scores-articles
......@@ -1730,12 +1734,15 @@ score in GNUS-NEWSGROUP-SCORED by SCORE."
(setq rest entries))))
(setq entries rest)))))
(setq articles (cdr articles)))))))
nil)
nil))
(defun gnus-score-thread (scores header now expire &optional trace)
(gnus-score-followup scores header now expire trace t))
(defun gnus-score-followup (scores header now expire &optional trace thread)
(if gnus-agent-fetching
;; FIXME: It seems doable in fetching mode.
nil
;; Insert the unique article headers in the buffer.
(let ((gnus-score-index (nth 1 (assoc header gnus-header-index)))
(current-score-file gnus-current-score-file)
......@@ -1753,7 +1760,8 @@ score in GNUS-NEWSGROUP-SCORED by SCORE."
(gnus-score-file-name
gnus-newsgroup-name gnus-adaptive-file-suffix))))
(setq gnus-scores-articles (sort gnus-scores-articles 'gnus-score-string<)
(setq gnus-scores-articles (sort gnus-scores-articles
'gnus-score-string<)
articles gnus-scores-articles)
(erase-buffer)
......@@ -1821,7 +1829,8 @@ score in GNUS-NEWSGROUP-SCORED by SCORE."
(push new news)))))
;; Update expire date
(cond ((null date)) ;Permanent entry.
((and found gnus-update-score-entry-dates) ;Match, update date.
((and found gnus-update-score-entry-dates)
;Match, update date.
(gnus-score-set 'touched '(t) alist)
(setcar (nthcdr 2 kill) now))
((and expire (< date expire)) ;Old entry, remove.
......@@ -1833,7 +1842,7 @@ score in GNUS-NEWSGROUP-SCORED by SCORE."
(save-excursion
(set-buffer gnus-summary-buffer)
(gnus-score-load-file current-score-file))
(list (cons "references" news))))
(list (cons "references" news)))))
(defun gnus-score-add-followups (header score scores &optional thread)
"Add a score entry to the adapt file."
......@@ -2551,12 +2560,12 @@ GROUP using BNews sys file syntax."
;; too much.
(delete-char (min (1- (point-max)) klen))
(goto-char (point-max))
(search-backward "/")
(search-backward (string directory-sep-char))
(delete-region (1+ (point)) (point-min)))
;; If short file names were used, we have to translate slashes.
(goto-char (point-min))
(let ((regexp (concat
"[/:" (if trans (char-to-string trans) "") "]")))
"[/:" (if trans (char-to-string trans)) "]")))
(while (re-search-forward regexp nil t)
(replace-match "." t t)))
;; Kludge to get rid of "nntp+" problems.
......@@ -2707,6 +2716,7 @@ The list is determined from the variable gnus-score-file-alist."
(and funcs
(not (listp funcs))
(setq funcs (list funcs)))
(when gnus-score-use-all-scores
;; Get the initial score files for this group.
(when funcs
(setq score-files (nreverse (gnus-score-find-alist group))))
......@@ -2719,7 +2729,7 @@ The list is determined from the variable gnus-score-file-alist."
(let ((param-file (gnus-group-find-parameter group 'adapt-file)))
(when param-file
(push param-file score-files)
(setq gnus-newsgroup-adaptive-score-file param-file)))
(setq gnus-newsgroup-adaptive-score-file param-file))))
;; Go through all the functions for finding score files (or actual
;; scores) and add them to a list.
(while funcs
......@@ -2727,6 +2737,7 @@ The list is determined from the variable gnus-score-file-alist."
(setq score-files
(nconc score-files (nreverse (funcall (car funcs) group)))))
(setq funcs (cdr funcs)))
(when gnus-score-use-all-scores
;; Add any home score files.
(let ((home (gnus-home-score-file group)))
(when home
......@@ -2734,7 +2745,7 @@ The list is determined from the variable gnus-score-file-alist."
;; Check whether there is a `score-file' group parameter.
(let ((param-file (gnus-group-find-parameter group 'score-file)))
(when param-file
(push param-file score-files)))
(push param-file score-files))))
;; Expand all files names.
(let ((files score-files))
(while files
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment