                           (cdr it)))
                       doom-popup-rules)))
     (setq doom-last-popup (current-buffer))
-    (setq-local doom-popup-rule rules)
-    (let ((map doom-popup-mode-map))
-      (unless (memq :noesc rules)
-        (use-local-map doom-popup-mode-local-map)))))
+    (setq-local doom-popup-rule rules)))
 
 (provide 'defuns-popups)
 ;;; defuns-popups.el ends here

    (unless dont-redraw (redraw-frame))))

;;;###autoload
(defun doom/popup-close-all (&optional dont-kill dont-redraw)
  "Closes all popups (kill them if DONT-KILL-BUFFERS is non-nil). Then redraw
the display (unless DONT-REDRAW is non-nil)."

    (define-key map [remap evil-window-move-far-right]   'ignore)
    (define-key map [remap evil-window-split]  'ignore)
    (define-key map [remap evil-window-vsplit] 'ignore)
    (define-key map [remap evil-force-normal-state] 'doom/popup-close-maybe)
    (define-key map [escape] 'doom/popup-close-maybe)
    (define-key map (kbd "ESC") 'doom/popup-close-maybe)
    map)
   "Active keymap in popup windows.")

(advice-add 'doom/evil-window-move :around 'doom*popup-window-move)

