Rename popup parameter escape-quit => quit

This commit is contained in:
Henrik Lissner 2018-01-06 02:42:53 -05:00
parent 3cbddbfd88
commit 08b479b06f
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
8 changed files with 22 additions and 22 deletions

View file

@ -46,6 +46,6 @@ http://regexr.com/foo.html?q=bar
https://mediatemple.net" https://mediatemple.net"
"TODO") "TODO")
(set! :popup "^\\*doom-regex\\*$" '((size . 4)) '((escape-quit))) (set! :popup "^\\*doom-regex\\*$" '((size . 4)) '((quit)))
(set! :popup "^\\*doom-regex-groups" '((side . left)) '((select) (escape-quit))) (set! :popup "^\\*doom-regex-groups" '((side . left)) '((select) (quit)))

View file

@ -234,7 +234,7 @@ or 'other. This window parameter is ignored if FORCE-P is non-nil."
(setq window (selected-window))) (setq window (selected-window)))
(when (and (+popup-p window) (when (and (+popup-p window)
(or force-p (or force-p
(memq (+popup-parameter 'escape-quit window) (memq (+popup-parameter 'quit window)
'(t current)))) '(t current))))
(when +popup--remember-last (when +popup--remember-last
(+popup--remember (list window))) (+popup--remember (list window)))
@ -245,13 +245,13 @@ or 'other. This window parameter is ignored if FORCE-P is non-nil."
(defun +popup/close-all (&optional force-p) (defun +popup/close-all (&optional force-p)
"Close all open popup windows. "Close all open popup windows.
This will ignore popups with an `escape-quit' parameter that is either nil or This will ignore popups with an `quit' parameter that is either nil or 'current.
'current. This window parameter is ignored if FORCE-P is non-nil." This window parameter is ignored if FORCE-P is non-nil."
(interactive "P") (interactive "P")
(let (targets +popup--remember-last) (let (targets +popup--remember-last)
(dolist (window (+popup-windows)) (dolist (window (+popup-windows))
(when (or force-p (when (or force-p
(memq (+popup-parameter 'escape-quit window) (memq (+popup-parameter 'quit window)
'(t other))) '(t other)))
(push window targets))) (push window targets)))
(when targets (when targets

View file

@ -1,7 +1,7 @@
;;; config.el -*- lexical-binding: t; -*- ;;; config.el -*- lexical-binding: t; -*-
(defconst +popup-window-parameters (defconst +popup-window-parameters
'(transient escape-quit select modeline alist) '(transient quit select modeline alist)
"A list of custom parameters to be added to `window-persistent-parameters'. "A list of custom parameters to be added to `window-persistent-parameters'.
Modifying this has no effect, unless done before feature/popup loads. Modifying this has no effect, unless done before feature/popup loads.
@ -13,16 +13,16 @@ Modifying this has no effect, unless done before feature/popup loads.
If 0, the buffer is immediately killed. If 0, the buffer is immediately killed.
If nil, the buffer won't be killed. If nil, the buffer won't be killed.
(escape-quit . CDR) (quit . CDR)
CDR can be t, 'other, 'current or nil. This determines the behavior of the CDR can be t, 'other, 'current or nil. This determines the behavior of the
escape key in or outside of popup windows. ESC/C-g keys in or outside of popup windows.
If t, close the popup if escape is pressed inside or outside of popups. If t, close the popup if ESC/C-g is pressed inside or outside of popups.
If 'other, close this popup if escape is pressed outside of any popup. This is If 'other, close this popup if ESC/C-g is pressed outside of any popup. This
great for popups you just want to peek at and discard. is great for popups you just want to peek at and discard.
If 'current, close the current popup if escape is pressed from inside of If 'current, close the current popup if ESC/C-g is pressed from inside of the
the popup. popup.
If nil, pressing escape will never close this buffer. If nil, pressing ESC/C-g will never close this buffer.
(select . BOOl) (select . BOOl)
CDR is a boolean that determines whether to focus the popup window after it CDR is a boolean that determines whether to focus the popup window after it
@ -61,7 +61,7 @@ a brief description of some native window parameters that Emacs uses:
(defvar +popup-default-parameters (defvar +popup-default-parameters
'((transient . t) '((transient . t)
(escape-quit . t)) (quit . t))
"The default window parameters to add alists fed to `display-buffer-alist'.") "The default window parameters to add alists fed to `display-buffer-alist'.")
(defvar +popup-ttl 10 (defvar +popup-ttl 10
@ -124,7 +124,7 @@ module."
'((select . t))) '((select . t)))
(set! :+popup "^\\*doom:" (set! :+popup "^\\*doom:"
'((window-height . 0.35)) '((window-height . 0.35))
'((select . t) (escape-quit) (transient)))) '((select . t) (quit) (transient))))
(setq +popup--display-buffer-alist (eval-when-compile +popup--display-buffer-alist)) (setq +popup--display-buffer-alist (eval-when-compile +popup--display-buffer-alist))
(add-hook 'doom-init-ui-hook #'+popup-mode) (add-hook 'doom-init-ui-hook #'+popup-mode)

View file

@ -35,7 +35,7 @@
(setq nrepl-hide-special-buffers t) (setq nrepl-hide-special-buffers t)
;; settings for cider repl as a popup (prevent it from being closed on escape, especially.) ;; settings for cider repl as a popup (prevent it from being closed on escape, especially.)
(set! :popup "^\\*cider" nil '((escape-quit) (select))) (set! :popup "^\\*cider" nil '((quit) (select)))
;; Setup cider for clojurescript / figwheel dev. ;; Setup cider for clojurescript / figwheel dev.
(setq cider-cljs-lein-repl (setq cider-cljs-lein-repl

View file

@ -4,7 +4,7 @@
:commands restclient-mode :commands restclient-mode
:mode ("\\.http$" . restclient-mode) :mode ("\\.http$" . restclient-mode)
:config :config
(set! :popup "^\\*HTTP Response" '((size . 0.4)) '((escape-quit . other))) (set! :popup "^\\*HTTP Response" '((size . 0.4)) '((quit . other)))
(map! :mode restclient-mode (map! :mode restclient-mode
:n [M-return] 'restclient-http-send-current :n [M-return] 'restclient-http-send-current
:localleader :localleader

View file

@ -10,7 +10,7 @@
:config :config
(set! :popup "^\\*Ilist" (set! :popup "^\\*Ilist"
'((side . right) (size . 35)) '((side . right) (size . 35))
'((escape-quit . current) (select) (transient . 0))) '((quit . current) (select) (transient . 0)))
(defun +imenu|cleanup-on-popup-close () (defun +imenu|cleanup-on-popup-close ()
"Clean up after `imenu-list-minor-mode' when killing the list window." "Clean up after `imenu-list-minor-mode' when killing the list window."

View file

@ -35,7 +35,7 @@
(set! :popup "^ ?\\*NeoTree" (set! :popup "^ ?\\*NeoTree"
`((side . ,neo-window-position) (width-width . ,neo-window-width)) `((side . ,neo-window-position) (width-width . ,neo-window-width))
'((escape-quit . current) (select . t))) '((quit . current) (select . t)))
(when (bound-and-true-p winner-mode) (when (bound-and-true-p winner-mode)
(push neo-buffer-name winner-boring-buffers))) (push neo-buffer-name winner-boring-buffers)))

View file

@ -21,7 +21,7 @@
:commands pass :commands pass
:config :config
(set! :evil-state 'pass-mode 'emacs) (set! :evil-state 'pass-mode 'emacs)
(set! :popup "^\\*Password-Store" '((side . left)) '((escape-quit))) (set! :popup "^\\*Password-Store" '((side . left)) '((quit)))
(map! :map pass-mode-map (map! :map pass-mode-map
"j" #'pass-next-entry "j" #'pass-next-entry
"k" #'pass-prev-entry "k" #'pass-prev-entry