summaryrefslogtreecommitdiff
path: root/lisp/mh-e/mh-junk.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/mh-e/mh-junk.el')
-rw-r--r--lisp/mh-e/mh-junk.el14
1 files changed, 11 insertions, 3 deletions
diff --git a/lisp/mh-e/mh-junk.el b/lisp/mh-e/mh-junk.el
index 6c3674811b0..2097bcbe1e8 100644
--- a/lisp/mh-e/mh-junk.el
+++ b/lisp/mh-e/mh-junk.el
@@ -31,6 +31,8 @@
(require 'mh-e)
(require 'mh-scan)
+(autoload 'mail-header-parse-address "mail-parse")
+
;;;###mh-autoload
(defun mh-junk-blocklist (range)
"Blocklist RANGE as spam.
@@ -108,8 +110,15 @@ message(s) as specified by the option `mh-junk-disposition'."
;;;###mh-autoload
(defun mh-junk-whitelist (range)
"Old name for `mh-junk-allowlist'; use \\[mh-junk-allowlist] instead."
- (declare (obsolete mh-junk-allowlist "28.1"))
(interactive (list (mh-interactive-range "Allowlist")))
+ ;; We do our own message here instead of using "declare obsolete"
+ ;; in order to talk about keys instead of function names. Also, it
+ ;; lets us bind "J w" to this without the Emacs 29 compiler complaining.
+ (when (not (get 'mh-junk-whitelist 'command-execute-obsolete-warned))
+ (message "%s is an obsolete key (as of 28.1); use %s instead"
+ (substitute-command-keys "\\[mh-junk-whitelist]")
+ (substitute-command-keys "\\[mh-junk-allowlist]"))
+ (put 'mh-junk-whitelist 'command-execute-obsolete-warned t))
(mh-junk-allowlist range))
;;;###mh-autoload
@@ -312,8 +321,7 @@ See `mh-spamassassin-blocklist' for more information."
"--ham" "--local" "--no-sync")))
(message "Allowlisting sender of message %d..." msg)
(setq from
- (car (mh-funcall-if-exists
- ietf-drums-parse-address (mh-get-header-field "From:"))))
+ (car (mail-header-parse-address (mh-get-header-field "From:"))))
(kill-buffer nil)
(if (or (null from) (equal from ""))
(message "Allowlisting sender of message %d...%s"