emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r110678: * lisp/emacs-lisp/macroexp.e


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110678: * lisp/emacs-lisp/macroexp.el (macroexp--expand-all):
Date: Fri, 26 Oct 2012 11:59:40 -0400
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110678
fixes bug: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12486
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Fri 2012-10-26 11:59:40 -0400
message:
  * lisp/emacs-lisp/macroexp.el (macroexp--expand-all):
  Obey byte-compile-warning-enabled-p.
modified:
  lisp/ChangeLog
  lisp/emacs-lisp/macroexp.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-10-26 15:51:42 +0000
+++ b/lisp/ChangeLog    2012-10-26 15:59:40 +0000
@@ -1,5 +1,8 @@
 2012-10-26  Stefan Monnier  <address@hidden>
 
+       * 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).
 

=== modified file 'lisp/emacs-lisp/macroexp.el'
--- a/lisp/emacs-lisp/macroexp.el       2012-09-20 13:46:36 +0000
+++ b/lisp/emacs-lisp/macroexp.el       2012-10-26 15:59:40 +0000
@@ -154,11 +154,16 @@
             (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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]