From: yamaoka Date: Wed, 19 Nov 2003 06:54:28 +0000 (+0000) Subject: Synch to Gnus 200311190648. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e0738e49dece8597baad8ff9d583ff5205a3d34;p=elisp%2Fgnus.git- Synch to Gnus 200311190648. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index de7a766..2f5e194 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2003-11-19 Katsumi Yamaoka + + * gnus-score.el (gnus-decay-score): Return a surely smaller value + than the argument in XEmacs. + 2003-11-18 Reiner Steib * message.el (message-insert-to): Don't use `gnus-message'. diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index bf5de64..1e59514 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -2953,15 +2953,19 @@ If ADAPT, return the home adaptive file instead." (defun gnus-decay-score (score) "Decay SCORE according to `gnus-score-decay-constant' and `gnus-score-decay-scale'." - (condition-case nil - (floor - (- score - (* (if (< score 0) -1 1) - (min (abs score) - (max gnus-score-decay-constant - (* (abs score) - gnus-score-decay-scale)))))) - (arith-error (lsh -1 -1)))) + (let ((n (- score + (* (if (< score 0) -1 1) + (min (abs score) + (max gnus-score-decay-constant + (* (abs score) + gnus-score-decay-scale))))))) + (if (and (featurep 'xemacs) + ;; XEmacs' floor can handle only the floating point + ;; number below the half of the maximum integer. + (> (abs n) (lsh -1 -2))) + (string-to-number + (car (split-string (number-to-string n) "\\."))) + (floor n)))) (defun gnus-decay-scores (alist day) "Decay non-permanent scores in ALIST." diff --git a/texi/ChangeLog b/texi/ChangeLog index ec425f0..ebb576a 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,7 @@ +2003-11-19 Katsumi Yamaoka + + * gnus.texi (Score Decays): Update the gnus-decay-score function. + 2003-11-17 Jesper Harder * gnus.texi (Troubleshooting): Update. diff --git a/texi/gnus-ja.texi b/texi/gnus-ja.texi index fb48249..5163908 100644 --- a/texi/gnus-ja.texi +++ b/texi/gnus-ja.texi @@ -19529,16 +19529,21 @@ Gnus はこの問題の解決を助けるためにスコアを腐らせる機構を提供します。ス @lisp (defun gnus-decay-score (score) - "Decay SCORE. -This is done according to `gnus-score-decay-constant' + "Decay SCORE according to `gnus-score-decay-constant' and `gnus-score-decay-scale'." - (floor - (- score - (* (if (< score 0) 1 -1) - (min (abs score) - (max gnus-score-decay-constant - (* (abs score) - gnus-score-decay-scale))))))) + (let ((n (- score + (* (if (< score 0) -1 1) + (min (abs score) + (max gnus-score-decay-constant + (* (abs score) + gnus-score-decay-scale))))))) + (if (and (featurep 'xemacs) + ;; XEmacs' floor can handle only the floating point + ;; number below the half of the maximum integer. + (> (abs n) (lsh -1 -2))) + (string-to-number + (car (split-string (number-to-string n) "\\."))) + (floor n)))) @end lisp @vindex gnus-score-decay-scale diff --git a/texi/gnus.texi b/texi/gnus.texi index 82bee1a..a4190f7 100644 --- a/texi/gnus.texi +++ b/texi/gnus.texi @@ -20304,16 +20304,21 @@ definition of that function: @lisp (defun gnus-decay-score (score) - "Decay SCORE. -This is done according to `gnus-score-decay-constant' + "Decay SCORE according to `gnus-score-decay-constant' and `gnus-score-decay-scale'." - (floor - (- score - (* (if (< score 0) 1 -1) - (min (abs score) - (max gnus-score-decay-constant - (* (abs score) - gnus-score-decay-scale))))))) + (let ((n (- score + (* (if (< score 0) -1 1) + (min (abs score) + (max gnus-score-decay-constant + (* (abs score) + gnus-score-decay-scale))))))) + (if (and (featurep 'xemacs) + ;; XEmacs' floor can handle only the floating point + ;; number below the half of the maximum integer. + (> (abs n) (lsh -1 -2))) + (string-to-number + (car (split-string (number-to-string n) "\\."))) + (floor n)))) @end lisp @vindex gnus-score-decay-scale