[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#23495: byte-compile-file return t when there is "XXX can't use lexic
bug#23495: byte-compile-file return t when there is "XXX can't use lexical var" error
Mon, 09 May 2016 01:12:43 -0700 (PDT)
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
---- code ----
;; -*- lexical-binding: t; -*-
(defun foo ()
(let* ((a nil))
(add-to-list 'a "foo")))
---- code end ----
In *Compile-Log* buffer, I got:
---- log ----
foo.el:6:13:Error: `add-to-list' can't use lexical var `a'; use `push' or
---- 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.
- bug#23495: byte-compile-file return t when there is "XXX can't use lexical var" error,
Yuta Yamada <=