diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2021-11-30 14:38:15 +0100 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2021-11-30 14:38:15 +0100 |
commit | 5fb9a033f896440ffddeb475ee655413eb7f03f2 (patch) | |
tree | 5898c169797d52ab4c598ad24a33e28c352888cb /lisp/emacs-lisp | |
parent | 5cab2684c07b7a5c241aced2e085b9c1792e4bda (diff) | |
download | emacs-5fb9a033f896440ffddeb475ee655413eb7f03f2.tar.gz emacs-5fb9a033f896440ffddeb475ee655413eb7f03f2.tar.bz2 emacs-5fb9a033f896440ffddeb475ee655413eb7f03f2.zip |
Allow inhibiting warnings about obsolete macros again
* lisp/emacs-lisp/macroexp.el (macroexp-macroexpand): Inhibit
warning if requested (bug#50984).
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/macroexp.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index 1e4fdd126cb..66c276e7b78 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -216,10 +216,11 @@ is executed without being compiled first." (let* ((fun (car form)) (obsolete (get fun 'byte-obsolete-info))) (macroexp-warn-and-return - (macroexp--obsolete-warning - fun obsolete - (if (symbolp (symbol-function fun)) - "alias" "macro")) + (and (byte-compile-warning-enabled-p 'obsolete fun) + (macroexp--obsolete-warning + fun obsolete + (if (symbolp (symbol-function fun)) + "alias" "macro"))) new-form 'obsolete)) new-form))) |