summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
Commit message (Collapse)AuthorAgeFilesLines
* Edebug: Make it possible to debug `gv-expander`s in `declare`Stefan Monnier2021-02-122-4/+13
| | | | | | | | | | | | | | | | | Arrange for declarations to be able to specify their own specs via the `edebug-declaration-spec` property. * lisp/emacs-lisp/edebug.el: (edebug--get-declare-spec): New function. (def-declarations): New spec element. (defun, defmacro): Use it in their spec. * lisp/emacs-lisp/gv.el (gv-expander, gv-setter): Set `edebug-declaration-spec`. * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests-gv-expander): New test. * test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el (edebug-test-code-use-gv-expander): New test case.
* Edebug: Overload `edebug-form-spec` even lessStefan Monnier2021-02-123-214/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `edebug-form-spec` symbol property was used both to map forms's head symbol to the corresponding spec, and to map spec element names to their expansion. This lead to name conflicts which break instrumentation of examples such as (cl-flet ((gate (x) x)) (gate 4)) because of the Edebug spec element `gate`. So introduce a new symbol property `edebug-elem-spec`. * lisp/subr.el (def-edebug-elem-spec): New function. * lisp/emacs-lisp/edebug.el (edebug--get-elem-spec): New function. (edebug-match-symbol): Use it. (Core Edebug elems): Put them on `edebug-elem-spec` instead of `edebug-form-spec`. (ELisp special forms): Set their `edebug-form-spec` via dolist. (Other non-core Edebug elems): Use `def-edebug-elem-spec`. (edebug-\`): Use `declare`. * lisp/emacs-lisp/pcase.el (pcase-PAT, pcase-FUN, pcase-QPAT): * lisp/skeleton.el (skeleton-edebug-spec): * lisp/emacs-lisp/cl-macs.el: Use `def-edebug-elem-spec`. * test/lisp/emacs-lisp/edebug-tests.el (edebug-tests--conflicting-internal-names): New test. * test/lisp/emacs-lisp/edebug-resources/edebug-test-code.el (edebug-test-code-cl-flet1): New test case. * doc/lispref/edebug.texi (Specification List): Add `def-edebug-elem-spec`. (Specification Examples): Use it. * doc/lispref/loading.texi (Hooks for Loading): Avoid the use of `def-edebug-spec` in example (better use `debug` declaration).
* Fix ElDoc setup for eval-expressionBasil L. Contovounesios2021-02-121-1/+2
| | | | | * lisp/emacs-lisp/eldoc.el (eldoc--eval-expression-setup): Don't set global value of eldoc-documentation-strategy (bug#44886).
* Use `declare` instead of `def-edebug-spec` in most placesStefan Monnier2021-02-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/speedbar.el: Use lexical-binding. (speedbar-with-writable): Use `declare`. * lisp/subr.el (def-edebug-spec): Use `declare`. * lisp/cedet/ede/base.el: Use lexical-binding. (ede-with-projectfile): Use `declare`. (recentf-exclude): Declare var. * lisp/cedet/ede/pmake.el: Use lexical-binding. (ede-pmake-insert-variable-shared, ede-pmake-insert-variable-once): Use `declare`. * lisp/cedet/ede/proj-comp.el: Use lexical-binding. (ede-compiler-begin-unique, ede-compiler-only-once) (ede-linker-begin-unique, ede-linker-only-once): Use `declare`. * lisp/cedet/semantic/ctxt.el: Use lexical-binding. (semantic-with-buffer-narrowed-to-context) (semantic-with-buffer-narrowed-to-command): Use `declare`. (semantic--progress-reporter): Declare var. (semantic-ctxt-end-of-symbol-default): Remove unused var `fieldsep`. * lisp/cedet/semantic/lex-spp.el: Use lexical-binding. (define-lex-spp-macro-declaration-analyzer) (define-lex-spp-include-analyzer, semantic-lex-with-macro-used) (define-lex-spp-macro-undeclaration-analyzer): Use `declare`. (semantic-lex-spp-symbol-remove): Rename arg to avoid colliding with dynamic variable `obarray`. (semantic-lex-spp-symbol-pop): Remove unused var `oldvalue`. (semantic-lex-spp-lex-text-string): Remove unused var `analyzer`. * lisp/cedet/semantic/lex.el (define-lex) (semantic-lex-unterminated-syntax-protection, define-lex-analyzer) (define-lex-regex-analyzer, define-lex-block-analyzer) (semantic-lex-catch-errors): Use `declare`. * lisp/cedet/semantic/tag.el: Use lexical-binding. (semantic-with-buffer-narrowed-to-current-tag) (semantic-with-buffer-narrowed-to-tag): Use `declare`. * lisp/cedet/semantic/wisent.el: Use lexical-binding. (define-wisent-lexer): Use `declare`. * lisp/emacs-lisp/cl-lib.el (cl-pushnew): The arg to :test can be any form not just function form. * lisp/org/ob-comint.el (org-babel-comint-in-buffer) (org-babel-comint-with-output): Use `declare`. * lisp/org/ob-core.el (org-babel-map-src-blocks): Use `declare`. (org-babel-result-cond): Simplify edebug spec. * lisp/org/org-clock.el (org-with-clock-position, org-with-clock): * lisp/org/org-agenda.el (org-agenda-with-point-at-orig-entry): * lisp/org/ob-tangle.el (org-babel-with-temp-filebuffer): Use `declare`. * lisp/textmodes/rst.el (push): Remove redundant edebug spec. * lisp/vc/pcvs-parse.el: Use lexical-binding. (cvs-parse-buffer): Rename arg to avoid dynbound conflict. (cvs-or): Use `declare`.
* Simplify expression in byte-code decompilerMattias Engdegård2021-02-121-4/+1
| | | | | * lisp/emacs-lisp/byte-opt.el (byte-decompile-bytecode-1): Replace roundabout expression with what it essentially does.
* byte-opt.el: More concise expressionMattias Engdegård2021-02-121-10/+9
| | | | | * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Refactor `setq` clause.
* Avoid traversing dead `if` branches in bytecode optimiserMattias Engdegård2021-02-121-32/+32
| | | | | | | | | | | | | | | | | | | | There is no point in traversing conditional branches that are statically known never to be executed. This saves some optimisation effort, but more importantly prevents variable assignments and references in those branches from blocking effective constant propagation. Also attempt to traverse as much as possible in an unconditional context, which enables constant-propagation through (linear) assignments. * lisp/emacs-lisp/byte-opt.el (byte-optimize-form): Rewrite the (tail) recursion into an explicit loop. Normalise a return value of (quote nil) to nil, for easier subsequent optimisations. * lisp/emacs-lisp/byte-opt.el (byte-optimize-form-code-walker): Don't traverse dead `if` branches. Use unconditional traversion context when possible.
* * lisp/emacs-lisp/edebug.el (edebug--handle-&-spec-op) <&lookup>: New methodStefan Monnier2021-02-122-27/+30
| | | | | | | | | * doc/lispref/edebug.texi (Specification List): Document it. * lisp/emacs-lisp/pcase.el (pcase-PAT): Use it. (pcase-MACRO): Remove Edebug element. (pcase--get-edebug-spec): New function. (pcase--edebug-match-macro): Remove function.
* * lisp/emacs-lisp/cl-macs.el (cl-flet): Fix edebug specStefan Monnier2021-02-121-1/+1
|
* * lisp/emacs-lisp/edebug.el: Misc cleanups.Stefan Monnier2021-02-122-69/+62
| | | | | | | | | | | | | | | | | | Move all definitions under the `edebug-` prefix. (edebug-get-spec): Rename from `get-edebug-spec`. (edebug-move-cursor): Use `cl-callf`. (edebug-spec-p): Remove unused function. (def-edebug-spec, edebug-spec-list, edebug-spec): Remove unused specs (nothing in there gets instrumented anyway). (edebug-tracing): Use `declare`. (edebug-cancel-on-entry): Rename from `cancel-edebug-on-entry`. (edebug-global-prefix): Rename from `global-edebug-prefix`. (edebug-global-map): Rename from `global-edebug-map`. * lisp/emacs-lisp/pcase.el (pcase-PAT): Remove `let`. (let): Use `declare` instead. (pcase--edebug-match-macro): Use new name `edebug-get-spec`.
* * lisp/emacs-lisp/gv.el (gv-place): SimplifyStefan Monnier2021-02-111-1/+1
|
* * lisp/emacs-lisp/macroexp.el (macroexp--fgrep): Break cyclesStefan Monnier2021-02-101-14/+29
| | | | * test/lisp/emacs-lisp/macroexp-tests.el: New file.
* * lisp/emacs-lisp/edebug.el: Tweak last changeStefan Monnier2021-02-101-37/+22
| | | | | | | | | | | | | | | Use generic functions i.s.o `edebug--spec-op-function`. <toplevel>: No need to register the &foo and :foo handler any more. (edebug--handle-&-spec-op, edebug--handle-:-spec-op): New generic functions. (edebug-match-specs): Use them. (edebug--get-spec-op): Remove function. (edebug-match-&optional, edebug-match-&rest, edebug-match-&or) (edebug-match-&not, edebug-match-&key, edebug-match-&error) (edebug-match-&define): Turn functions into methods of `edebug--handle-&-spec-op`. (edebug-match-:name, edebug-match-:unique): Turn functions into methods of `edebug--handle-:-spec-op`.
* * list/emacs-lisp/edebug.el: Don't overload `edebug-form-spec`Stefan Monnier2021-02-101-13/+28
| | | | | | | | | | | | | | | | | | The `edebug-form-spec` symbol property was used to store two different things: the handlers for spec elements like `body` and the handlers for spec operators like `&or`. But these two sets use different calling conventions, so they're fundamentally incompatible. So, move the handlers to spec operators to the new property `edebug--spec-op-function`. This unbreaks Edebugging of: (cl-flet ((f (&rest x) x)) 3) * lisp/emacs-lisp/edebug.el <toplevel>: Split the alist of built in spec elements into normal spec element and spec ops. (edebug--get-spec-op): New function. (edebug-match-specs): Use it. (edebug-match-:name): Rename from `edebug-match-colon-name`.
* Fix local defvar scoping error (bug#46387)Mattias Engdegård2021-02-101-2/+2
| | | | | | | | | | | | This bug was introduced by the lexical variable constant propagation mechanism. It was discovered by Michael Heerdegen. * lisp/emacs-lisp/byte-opt.el (byte-optimize-let-form) (byte-optimize-body): Let the effects of a local defvar declaration be scoped by let and let*, not any arbitrary Lisp expression body (such as progn). * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--get-vars) (bytecomp-local-defvar): New test.
* * lisp/emacs-lisp/byte-opt.el (byte-optimize--pcase): New macroStefan Monnier2021-02-091-20/+50
| | | | (byte-optimize-form-code-walker): Use it.
* * lisp/emacs-lisp/macroexp.el: Break cycle with bytecomp/byte-optStefan Monnier2021-02-093-78/+68
| | | | | | | | | | | | | | | | | The recent change in macroexp triggered a cyclic dependency error during eager macroexpansion when neither `bytecomp` nor `byte-opt` had been byte-compiled yet. This fixes it by moving the offending function to macroexp.el. * lisp/emacs-lisp/macroexp.el (macroexp--unfold-lambda): Move from byte-opt.el and rename. (macroexp--expand-all): Use it. * lisp/emacs-lisp/byte-opt.el (byte-compile-unfold-lambda): Move to macroexp.el. (byte-compile-inline-expand, byte-optimize-form-code-walker): * lisp/emacs-lisp/bytecomp.el (byte-compile-form): Use `macroexp--unfold-lambda` instead.
* Remove some dead, commented out code from lisp-mode.elStefan Kangas2021-02-091-3/+0
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-data-mode-syntax-table): Remove code commented out since 2005.
* Preserve leading whitespace in `lm-commentary'.Matt Armstrong2021-02-091-1/+1
| | | | | * lisp/emacs-lisp/lisp-mnt.el (lm-commentary): Preserve leading whitespace (bug#46364).
* Move all usages of `values' to `values--store-value'Lars Ingebrigtsen2021-02-092-5/+7
| | | | | | | | | | | | | * lisp/simple.el (eval-expression): * lisp/progmodes/elisp-mode.el (eval-last-sexp): * lisp/emacs-lisp/pp.el (pp-eval-expression): * lisp/emacs-lisp/edebug.el (edebug-eval-expression): * lisp/emacs-lisp/pp.el (pp-eval-expression): * lisp/emacs-lisp/edebug.el (edebug-eval-expression): * lisp/cedet/data-debug.el (data-debug-eval-expression): Use it instead of pushing to `values' directly (bug#22066). * lisp/subr.el (values--store-value): New function.
* ; Minor license statement fixesStefan Kangas2021-02-081-0/+2
|
* ; * lisp/emacs-lisp/byte-opt.el: improved commentMattias Engdegård2021-02-071-1/+1
|
* ; Improved commentary in the variable constprop mechanismMattias Engdegård2021-02-071-8/+13
| | | | | | | | * lisp/emacs-lisp/byte-opt.el (byte-optimize--lexvars) (byte-optimize--vars-outside-condition) (byte-optimize-form-code-walker, byte-optimize-let-form): Clarify various aspects in the variable constant-propagation code, as kindly pointed out by Stefan Monnier.
* Constprop of lexical variablesMattias Engdegård2021-02-061-70/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | Lexical variables bound to a constant value (symbol, number or string) are substituted at their point of use and the variable then eliminated if possible. Example: (let ((x (+ 2 3))) (f x)) => (f 5) This reduces code size, eliminates stack operations, and enables further optimisations. The implementation is conservative, and is strongly curtailed by the presence of variable mutation, conditions and loops. * lisp/emacs-lisp/byte-opt.el (byte-optimize-enable-variable-constprop) (byte-optimize-warn-eliminated-variable): New constants. (byte-optimize--lexvars, byte-optimize--vars-outside-condition) (byte-optimize--vars-outside-loop, byte-optimize--dynamic-vars): New dynamic variables. (byte-optimize--substitutable-p, byte-optimize-let-form): New functions. (byte-optimize-form-code-walker): Adapt clauses for variable constprop, and add clauses for 'setq' and 'defvar'. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-test-var) (bytecomp-test-get-var, bytecomp-test-identity) (byte-opt-testsuite-arith-data): Add test cases.
* Fix previous change in testcover.elLars Ingebrigtsen2021-02-061-4/+4
| | | | | | * lisp/emacs-lisp/testcover.el (testcover-analyze-coverage-edebug-after): The wrapper macro is called `1value', not `testcover-1value'.
* Rename the `1value' symbol in testcover.elLars Ingebrigtsen2021-02-061-30/+30
| | | | | | * lisp/emacs-lisp/testcover.el: Rename the symbol `1value' throughout the file to `testcover-1value' to allow using the variable in code that's to be tested (bug#25471).
* Avoid a compilation warning in iter-doLars Ingebrigtsen2021-02-061-9/+12
| | | | | | * lisp/emacs-lisp/generator.el (iter-do): Avoid a compilation warning on using variables marked for not using (bug#31641). Eg. (iter-do (_ i))
* * lisp/emacs-lisp/pcase.el (let): Reimplement as a pcase macroStefan Monnier2021-02-051-13/+6
| | | | | (pcase--macroexpand, pcase--u1): Remove handling of `let` from `pcase`s core.
* * lisp/emacs-lisp/checkdoc.el: Doc fix; don't mention built-ins.Stefan Kangas2021-02-051-7/+0
|
* Improve filling of Emacs Lisp doc stringsLars Ingebrigtsen2021-02-041-1/+18
| | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-fill-paragraph): When filling a Lisp string, try to avoid filling bits that follow it (bug#28937).
* Allow a :variable keyword in define-globalized-minor-modeLars Ingebrigtsen2021-02-041-1/+3
| | | | | | | * doc/lispref/modes.texi (Defining Minor Modes): Document it. * lisp/emacs-lisp/easy-mmode.el (define-globalized-minor-mode): Allow specifying a :variable to be used if the underlying mode has a divergent variable to store the state (bug#29081).
* Remove some unnecessary references to Emacs 19Stefan Kangas2021-02-041-2/+1
| | | | | | | | | * lisp/emacs-lisp/elp.el: * lisp/mouse-copy.el: * lisp/mouse-drag.el: * lisp/progmodes/simula.el (simula-mode-map): * lisp/term.el (term-matching-input-from-input-string): * lisp/vcursor.el: Doc fix; don't mention Emacs 19.
* Remove XEmacs compat code from edebug.elStefan Kangas2021-02-041-11/+14
| | | | | * lisp/emacs-lisp/edebug.el (edebug-window-live-p, edebug-mark): Make obsolete. Update callers.
* * lisp/gnus/gnus-art.el: Fix misuse of `standard-value`.Stefan Monnier2021-02-021-2/+1
| | | | | | | | | | * lisp/custom.el (custom--standard-value): New function. * lisp/gnus/gnus-art.el: (gnus-article-browse-html-parts) (gnus-article-browse-html-article): * lisp/dired-aux.el (dired-do-find-regexp-and-replace): * lisp/emacs-lisp/package-x.el (package-upload-buffer-internal): * lisp/startup.el (command-line): Use it.
* * lisp/emacs-lisp/lisp-mode.el (lisp-mode): Also set `comment-end-skip`Stefan Monnier2021-02-021-0/+1
|
* Fix |# fontification in lisp-modechuntaro2021-02-021-0/+1
| | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-mode): Give the |# the correct (font-lock-comment-delimited-face) face (bug#39820). Copyright-paperwork-exempt: yes
* Prefer defvar-local in emacs-lisp/*.elStefan Kangas2021-01-316-20/+10
| | | | | | | | | | | | * lisp/emacs-lisp/chart.el (chart-local-object): * lisp/emacs-lisp/easy-mmode.el (define-minor-mode) (define-globalized-minor-mode): * lisp/emacs-lisp/edebug.el: * lisp/emacs-lisp/generic.el (generic-font-lock-keywords): * lisp/emacs-lisp/re-builder.el (reb-regexp, reb-regexp-src) (reb-overlays): * lisp/emacs-lisp/syntax.el (syntax-propertize-extend-region-functions): Prefer defvar-local.
* Revert "Improve fontifying of #| ... |# in `lisp-mode'"Lars Ingebrigtsen2021-01-311-1/+0
| | | | | | This reverts commit 1275dc4711af77c9c223063dcd149d782d497463. Setting comment-end isn't the correct thing to do -- it makes M-; insert that string.
* Improve fontifying of #| ... |# in `lisp-mode'Lars Ingebrigtsen2021-01-291-0/+1
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp-mode): Fontify the end delimiter in #| ... |# correctly (bug#39820).
* Fix position in empty buffers in checkdoc-file-comments-engineLars Ingebrigtsen2021-01-291-1/+3
| | | | | * lisp/emacs-lisp/checkdoc.el (checkdoc-file-comments-engine): Don't give invalid positions on empty buffers (bug#39987).
* Use lexical-binding in all of `lisp/emacs-lisp`Stefan Monnier2021-01-2811-130/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lisp/emacs-lisp/bindat.el: Use lexical-binding. (bindat--unpack-group, bindat--length-group, bindat--pack-group): Declare `last` and `tag` as dyn-scoped. (bindat-unpack, bindat-pack): Bind `bindat-raw` and `bindat-idx` via `let` rather than via the formal arglist. * lisp/emacs-lisp/package-x.el: * lisp/emacs-lisp/generic.el: * lisp/emacs-lisp/eieio-opt.el: * lisp/emacs-lisp/derived.el: * lisp/emacs-lisp/crm.el: Use lexical-binding. * lisp/emacs-lisp/helper.el: Use lexical-binding. (Helper-help-map): Move initialization into declaration. * lisp/emacs-lisp/regi.el: Use lexical-binding. (regi-interpret): Remove unused var `tstart`. Declare `curframe`, `curentry` and `curline` as dyn-scoped. * lisp/emacs-lisp/shadow.el: Use lexical-binding. (load-path-shadows-find): Remove unused var `file`. Tighten a regexp, use `push`. * lisp/emacs-lisp/tcover-ses.el: Use lexical-binding. Require `ses`. Remove correspondingly redundant declarations. (ses--curcell-overlay): Declare. (ses-exercise): Use `dlet` and use a properly-prefixed var name. Fix name of `curcell-overlay` variable. * lisp/emacs-lisp/unsafep.el: Use lexical-binding. (unsafep): Bind `unsafep-vars` via `let` rather than via the formal arglist.
* * lisp/emacs-lisp/macroexp.el (macroexp-if): Fix typoStefan Monnier2021-01-271-1/+1
|
* * lisp/emacs-lisp/pcase.el (pcase--split-pred): Handle `memq` pred.Stefan Monnier2021-01-271-17/+27
| | | | | | | | | | | | | | | | | | | | Improve handling of the `member` tests generated from (or 'a 'b 'c). This will expand (pcase EXP ((and (or 1 2 3) (guard (FOO))) EXP1) (1 EXP2) (6 EXP3)) to (cond ((memql '(3 2 1) EXP) (cond ((FOO) EXP1) ((eql EXP 1) EXP2))) ((eql EXP 6) EXP3)) rather than to (cond ((memql '(3 2 1) EXP) (cond ((FOO) EXP1) ((eql EXP 1) EXP2) ((eql EXP 6) EXP3))) ((eql EXP 1) EXP2) ((eql EXP 6) EXP3))
* * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): Perform β-reductionStefan Monnier2021-01-271-11/+28
| | | | | | | Also, in `funcall` macroexpand the function before checking to see if we can remove the `funcall`. (macroexp-if): Trim trailing `nil` in the generated code while we're at it.
* Fontify special forms and macros the sameLars Ingebrigtsen2021-01-251-4/+3
| | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp--el-match-keyword): Handle special forms and macros the same way (bug#43265). This makes things like (setq a '(if a b)) be fontified correctly (i.e., not fontified as a keyword).
* Rewrite lisp--el-funcall-position-p to be inverse of the -not functionLars Ingebrigtsen2021-01-241-38/+43
| | | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp--el-funcall-position-p): Rename and rewrite to return the inverse value. Non-inverted predicate functions are easier to reason about. (lisp--el-non-funcall-position-p): Make obsolete.
* Fix macro fontification in `condition-case' handler bodiesLars Ingebrigtsen2021-01-241-6/+9
| | | | | | * lisp/emacs-lisp/lisp-mode.el (lisp--el-non-funcall-position-p): Fontify macros in the BODY of HANDLERS in `condition-case' correctly (bug#43265).
* Tweak `condition-case' keyword highlightsLars Ingebrigtsen2021-01-241-2/+5
| | | | | * lisp/emacs-lisp/lisp-mode.el (lisp--el-non-funcall-position-p): Tweak `condition-case' position check to skip the VAR form.
* Fix missing file&line info in "Unknown defun property" warningsStefan Monnier2021-01-232-11/+19
| | | | | | | | | | * lisp/emacs-lisp/byte-run.el (defmacro, defun): Use `macroexp--warn-and-return` rather than `message`. * lisp/emacs-lisp/macroexp.el: Fix `macroexp--compiling-p`. (macroexp--warn-and-return): Don't try and detect repetition on forms like `nil`. (macroexp-macroexpand): Don't forget to bind `macroexpand-all-environment`.
* Fix spurious "Lexical argument shadows the dynamic variable" due to inliningStefan Monnier2021-01-211-2/+4
| | | | | | | | | | | | | | | | | | | 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.