X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/21733e4f154f8830fa568a347a0d6dbd59793c2b..68ce800e9200724d36a0b1bf1923401682bce96d:/lisp/gnus/spam-report.el diff --git a/lisp/gnus/spam-report.el b/lisp/gnus/spam-report.el index 06aae2906c..88854e0425 100644 --- a/lisp/gnus/spam-report.el +++ b/lisp/gnus/spam-report.el @@ -1,6 +1,6 @@ ;;; spam-report.el --- Reporting spam -;; Copyright (C) 2002-2013 Free Software Foundation, Inc. +;; Copyright (C) 2002-2016 Free Software Foundation, Inc. ;; Author: Ted Zlatanov ;; Keywords: network, spam, mail, gmane, report @@ -43,7 +43,7 @@ If you are using spam.el, consider setting gnus-spam-process-newsgroups or the gnus-group-spam-exit-processor-report-gmane group/topic parameter instead." :type '(radio (const nil) - (regexp :value "^nntp\+.*:gmane\.")) + (regexp :value "^nntp\\+.*:gmane\\.")) :group 'spam-report) (defcustom spam-report-gmane-use-article-number t @@ -81,7 +81,7 @@ The function must accept the arguments `host' and `report'." "Email address that spam articles are resent to when reporting. If not set, the user will be prompted to enter a value which will be saved for future use." - :type 'string + :type '(choice (const :tag "Prompt" nil) string) :group 'spam-report) (defvar spam-report-url-ping-temp-agent-function nil @@ -162,13 +162,13 @@ submitted at once. Internal variable.") rpt-host (concat "/" - (gnus-replace-in-string - (gnus-replace-in-string - (gnus-replace-in-string - (mail-header-xref (gnus-summary-article-header article)) - "/raw" ":silent") - "^.*article.gmane.org/" "") - "/" ":")))) + (replace-regexp-in-string + "/" ":" + (replace-regexp-in-string + "^.*article.gmane.org/" "" + (replace-regexp-in-string + "/raw" ":silent" + (mail-header-xref (gnus-summary-article-header article)))))))) (spam-report-gmane-use-article-number (spam-report-url-ping rpt-host @@ -207,8 +207,8 @@ submitted at once. Internal variable.") (when host (when (string-equal "permalink.gmane.org" host) (setq host rpt-host) - (setq report (gnus-replace-in-string - report "/\\([0-9]+\\)$" ":\\1"))) + (setq report (replace-regexp-in-string "/\\([0-9]+\\)$" ":\\1" + report))) (setq url (format "http://%s%s" host report))) (if (not (and host report url)) (gnus-message @@ -227,7 +227,7 @@ the function specified by `spam-report-url-ping-function'." (defcustom spam-report-user-mail-address (and (stringp user-mail-address) - (gnus-replace-in-string user-mail-address "@" "")) + (replace-regexp-in-string "@" "" user-mail-address)) "Mail address of this user used for spam reports to Gmane. This is initialized based on `user-mail-address'." :type '(choice string @@ -255,7 +255,7 @@ This is initialized based on `user-mail-address'." 80)) (error "Could not open connection to %s" host)) (set-marker (process-mark tcp-connection) (point-min)) - (gnus-set-process-query-on-exit-flag tcp-connection nil) + (set-process-query-on-exit-flag tcp-connection nil) (process-send-string tcp-connection (format "GET %s HTTP/1.1\nUser-Agent: %s\nHost: %s\n\n" @@ -297,8 +297,7 @@ symbol `ask', query before flushing the queue file." (re-search-forward "http://\\([^/]+\\)\\(/.*\\) *$" (point-at-eol) t)) (let ((spam-report-gmane-wait - (zerop (% (mm-line-number-at-pos) - spam-report-gmane-max-requests)))) + (zerop (% (line-number-at-pos) spam-report-gmane-max-requests)))) (gnus-message 6 "Reporting %s%s..." (match-string 1) (match-string 2)) (funcall spam-report-url-ping-function @@ -307,7 +306,7 @@ symbol `ask', query before flushing the queue file." (if (or (eq keep nil) (and (eq keep 'ask) (y-or-n-p - (format + (format-message "Flush requests from `%s'? " (current-buffer))))) (progn (gnus-message 7 "Flushing request file `%s'"