popups: fix inescapable-modes condition

This commit is contained in:
Henrik Lissner 2016-05-27 15:46:52 -04:00
parent a9f7141572
commit 0cb1930d8a

View File

@ -114,8 +114,8 @@
(local-set-key [escape escape] 'doom/popup-close)
(let ((map evil-normal-state-local-map))
(define-key map [escape escape] 'doom/popup-close)
(unless (or (apply #'derived-mode-p doom-popup-inescapable-modes)
(--any? (string-match-p it buffer-name) (-filter 'stringp doom-popup-inescapable-modes)))
(unless (and (apply #'derived-mode-p doom-popup-inescapable-modes)
(--any? (string-match-p it (buffer-name)) (-filter 'stringp doom-popup-inescapable-modes)))
(define-key map [escape] 'doom/popup-close)
(define-key map (kbd "ESC") 'doom/popup-close)))
(when (or (apply #'derived-mode-p doom-popup-protect-modes)