GNU bug report logs -
#8712
24.0.50; getting the "Forgot to expand macro XXXX" error - problem? solution?
Previous Next
Reported by: "Drew Adams" <drew.adams <at> oracle.com>
Date: Sat, 21 May 2011 21:02:02 UTC
Severity: normal
Found in version 24.0.50
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> 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)
This bug report was last modified 13 years and 315 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.