From: yamaoka Date: Wed, 17 Apr 2002 08:44:45 +0000 (+0000) Subject: Synch with Oort Gnus. X-Git-Tag: t-gnus-6_15_6-02-quimby~6 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa47c6dbdc1afcf6ec71ece10a540a3307718f32;p=elisp%2Fgnus.git- Synch with Oort Gnus. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 33bed24..731a201 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,16 @@ +2002-04-17 Kai Gro,A_(Bjohann + From Ted Zlatanov . + + * spam.el (spam-whitelist, spam-blacklist, spam-enter-whitelist): + Improve docstring. + (spam-enter-blacklist): New command. + + * gnus-sum.el (gnus-spam-mark): New mark. + (gnus-auto-expirable-marks): Add gnus-spam-mark. + (gnus-summary-make-tool-bar): Correct conditional. + (gnus-summary-limit-to-unread): Add gnus-spam-mark. + (gnus-summary-mark-as-spam): New command. + 2002-04-13 Josh Huber * mml-sec.el (mml-secure-message): changed to support arbritrary diff --git a/lisp/gnus-sum.el b/lisp/gnus-sum.el index 5895bd2..024e8f4 100644 --- a/lisp/gnus-sum.el +++ b/lisp/gnus-sum.el @@ -447,6 +447,11 @@ this variable specifies group names." :group 'gnus-summary-marks :type 'character) +(defcustom gnus-spam-mark ?H + "*Mark used for spam articles." + :group 'gnus-summary-marks + :type 'character) + (defcustom gnus-souped-mark ?F "*Mark used for souped articles." :group 'gnus-summary-marks @@ -563,7 +568,7 @@ this variable specifies group names." :type 'boolean) (defcustom gnus-auto-expirable-marks - (list gnus-killed-mark gnus-del-mark gnus-catchup-mark + (list gnus-spam-mark gnus-killed-mark gnus-del-mark gnus-catchup-mark gnus-low-score-mark gnus-ancient-mark gnus-read-mark gnus-souped-mark gnus-duplicate-mark) "*The list of marks converted into expiration if a group is auto-expirable." @@ -2328,15 +2333,10 @@ gnus-summary-show-article-from-menu-as-charset-%s" cs)))) (defvar gnus-summary-tool-bar-map nil) ;; Emacs 21 tool bar. Should be no-op otherwise. -;; NB: A new function tool-bar-local-item-from-menu is added in Emacs -;; 21.2.50+. Considering many users use Emacs 21, use -;; tool-bar-add-item-from-menu here. (defun gnus-summary-make-tool-bar () - (if (and - (condition-case nil (require 'tool-bar) (error nil)) - (fboundp 'tool-bar-add-item-from-menu) - (default-value 'tool-bar-mode) - (not gnus-summary-tool-bar-map)) + (if (and (fboundp 'tool-bar-add-item-from-menu) + (default-value 'tool-bar-mode) + (not gnus-summary-tool-bar-map)) (setq gnus-summary-tool-bar-map (let ((tool-bar-map (make-sparse-keymap)) (load-path (mm-image-load-path))) @@ -7284,7 +7284,7 @@ If ALL is non-nil, limit strictly to unread articles." ;; Concat all the marks that say that an article is read and have ;; those removed. (list gnus-del-mark gnus-read-mark gnus-ancient-mark - gnus-killed-mark gnus-kill-file-mark + gnus-killed-mark gnus-spam-mark gnus-kill-file-mark gnus-low-score-mark gnus-expirable-mark gnus-canceled-mark gnus-catchup-mark gnus-sparse-mark gnus-duplicate-mark gnus-souped-mark) @@ -9246,6 +9246,13 @@ the actual number of articles marked is returned." (interactive "p") (gnus-summary-mark-forward n gnus-expirable-mark)) +(defun gnus-summary-mark-as-spam (n) + "Mark N articles forward as spam. +If N is negative, mark backward instead. The difference between N and +the actual number of articles marked is returned." + (interactive "p") + (gnus-summary-mark-forward n gnus-spam-mark)) + (defun gnus-summary-mark-article-as-replied (article) "Mark ARTICLE as replied to and update the summary line. ARTICLE can also be a list of articles." diff --git a/lisp/spam.el b/lisp/spam.el index e2e4d93..98a4151 100644 --- a/lisp/spam.el +++ b/lisp/spam.el @@ -61,16 +61,21 @@ "When spam files are kept.") (defvar spam-whitelist (expand-file-name "whitelist" spam-directory) - "The location of the whitelist.") + "The location of the whitelist. +The file format is one regular expression per line. +The regular expression is matched against the address.") (defvar spam-blacklist (expand-file-name "blacklist" spam-directory) - "The location of the whitelist.") + "The location of the blacklist. +The file format is one regular expression per line. +The regular expression is matched against the address.") (defvar spam-whitelist-cache nil) (defvar spam-blacklist-cache nil) (defun spam-enter-whitelist (address &optional blacklist) - "Enter ADDRESS into the whitelist." + "Enter ADDRESS into the whitelist. +Optional arg BLACKLIST, if non-nil, means to enter in the blacklist instead." (interactive "sAddress: ") (let ((file (if blacklist spam-blacklist spam-whitelist))) (unless (file-exists-p (file-name-directory file)) @@ -84,6 +89,11 @@ (insert address "\n") (save-buffer)))) +(defun spam-enter-blacklist (address) + "Enter ADDRESS into the blacklist." + (interactive "sAddress: ") + (spam-enter-whitelist address t)) + (defun spam-parse-whitelist (&optional blacklist) (let ((file (if blacklist spam-blacklist spam-whitelist)) contents address)