     (cl-loop with attrs = (doom--map-state)
              for (state . defs) in doom--map-batch-forms
              if (or doom--map-evil-p (not state))
-             collect `(general-define-key ,@(if state `(:states ',state)) ,@attrs ,@(nreverse defs))
+             collect `(,doom--map-fn ,@(if state `(:states ',state)) ,@attrs ,@(nreverse defs))
              into forms
              finally do (push (macroexp-progn forms) doom--map-forms))
     (setq doom--map-batch-forms nil)))

  (let ((plist
         (append (list :prefix (doom--map-append-keys :prefix)
                       :non-normal-prefix (doom--map-append-keys :non-normal-prefix)
                       :definer (plist-get doom--map-parent-state :definer)
                       :keymaps
                       (append (plist-get doom--map-parent-state :keymaps)
                               (plist-get doom--map-state :keymaps)

(after! evil (setq doom--map-evil-p t))

(defun doom--map-process (rest)
  (let ((doom--map-fn doom--map-fn)
        doom--map-state
        doom--map-forms
        desc)
    (while rest
