From a45f239a9d8f1cfe4b900997b2f77499bab9836d Mon Sep 17 00:00:00 2001 From: keiichi Date: Fri, 14 May 1999 01:31:07 +0000 Subject: [PATCH] (gnus-score-string): Remove score data, when scoring error occured. --- lisp/gnus-score.el | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/lisp/gnus-score.el b/lisp/gnus-score.el index 76cc2a3..96aff32 100644 --- a/lisp/gnus-score.el +++ b/lisp/gnus-score.el @@ -1929,7 +1929,14 @@ SCORE is the score to add." ;; Do exact matching. (goto-char (point-min)) (while (and (not (eobp)) - (funcall search-func match nil t)) + (condition-case err + (funcall search-func match nil t) + (error + (gnus-error 3.2 "Problem with score data: %s, remove this entry %s" + err (cadaar alist)) + (gnus-score-set 'touched '(t) alist) + (setcdr entries (cddr entries)) + nil))) ;; Is it really exact? (and (eolp) (= (gnus-point-at-bol) (match-beginning 0)) @@ -1974,7 +1981,14 @@ SCORE is the score to add." (when (string= match "") (setq match "\n")) (while (and (not (eobp)) - (funcall search-func match nil t)) + (condition-case err + (funcall search-func match nil t) + (error + (gnus-error 3.2 "Problem with score data: %s, remove this entry %s" + err (cadaar alist)) + (gnus-score-set 'touched '(t) alist) + (setcdr entries (cddr entries)) + nil))) (goto-char (match-beginning 0)) (end-of-line) (setq found (setq arts (get-text-property (point) 'articles))) @@ -2021,7 +2035,14 @@ SCORE is the score to add." found) (goto-char (point-min)) (while (and (not (eobp)) - (search-forward match nil t)) + (condition-case err + (search-forward match nil t) + (error + (gnus-error 3.2 "Problem with score data: %s, remove this entry %s" + err (cadaar fuzzies)) + (gnus-score-set 'touched '(t) (cdar fuzzies)) + (setcdr (caar fuzzies) (cddaar fuzzies)) + nil))) (when (and (= (gnus-point-at-bol) (match-beginning 0)) (eolp)) (setq found (setq arts (get-text-property (point) 'articles))) -- 1.7.10.4