diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-10-26 11:59:40 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2012-10-26 11:59:40 -0400 |
commit | 63314e573028a6b8b75566b05193e34117221d03 (patch) | |
tree | 7c408e8811ee2a051a0e55d88349dcaabef84f0a /lisp/emacs-lisp/macroexp.el | |
parent | a2be03575f558aa741e40cd96fbe208092c3a1e7 (diff) | |
download | emacs-63314e573028a6b8b75566b05193e34117221d03.tar.gz |
* lisp/emacs-lisp/macroexp.el (macroexp--expand-all):
Obey byte-compile-warning-enabled-p.
Fixes: debbugs:12486
Diffstat (limited to 'lisp/emacs-lisp/macroexp.el')
-rw-r--r-- | lisp/emacs-lisp/macroexp.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index cab693fecac..2a3730745c6 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -154,11 +154,16 @@ Assumes the caller has bound `macroexpand-all-environment'." (if (and (not (eq form new-form)) ;It was a macro call. (car-safe form) (symbolp (car form)) - (get (car form) 'byte-obsolete-info)) + (get (car form) 'byte-obsolete-info) + (or (not (fboundp 'byte-compile-warning-enabled-p)) + (byte-compile-warning-enabled-p 'obsolete))) (let* ((fun (car form)) (obsolete (get fun 'byte-obsolete-info))) (macroexp--warn-and-return - (macroexp--obsolete-warning fun obsolete "macro") + (macroexp--obsolete-warning + fun obsolete + (if (symbolp (symbol-function fun)) + "alias" "macro")) new-form)) new-form))) (pcase form |