Mercurial > emacs
comparison lisp/gnus-score.el @ 15559:8d8bf85d356a
Synched with Gnus 5.2.31.
author | Lars Magne Ingebrigtsen <larsi@gnus.org> |
---|---|
date | Sat, 29 Jun 1996 00:29:17 +0000 |
parents | 530d0d516a42 |
children |
comparison
equal
deleted
inserted
replaced
15558:18364c2808f7 | 15559:8d8bf85d356a |
---|---|
549 (cond ((or (eq type 'r) (eq type 's) (eq type nil)) | 549 (cond ((or (eq type 'r) (eq type 's) (eq type nil)) |
550 (setq match (if match (gnus-simplify-subject-re match) ""))) | 550 (setq match (if match (gnus-simplify-subject-re match) ""))) |
551 ((eq type 'f) | 551 ((eq type 'f) |
552 (setq match (gnus-simplify-subject-fuzzy match)))) | 552 (setq match (gnus-simplify-subject-fuzzy match)))) |
553 (let ((score (gnus-score-default score)) | 553 (let ((score (gnus-score-default score)) |
554 (header (downcase header)) | 554 (header (format "%s" (downcase header))) |
555 new) | 555 new) |
556 (and prompt (setq match (read-string | 556 (and prompt (setq match (read-string |
557 (format "Match %s on %s, %s: " | 557 (format "Match %s on %s, %s: " |
558 (cond ((eq date 'now) | 558 (cond ((eq date 'now) |
559 "now") | 559 "now") |
563 header | 563 header |
564 (if (< score 0) "lower" "raise")) | 564 (if (< score 0) "lower" "raise")) |
565 (if (numberp match) | 565 (if (numberp match) |
566 (int-to-string match) | 566 (int-to-string match) |
567 match)))) | 567 match)))) |
568 | |
569 ;; Get rid of string props. | |
570 (setq match (format "%s" match)) | |
568 | 571 |
569 ;; If this is an integer comparison, we transform from string to int. | 572 ;; If this is an integer comparison, we transform from string to int. |
570 (and (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer) | 573 (and (eq (nth 2 (assoc header gnus-header-index)) 'gnus-score-integer) |
571 (setq match (string-to-int match))) | 574 (setq match (string-to-int match))) |
572 | 575 |
718 "Add SCORE to all followups to the article in the current buffer." | 721 "Add SCORE to all followups to the article in the current buffer." |
719 (interactive "P") | 722 (interactive "P") |
720 (setq score (gnus-score-default score)) | 723 (setq score (gnus-score-default score)) |
721 (when (gnus-buffer-live-p gnus-summary-buffer) | 724 (when (gnus-buffer-live-p gnus-summary-buffer) |
722 (save-excursion | 725 (save-excursion |
723 (set-buffer gnus-summary-buffer) | |
724 (save-restriction | 726 (save-restriction |
725 (goto-char (point-min)) | 727 (goto-char (point-min)) |
726 (let ((id (mail-fetch-field "message-id"))) | 728 (let ((id (mail-fetch-field "message-id"))) |
727 (when id | 729 (when id |
730 (set-buffer gnus-summary-buffer) | |
728 (gnus-summary-score-entry | 731 (gnus-summary-score-entry |
729 "references" (concat id "[ \t]*$") 'r | 732 "references" (concat id "[ \t]*$") 'r |
730 score (current-time-string) nil t))))))) | 733 score (current-time-string) nil t))))))) |
731 | 734 |
732 (defun gnus-score-followup-thread (&optional score) | 735 (defun gnus-score-followup-thread (&optional score) |
733 "Add SCORE to all later articles in the thread the current buffer is part of." | 736 "Add SCORE to all later articles in the thread the current buffer is part of." |
734 (interactive "P") | 737 (interactive "P") |
735 (setq score (gnus-score-default score)) | 738 (setq score (gnus-score-default score)) |
736 (when (gnus-buffer-live-p gnus-summary-buffer) | 739 (when (gnus-buffer-live-p gnus-summary-buffer) |
737 (save-excursion | 740 (save-excursion |
738 (set-buffer gnus-summary-buffer) | |
739 (save-restriction | 741 (save-restriction |
740 (goto-char (point-min)) | 742 (goto-char (point-min)) |
741 (let ((id (mail-fetch-field "message-id"))) | 743 (let ((id (mail-fetch-field "message-id"))) |
742 (when id | 744 (when id |
745 (set-buffer gnus-summary-buffer) | |
743 (gnus-summary-score-entry | 746 (gnus-summary-score-entry |
744 "references" id 's | 747 "references" id 's |
745 score (current-time-string)))))))) | 748 score (current-time-string)))))))) |
746 | 749 |
747 (defun gnus-score-set (symbol value &optional alist) | 750 (defun gnus-score-set (symbol value &optional alist) |