--- spam.el Fri Apr 5 14:14:27 2002 +++ tzz-spam.el Fri Apr 5 14:21:45 2002 @@ -61,16 +61,16 @@ "When spam files are kept.") (defvar spam-whitelist (expand-file-name "whitelist" spam-directory) - "The location of the whitelist.") + "The location of the whitelist file. One address (string or regular expression) per line.") (defvar spam-blacklist (expand-file-name "blacklist" spam-directory) - "The location of the whitelist.") + "The location of the blacklist file. One address (string or regular expression) per line.") (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, or the blacklist with the optional parameter BLACKLIST." (interactive "sAddress: ") (let ((file (if blacklist spam-blacklist spam-whitelist))) (unless (file-exists-p (file-name-directory file)) @@ -83,6 +83,11 @@ (insert "\n")) (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))