changeset 54049:d47fd638cd35

(rmail-get-new-mail): Don't reference rmail-use-spam-filter if rmail-spam-filter is not loaded.
author Eli Zaretskii <eliz@is.elta.co.il>
date Tue, 17 Feb 2004 19:54:49 +0000
parents d78e05a984ee
children 2689efd11081
files lisp/mail/rmail.el
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/rmail.el	Tue Feb 17 03:18:43 2004 +0000
+++ b/lisp/mail/rmail.el	Tue Feb 17 19:54:49 2004 +0000
@@ -1448,7 +1448,8 @@
 			 (if (or file-name rmail-inbox-list)
 			     (message "(No new mail has arrived)")))
 		;; check new messages to see if any of them is spam:
-		(if rmail-use-spam-filter
+		(if (and (featurep 'rmail-spam-filter)
+			 rmail-use-spam-filter)
 		    (let*
 			((old-messages (- rmail-total-messages new-messages))
                          (rsf-scanned-message-number (1+ old-messages))
@@ -1486,7 +1487,9 @@
 		(message "%d new message%s read%s"
 			 new-messages (if (= 1 new-messages) "" "s")
 			 ;; print out a message on number of spam messages found:
-			 (if (and rmail-use-spam-filter (> rsf-number-of-spam 0))
+			 (if (and (featurep 'rmail-spam-filter)
+				  rmail-use-spam-filter
+				  (> rsf-number-of-spam 0))
 			     (if (= 1 new-messages)
 				 ", and found to be a spam message"
 			       (if (> rsf-number-of-spam 1)
@@ -1494,7 +1497,9 @@
 					   rsf-number-of-spam)
 				 ", one of which found to be a spam message"))
 			   ""))
-		(if (and rmail-use-spam-filter (> rsf-number-of-spam 0))
+		(if (and (featurep 'rmail-spam-filter)
+			 rmail-use-spam-filter
+			 (> rsf-number-of-spam 0))
 		    (progn (if rmail-spam-filter-beep (beep t))
 			   (sleep-for rmail-spam-sleep-after-message)))