[mew-int 2997] Spam: message can trigger exception

Christophe TROESTLER <[email protected]> Thu, 16 Jun 2011 19:00:24 +0200 (CEST)
Newsgroups gmane.mail.mew.general
Organization Universite de Mons (http://math.umons.ac.be/an/)
Message-ID <20110616.190024.1543364510938654354.Christophe.Troestler@umons.ac.be>
Hi,

When using "lh" and "ls" with spamassasin, Mew was throwing an 
exception instead of displaying the message.  This is because of the 
following warning outputted by the script:

defined(%hash) is deprecated at 
/usr/share/perl5/Mail/SpamAssassin/Dns.pm line 757.

which contains "%".  A trivial fix is attached.

Best,
C.
spam.patch (text/x-patch, 848 B)
=== modified file 'mew-summary4.el'
--- old/mew-summary4.el	2011-02-01 02:43:41 +0000
+++ new/mew-summary4.el	2011-06-16 16:55:07 +0000
@@ -1103,7 +1103,7 @@
 	 (if (= (point) beg)
 	     (message "Learning as spam...done")
 	   (setq end (1- (point)))
-	   (message (concat "Learned as spam: " (mew-buffer-substring beg end)))))))))
+	   (message "%s" (concat "Learned as spam: " (mew-buffer-substring beg end)))))))))
 
 (defun mew-summary-learn-ham ()
   "Learn that this message is a ham.
@@ -1127,7 +1127,7 @@
 	 (if (= (point) beg)
 	     (message "Learning as ham...done")
 	   (setq end (1- (point)))
-	   (message (concat "Learned as ham: " (mew-buffer-substring beg end)))))))))
+	   (message "%s" (concat "Learned as ham: " (mew-buffer-substring beg end)))))))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;