             (setq keymaps
                   (let ((car (pop rest)))
                     (if (listp car) car (list car)))))
+          (:mode
+            (setq modes
+                  (let ((car (pop rest)))
+                    (if (listp car) car (list car))))
+            (unless keymaps
+              (setq keymaps
+                    (mapcar (lambda (m) (intern (format "%s-map" (symbol-name m))))
+                            modes))))
           (:prefix
             (let ((def (pop rest)))
               (setq prefix

                        `(vconcat ,prefix (if (stringp ,def) (kbd ,def) ,def))
                      `(vconcat ,prefix ,(if (stringp def) (kbd def) def))))
              (when desc
                (push `(nconc doom--which-key-defs (list ,(key-description (eval prefix)) ,desc))
                      forms)
                (setq desc nil))))
          (otherwise ; might be a state prefix

    :L cannot be in a :map.

Flags
    (:mode [MODE(s)] [...])    ; inner keybinds are applied to major MODE(s)
    (:map [KEYMAP(s)] [...])   ; inner keybinds are applied to KEYMAP(S)
    (:map* [KEYMAP(s)] [...])  ; same as :map, but deferred
    (:prefix [PREFIX] [...])   ; assign prefix to all inner keybindings
    (:after [FEATURE] [...])   ; apply keybinds when [FEATURE] loads

