From: yamaoka Date: Tue, 4 Nov 2003 04:07:24 +0000 (+0000) Subject: Synch to Gnus 200311040404. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=14387fcd913c81d79f3da77353854c0ed2ab3f87;p=elisp%2Fgnus.git- Synch to Gnus 200311040404. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 66a0623..9f91ea3 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2003-11-04 Katsumi Yamaoka + + * gnus-score.el (gnus-decay-score): Protect against arithmetic + errors. Tiny patch from Norbert Koch . + 2003-10-31 Teodor Zlatanov * spam.el diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index ce255e8..bf5de64 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -2953,13 +2953,15 @@ 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'." - (floor - (- score - (* (if (< score 0) -1 1) - (min (abs score) - (max gnus-score-decay-constant - (* (abs score) - 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)))) (defun gnus-decay-scores (alist day) "Decay non-permanent scores in ALIST."