all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#23495: byte-compile-file return t when there is "XXX can't use lexical var" error
@ 2016-05-09  8:12 Yuta Yamada
  2016-05-10 18:23 ` Michael Heerdegen
  0 siblings, 1 reply; 7+ messages in thread
From: Yuta Yamada @ 2016-05-09  8:12 UTC (permalink / raw)
  To: 23495

Hello, emacs developers.

I found a weird behavior related to byte compile.

In following code named foo.el, `byte-compile-file' return t even
though there is an error message in compile log buffer.
(The `t' means the compilation was no errors, according to the function's
description.)

---- code ----
;; -*- lexical-binding: t; -*-
(defun foo ()
  (let* ((a nil))
    (add-to-list 'a "foo")))

(provide 'foo)
---- code end ----

In *Compile-Log* buffer, I got:

---- log ----
Compiling /home/uta/local/vcs/github.com/yuutayamada/emacs.d/elisp/self/hoge/foo.el...

In foo:
foo.el:6:13:Error: `add-to-list' can't use lexical var `a'; use `push' or
    `cl-pushnew'
---- log end ----

But actually `byte-compile-file' return `t'.
(I also tried "emacs -Q -batch -f batch-byte-compile ./foo.el", but
I got status code 0 after executing the command.)


I updated emacs (master branch) today.


I'm using cask for testing elisp files, which uses
`byte-recompile-file' function to build .el files, but this
byte compiler error can not detect due to the return value.


Thanks

Yuta





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-05-11 16:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-09  8:12 bug#23495: byte-compile-file return t when there is "XXX can't use lexical var" error Yuta Yamada
2016-05-10 18:23 ` Michael Heerdegen
2016-05-10 23:45   ` Yuta Yamada
2016-05-11  0:29     ` Michael Heerdegen
2016-05-11 11:57       ` Michael Heerdegen
2016-05-11 14:33         ` Yuta Yamada
2016-05-11 16:25           ` Michael Heerdegen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.