]> git.eshelyaron.com Git - emacs.git/commit
Fix spurious "Lexical argument shadows the dynamic variable" due to inlining
authorStefan Monnier <monnier@iro.umontreal.ca>
Thu, 21 Jan 2021 18:15:05 +0000 (13:15 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Thu, 21 Jan 2021 18:15:05 +0000 (13:15 -0500)
commitb41b4add7bc2485fadc6ff3a890efbd1307b2351
treec9a07528185cd511820635a04abbfbd0329218e3
parent931be5ee7d618904361ab2d434d3901cbd9abc9a
Fix spurious "Lexical argument shadows the dynamic variable" due to inlining

Before this patch doing:

    rm lisp/calendar/calendar.elc
    make lisp/calendar/cal-hebrew.elc

would spew out lots of spurious such warnings about a `date` argument,
pointing to code which has no `date` argument in sight.  This was
because that code had calls to inlinable functions (taking a `date`
argument) defined in `calendar.el`, and while `date` is a normal
lexical var at the site of those functions' definitions, it was
declared as dynbound at the call site.

* lisp/emacs-lisp/byte-opt.el (byte-compile-inline-expand):
Don't impose our local context onto the inlined function.

* test/lisp/emacs-lisp/bytecomp-tests.el: Add matching test.
lisp/emacs-lisp/byte-opt.el
test/lisp/emacs-lisp/bytecomp-resources/foo-inlinable.el [new file with mode: 0644]
test/lisp/emacs-lisp/bytecomp-resources/nowarn-inline-after-defvar.el [new file with mode: 0644]
test/lisp/emacs-lisp/bytecomp-tests.el