mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-11 22:50:49 +00:00
Delay decision whether to use eval-after-load until run-time
Just because a keymap variable is bound at macro-expansion-time doesn't mean that it must be bound at run-time too. Change `bind-keys-form', which is used by `bind-keys' and other macros, to return a form which delays the decision on whether to wrap the binding forms with `eval-after-load' until run-time. Fixes https://github.com/jwiegley/use-package/issues/378.
This commit is contained in:
parent
42b7a774cf
commit
75e0cd93c5
1 changed files with 3 additions and 3 deletions
|
@ -241,9 +241,9 @@ function symbol (unquoted)."
|
|||
(cl-flet
|
||||
((wrap (map bindings)
|
||||
(if (and map pkg (not (eq map 'global-map)))
|
||||
(if (boundp map)
|
||||
bindings
|
||||
`((eval-after-load
|
||||
`((if (boundp ',map)
|
||||
(progn ,@bindings)
|
||||
(eval-after-load
|
||||
,(if (symbolp pkg) `',pkg pkg)
|
||||
'(progn ,@bindings))))
|
||||
bindings)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue