← Back to team overview

vm team mailing list archive

[Bug 394456] Re: Problem in vm-su-spam-score-aux

 

** Also affects: vm
   Importance: Undecided
       Status: New

** Changed in: vm
       Status: New => Won't Fix

** Changed in: vm
       Status: Won't Fix => Fix Committed

-- 
Problem in vm-su-spam-score-aux
https://bugs.launchpad.net/bugs/394456
You received this bug notification because you are a member of VM
development team, which is the registrant for vm.

Status in View Mail (aka VM) for Emacs: Fix Committed
Status in VM (View Mail) for Emacs: Fix Committed

Bug description:
vm-su-spam-score-aux errs if the message has no spam-status field.
This patch makes it return 0 in that case.

--- /homes/gws/mernst/emacs/vm-8.0.12/lisp/vm-summary.el	2008-11-05 12:04:35.000000000 -0800
+++ -	2009-07-01 12:49:03.385630020 -0700
@@ -737,7 +737,8 @@
 (defun vm-su-spam-score-aux (m)
   "Return the numeric spam level for M."
   (let ((spam-status (vm-get-header-contents m "X-Spam-Status:")))
-    (if (string-match "\\(hits\\|score\\)=\\([+-]?[0-9.]+\\)" spam-status)
+    (if (and spam-status
+	     (string-match "\\(hits\\|score\\)=\\([+-]?[0-9.]+\\)" spam-status))
         (string-to-number (match-string 2 spam-status))
       0)))