]> code.delx.au - gnu-emacs/blobdiff - lisp/gnus/spam.el
Merge from origin/emacs-25
[gnu-emacs] / lisp / gnus / spam.el
index 4ebd8a9f83887f2fa9daa99c48f2d7039a8a8f5c..d3224004f15f65006191e50d19c4341babd1e328 100644 (file)
@@ -1,6 +1,6 @@
 ;;; spam.el --- Identifying spam
 
-;; Copyright (C) 2002-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2002-2016 Free Software Foundation, Inc.
 
 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
 ;; Maintainer: Ted Zlatanov <tzz@lifelogs.com>
@@ -1199,19 +1199,19 @@ Note this has to be fast."
     (if header-content
         (cond
          ((eq header 'X-Spam-Status)
-          (string-to-number (gnus-replace-in-string
-                             header-content
+          (string-to-number (replace-regexp-in-string
                              spam-spamassassin-score-regexp
-                             "\\1")))
+                             "\\1"
+                             header-content)))
          ;; for CRM checking, it's probably faster to just do the string match
          ((string-match "( pR: \\([0-9.-]+\\)" header-content)
           (- (string-to-number (match-string 1 header-content))))
          ((eq header 'X-Bogosity)
-          (string-to-number (gnus-replace-in-string
-                             (gnus-replace-in-string
-                              header-content
-                              ".*spamicity=" "")
-                             ",.*" "")))
+          (string-to-number (replace-regexp-in-string
+                             ",.*" ""
+                             (replace-regexp-in-string
+                              ".*spamicity=" ""
+                              header-content))))
          (t nil))
       nil)))