From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#8712: 24.0.50; getting the "Forgot to expand macro XXXX" error - problem? solution? Date: Sun, 22 May 2011 15:14:20 -0300 Message-ID: References: <2A8A1F8AF73C425597ECBB30994D2622@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1306088114 12421 80.91.229.12 (22 May 2011 18:15:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 22 May 2011 18:15:14 +0000 (UTC) Cc: 8712@debbugs.gnu.org To: "Drew Adams" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun May 22 20:15:10 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QODBE-00007h-A1 for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 May 2011 20:15:08 +0200 Original-Received: from localhost ([::1]:42036 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QODBD-0003PP-Gz for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 May 2011 14:15:07 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:49323) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QODBA-0003O5-Ms for bug-gnu-emacs@gnu.org; Sun, 22 May 2011 14:15:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QODB9-0007Tb-DZ for bug-gnu-emacs@gnu.org; Sun, 22 May 2011 14:15:04 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:60054) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QODB9-0007TI-8X for bug-gnu-emacs@gnu.org; Sun, 22 May 2011 14:15:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QODB8-0005Ar-Uk; Sun, 22 May 2011 14:15:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 May 2011 18:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8712 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8712-submit@debbugs.gnu.org id=B8712.130608808819853 (code B ref 8712); Sun, 22 May 2011 18:15:02 +0000 Original-Received: (at 8712) by debbugs.gnu.org; 22 May 2011 18:14:48 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QODAt-0005AA-Dr for submit@debbugs.gnu.org; Sun, 22 May 2011 14:14:47 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QODAq-00059y-Uk for 8712@debbugs.gnu.org; Sun, 22 May 2011 14:14:45 -0400 Original-Received: from [201.254.97.247] (port=54491 helo=ceviche.home) by fencepost.gnu.org with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1QODAl-0001iT-37; Sun, 22 May 2011 14:14:39 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 3173E66131; Sun, 22 May 2011 15:14:20 -0300 (ART) In-Reply-To: <2A8A1F8AF73C425597ECBB30994D2622@us.oracle.com> (Drew Adams's message of "Sat, 21 May 2011 14:00:49 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 22 May 2011 14:15:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:46639 Archived-At: > icicles-cmd1.el:3066:91:Error: Wrong type argument: listp, "Forgot to > expand macro push" I think the patch below fixes your problem, thanks. Please confirm. Stefan === modified file 'lisp/emacs-lisp/bytecomp.el' --- lisp/emacs-lisp/bytecomp.el 2011-05-12 02:36:05 +0000 +++ lisp/emacs-lisp/bytecomp.el 2011-05-22 17:36:39 +0000 @@ -2892,8 +2892,8 @@ That command is designed for interactive use only" fn)) (if (and (fboundp (car form)) (eq (car-safe (symbol-function (car form))) 'macro)) - (byte-compile-report-error - (format "Forgot to expand macro %s" (car form)))) + (byte-compile-log-warning + (format "Forgot to expand macro %s" (car form)) nil :error)) (if (and handler ;; Make sure that function exists. This is important ;; for CL compiler macros since the symbol may be @@ -2991,7 +2991,7 @@ (cond ((<= (+ alen alen) fmax2) ;; Add missing &optional (or &rest) arguments. - (dotimes (i (- (/ (1+ fmax2) 2) alen)) + (dotimes (_ (- (/ (1+ fmax2) 2) alen)) (byte-compile-push-constant nil))) ((zerop (logand fmax2 1)) (byte-compile-log-warning "Too many arguments for inlined function" === modified file 'lisp/emacs-lisp/macroexp.el' --- lisp/emacs-lisp/macroexp.el 2011-03-12 03:32:43 +0000 +++ lisp/emacs-lisp/macroexp.el 2011-05-22 18:11:30 +0000 @@ -169,14 +169,22 @@ ;; here, so that any code that cares about the difference will ;; see the same transformation. ;; First arg is a function: - (`(,(and fun (or `apply `mapcar `mapatoms `mapconcat `mapc)) + (`(,(and fun (or `funcall `apply `mapcar `mapatoms `mapconcat `mapc)) ',(and f `(lambda . ,_)) . ,args) + (byte-compile-log-warning + (format "%s quoted with ' rather than with #'" + (list 'lambda (nth 1 f) '...)) + t) ;; We don't use `maybe-cons' since there's clearly a change. (cons fun (cons (macroexpand-all-1 (list 'function f)) (macroexpand-all-forms args)))) ;; Second arg is a function: (`(,(and fun (or `sort)) ,arg1 ',(and f `(lambda . ,_)) . ,args) + (byte-compile-log-warning + (format "%s quoted with ' rather than with #'" + (list 'lambda (nth 1 f) '...)) + t) ;; We don't use `maybe-cons' since there's clearly a change. (cons fun (cons (macroexpand-all-1 arg1)