* bug#12371: 24.2.50; macroexpand-all reporting warnings to *Compile-Log*
@ 2012-09-06 13:58 Christopher Schmidt
2012-09-06 16:46 ` Christopher Schmidt
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Christopher Schmidt @ 2012-09-06 13:58 UTC (permalink / raw)
To: 12371
emacs -q
M-: (macroexpand-all '(mapc '(lambda ()) nil)) RET
Debugger entered--Lisp error: (void-function byte-compile-log-warning)
emacs -q
M-x load-library RET bytecomp RET
M-: (macroexpand-all '(mapc '(lambda ()) nil)) RET
A *Compile-Log* buffer appears, with the following content
Warning: (lambda nil ...) quoted with ' rather than with #'
This is utterly confusing. There is no compilation going on. (Another
user experience regarding this issue can be found in bug report 12362 -
<87392vtj24.fsf@jidanni.org>.)
macroexp--expand-all, which is the originator of the warning, calls
byte-compile-log-warning without consulting byte-compile-warnings.
I think the warning message should include a hint that it was generated
by macroexpanding code and byte-compile-warnings should be consulted as
well.
GNU Emacs 24.2.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) of
2012-09-06.
Christopher
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#12371: 24.2.50; macroexpand-all reporting warnings to *Compile-Log*
2012-09-06 13:58 bug#12371: 24.2.50; macroexpand-all reporting warnings to *Compile-Log* Christopher Schmidt
@ 2012-09-06 16:46 ` Christopher Schmidt
2012-09-19 20:01 ` Stefan Monnier
2012-09-20 1:00 ` bug#12371: macroexp--funcall-if-compiled broke bootstrap for me Paul Eggert
2 siblings, 0 replies; 10+ messages in thread
From: Christopher Schmidt @ 2012-09-06 16:46 UTC (permalink / raw)
To: 12371
Christopher Schmidt <christopher@ch.ristopher.com> writes:
> I think the warning message should include a hint that it was
> generated by macroexpanding code and byte-compile-warnings should be
> consulted as well.
Other macroexpand warnings are simply messaged (e.g. in
internal-macroexpand-for-load).
Christopher
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#12371: 24.2.50; macroexpand-all reporting warnings to *Compile-Log*
2012-09-06 13:58 bug#12371: 24.2.50; macroexpand-all reporting warnings to *Compile-Log* Christopher Schmidt
2012-09-06 16:46 ` Christopher Schmidt
@ 2012-09-19 20:01 ` Stefan Monnier
2012-09-20 1:00 ` bug#12371: macroexp--funcall-if-compiled broke bootstrap for me Paul Eggert
2 siblings, 0 replies; 10+ messages in thread
From: Stefan Monnier @ 2012-09-19 20:01 UTC (permalink / raw)
To: 12371
> macroexp--expand-all, which is the originator of the warning, calls
> byte-compile-log-warning without consulting byte-compile-warnings.
I haven't made such a change yet, but I've modified macroexp.el so that
the message is placed in *Compile-Log* only when byte-compiling.
In other cases it's simply passed to `message'.
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#12371: macroexp--funcall-if-compiled broke bootstrap for me
2012-09-06 13:58 bug#12371: 24.2.50; macroexpand-all reporting warnings to *Compile-Log* Christopher Schmidt
2012-09-06 16:46 ` Christopher Schmidt
2012-09-19 20:01 ` Stefan Monnier
@ 2012-09-20 1:00 ` Paul Eggert
2012-09-20 3:30 ` Stefan Monnier
2 siblings, 1 reply; 10+ messages in thread
From: Paul Eggert @ 2012-09-20 1:00 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 12371
The patch in trunk bzr 110102, with this ChangeLog entry:
2012-09-19 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/macroexp.el (macroexp--funcall-if-compiled): Rename from
macroexp--eval-if-compile.
(macroexp--funcall-and-return, macroexp--warn-and-return): New funs.
(macroexp--expand-all): Use them (bug#12371).
broke "make bootstrap" on my platform (Fedora 17, x86-64, GCC 4.7.1).
The failure symptoms are:
make[2]: Entering directory `/home/eggert/src/gnu/emacs/static-checkina/lisp'
Compiling org/ob-awk.el
In toplevel form:
org/ob-awk.el:97:48:Error: Wrong type argument: symbolp, (\, (car form))
make[2]: *** [org/ob-awk.elc] Error 1
make[2]: Leaving directory `/home/eggert/src/gnu/emacs/static-checkina/lisp'
If I start with trunk latest (bzr 110104) and back
out the changes in 110102, the problem goes away.
I see that bug#12371 is still marked as active so I'll
CC: this there. Macroexpansion is something that makes me
lose too many follicles so I hope someone else can fix this one...
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#12371: macroexp--funcall-if-compiled broke bootstrap for me
2012-09-20 1:00 ` bug#12371: macroexp--funcall-if-compiled broke bootstrap for me Paul Eggert
@ 2012-09-20 3:30 ` Stefan Monnier
2012-09-20 4:56 ` Paul Eggert
0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2012-09-20 3:30 UTC (permalink / raw)
To: Paul Eggert; +Cc: 12371
> * emacs-lisp/macroexp.el (macroexp--funcall-if-compiled): Rename from
> macroexp--eval-if-compile.
> (macroexp--funcall-and-return, macroexp--warn-and-return): New funs.
> (macroexp--expand-all): Use them (bug#12371).
[...]
> org/ob-awk.el:97:48:Error: Wrong type argument: symbolp, (\, (car form))
Oops, sorry. Should be fixed now, thanks,
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#12371: macroexp--funcall-if-compiled broke bootstrap for me
2012-09-20 3:30 ` Stefan Monnier
@ 2012-09-20 4:56 ` Paul Eggert
2012-09-20 5:11 ` Paul Eggert
0 siblings, 1 reply; 10+ messages in thread
From: Paul Eggert @ 2012-09-20 4:56 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 12371
On 09/19/2012 08:30 PM, Stefan Monnier wrote:
> Oops, sorry. Should be fixed now, thanks,
Thanks, it fixed that one, but now I'm getting a different one
with 'make bootstrap':
make[2]: Entering directory `/home/eggert/src/gnu/emacs/static-checking/lisp'
Compiling org/ob-calc.el
In toplevel form:
org/ob-calc.el:30:1:Error: Wrong type argument: stringp, t
make[2]: *** [org/ob-calc.elc] Error 1
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#12371: macroexp--funcall-if-compiled broke bootstrap for me
2012-09-20 4:56 ` Paul Eggert
@ 2012-09-20 5:11 ` Paul Eggert
2012-09-20 8:21 ` Troels Nielsen
0 siblings, 1 reply; 10+ messages in thread
From: Paul Eggert @ 2012-09-20 5:11 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 12371
On 09/19/2012 09:56 PM, Paul Eggert wrote:
> make[2]: Entering directory `/home/eggert/src/gnu/emacs/static-checking/lisp'
> Compiling org/ob-calc.el
This one appears to be due to the following recent change,
trunk bzr 110109, in the sense that backing out this change
makes the problem go away:
2012-09-20 Stefan Monnier <monnier@iro.umontreal.ca>
* calc/calc.el: Remove redundant autoload shape check.
(sel-mode): Don't defvar.
(calc-get-stack-element): Add `sel-mode' arg instead.
(calc-top, calc-top-list): Pass it this additional argument.
* calc/calc-store.el (calc-store-map):
* calc/calc-map.el (calc-apply, calc-reduce, calc-map)
(calc-map-equation, calc-outer-product, calc-inner-product):
* calc/calc-aent.el (calc-alg-entry): Don't bind sel-mode.
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#12371: macroexp--funcall-if-compiled broke bootstrap for me
2012-09-20 5:11 ` Paul Eggert
@ 2012-09-20 8:21 ` Troels Nielsen
2012-09-20 12:43 ` Stefan Monnier
0 siblings, 1 reply; 10+ messages in thread
From: Troels Nielsen @ 2012-09-20 8:21 UTC (permalink / raw)
To: Paul Eggert; +Cc: 12371
I've run into the same problems this morning, and this patch solves
the problems for me:
The first one I think just is a line gone missing. The next chunk
extracts (car form) before it's to late, as form goes about being
changed before the closure is being called.
Kind Regards
Troels Nielsen
=== modified file 'lisp/calc/calc.el'
--- lisp/calc/calc.el 2012-09-20 03:44:57 +0000
+++ lisp/calc/calc.el 2012-09-20 07:50:18 +0000
@@ -914,9 +914,9 @@
;; Set up the autoloading linkage.
(let ((name (and (fboundp 'calc-dispatch)
- (autoloadp (symbol-function 'calc-dispatch))))
+ (autoloadp (symbol-function 'calc-dispatch))
+ (nth 1 (symbol-function 'calc-dispatch))))
(p load-path))
;; If Calc files exist on the load-path, we're all set.
(while (and p (not (file-exists-p
(expand-file-name "calc-misc.elc" (car p)))))
=== modified file 'lisp/emacs-lisp/macroexp.el'
--- lisp/emacs-lisp/macroexp.el 2012-09-20 03:29:41 +0000
+++ lisp/emacs-lisp/macroexp.el 2012-09-20 07:51:54 +0000
@@ -148,10 +148,11 @@
(car-safe form)
(symbolp (car form))
(get (car form) 'byte-obsolete-info))
- (macroexp--funcall-and-return
- (lambda () (byte-compile-warn-obsolete (car form)))
- #'ignore ;FIXME: We should `message' something.
- new-form)
+ (let ((sym (car form)))
+ (macroexp--funcall-and-return
+ (lambda () (byte-compile-warn-obsolete sym))
+ #'ignore ;FIXME: We should `message' something.
+ new-form))
new-form)))
(pcase form
(`(cond . ,clauses)
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#12371: macroexp--funcall-if-compiled broke bootstrap for me
2012-09-20 8:21 ` Troels Nielsen
@ 2012-09-20 12:43 ` Stefan Monnier
2012-09-20 14:16 ` Stefan Monnier
0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2012-09-20 12:43 UTC (permalink / raw)
To: Troels Nielsen; +Cc: Paul Eggert, 12371
> I've run into the same problems this morning, and this patch solves
> the problems for me:
> The first one I think just is a line gone missing.
No, I removed that line on purpose (an autoload entry shouldn't have
a nil in position 1, so it should be a redundant test).
> The next chunk extracts (car form) before it's to late, as form goes
> about being changed before the closure is being called.
Duh, sorry 'bout that. Please install your patch,
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* bug#12371: macroexp--funcall-if-compiled broke bootstrap for me
2012-09-20 12:43 ` Stefan Monnier
@ 2012-09-20 14:16 ` Stefan Monnier
0 siblings, 0 replies; 10+ messages in thread
From: Stefan Monnier @ 2012-09-20 14:16 UTC (permalink / raw)
To: Troels Nielsen; +Cc: Paul Eggert, 12371-done
>> The first one I think just is a line gone missing.
> No, I removed that line on purpose (an autoload entry shouldn't have
> a nil in position 1, so it should be a redundant test).
That was a brain malfunction, sorry. Should be fixed now.
>> The next chunk extracts (car form) before it's to late, as form goes
>> about being changed before the closure is being called.
> Duh, sorry 'bout that. Please install your patch,
I actually installed a different patch instead, which does what your did
plus removes a FIXME.
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-09-20 14:16 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-06 13:58 bug#12371: 24.2.50; macroexpand-all reporting warnings to *Compile-Log* Christopher Schmidt
2012-09-06 16:46 ` Christopher Schmidt
2012-09-19 20:01 ` Stefan Monnier
2012-09-20 1:00 ` bug#12371: macroexp--funcall-if-compiled broke bootstrap for me Paul Eggert
2012-09-20 3:30 ` Stefan Monnier
2012-09-20 4:56 ` Paul Eggert
2012-09-20 5:11 ` Paul Eggert
2012-09-20 8:21 ` Troels Nielsen
2012-09-20 12:43 ` Stefan Monnier
2012-09-20 14:16 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).