From: Stefan Monnier Date: Fri, 26 Oct 2012 15:59:40 +0000 (-0400) Subject: * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): X-Git-Tag: emacs-24.2.90~209^2~62 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=63314e573028a6b8b75566b05193e34117221d03;p=emacs.git * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Obey byte-compile-warning-enabled-p. Fixes: debbugs:12486 --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3c1638fd6f8..3473dbf6233 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2012-10-26 Stefan Monnier + * emacs-lisp/macroexp.el (macroexp--expand-all): + Obey byte-compile-warning-enabled-p (bug#12486). + * vc/diff-mode.el (diff-end-of-hunk): Also skip potential "no LF at eol". (diff-refine-hunk): Similarly, handle the "no LF at eol" (bug#12584). 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