diff options
author | Stephen Gildea <stepheng+emacs@gildea.com> | 2021-10-11 18:19:18 -0700 |
---|---|---|
committer | Stephen Gildea <stepheng+emacs@gildea.com> | 2021-10-11 18:20:36 -0700 |
commit | 5deb0ec14f304658bce12809b5c4d97c62eca858 (patch) | |
tree | 686abe14ae398a4d61df4c70976d98a33f32de0c /lisp | |
parent | cf1409db71152926767da189bf044c3a63e77128 (diff) | |
download | emacs-5deb0ec14f304658bce12809b5c4d97c62eca858.tar.gz emacs-5deb0ec14f304658bce12809b5c4d97c62eca858.tar.bz2 emacs-5deb0ec14f304658bce12809b5c4d97c62eca858.zip |
* lisp/mh-e/mh-show.el (mh-junk-whitelist): Custom obsolescence message.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/mh-e/mh-junk.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lisp/mh-e/mh-junk.el b/lisp/mh-e/mh-junk.el index 467667f5afd..2097bcbe1e8 100644 --- a/lisp/mh-e/mh-junk.el +++ b/lisp/mh-e/mh-junk.el @@ -110,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 |