From: Glenn Morris Date: Wed, 11 May 2011 16:31:33 +0000 (-0700) Subject: bytecomp.el partial fix for bug#8646. X-Git-Tag: emacs-pretest-24.0.90~104^2~618^2~309 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7d3b9d44989043a707d936561613a4d5afcd47f4;p=emacs.git bytecomp.el partial fix for bug#8646. * lisp/emacs-lisp/bytecomp.el (byte-compile-arglist-warn): Handle symbol elements of byte-compile-initial-macro-environment. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0ac18b35348..642c3fa9e7b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-05-11 Glenn Morris + + * emacs-lisp/bytecomp.el (byte-compile-arglist-warn): + Handle symbol elements of byte-compile-initial-macro-environment. + 2011-05-10 Leo Liu * bookmark.el (bookmark-bmenu-mode-map): Bind diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 6ca8eed8ac6..e8d8993044c 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -1314,7 +1314,15 @@ extra args." ;; number of arguments. (defun byte-compile-arglist-warn (form macrop) (let* ((name (nth 1 form)) - (old (byte-compile-fdefinition name macrop))) + (old (byte-compile-fdefinition name macrop)) + (initial (and macrop + (cdr (assq name + byte-compile-initial-macro-environment))))) + ;; Assumes an element of b-c-i-macro-env that is a symbol points + ;; to a defined function. (Bug#8646) + (and initial (symbolp initial) + (setq old (byte-compile-fdefinition initial nil) + initial 'yes)) (if (and old (not (eq old t))) (progn (and (eq 'macro (car-safe old))