diff --git a/core/core-keybinds.el b/core/core-keybinds.el index 1e4e05db9..0a2ea8650 100644 --- a/core/core-keybinds.el +++ b/core/core-keybinds.el @@ -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))))