Fix void-variable list error in multi-state binds
Caused by overzealous re-setting of a variable in a loop, when it should only be set once.
This commit is contained in:
parent
5e33fefd74
commit
4d3587c8d0
1 changed files with 10 additions and 7 deletions
|
@ -238,14 +238,17 @@ For example, :nvi will map to (list 'normal 'visual 'insert). See
|
|||
(when (or (memq 'global states) (null states))
|
||||
(setq states (delq 'global states))
|
||||
(push 'nil states))
|
||||
(dolist (state states)
|
||||
(if (and (listp def)
|
||||
(memq (car-safe (doom-unquote def)) '(:def :ignore :keymap)))
|
||||
(setq def `(quote ,(plist-put (general--normalize-extended-def (doom-unquote def))
|
||||
:which-key desc)))
|
||||
(when desc
|
||||
(setq def
|
||||
(if (and (equal key "")
|
||||
(null def))
|
||||
`(quote (nil :which-key ,desc))
|
||||
`(list ,@(plist-put (general--normalize-extended-def def)
|
||||
:which-key desc)))))
|
||||
(setq def `(list ,@(cond ((and (equal key "")
|
||||
(null def))
|
||||
`(nil :which-key ,desc))
|
||||
((plist-put (general--normalize-extended-def def)
|
||||
:which-key desc)))))))
|
||||
(dolist (state states)
|
||||
(push key (alist-get state doom--map-batch-forms))
|
||||
(push def (alist-get state doom--map-batch-forms))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue