fix: map!: allow :map values to be interpolated

With the comma syntax. E.g.

  (let ((maps '(some-mode-map another-mode-map)))
    (map! :map ,maps))

This technique was used in the recent rewrite of the Racket
module (1baebda), but I forgot to include this change, so Racket users
have probably noticed some missing keybinds! This fixes that too.

Amend: 1baebdafb3
Ref: #7543
This commit is contained in:
Henrik Lissner
2024-09-17 17:30:22 -04:00
parent a2b1c4da78
commit c8a5e6ec1c

View File

@ -307,7 +307,7 @@ For example, :nvi will map to (list 'normal 'visual 'insert). See
(:desc
(setq desc (pop rest)))
(:map
(doom--map-set :keymaps `(quote ,(ensure-list (pop rest)))))
(doom--map-set :keymaps `(backquote ,(ensure-list (pop rest)))))
(:mode
(push (cl-loop for m in (ensure-list (pop rest))
collect (intern (concat (symbol-name m) "-map")))