Rename popup parameter escape-quit => quit
This commit is contained in:
parent
3cbddbfd88
commit
08b479b06f
8 changed files with 22 additions and 22 deletions
|
@ -46,6 +46,6 @@ http://regexr.com/foo.html?q=bar
|
|||
https://mediatemple.net"
|
||||
"TODO")
|
||||
|
||||
(set! :popup "^\\*doom-regex\\*$" '((size . 4)) '((escape-quit)))
|
||||
(set! :popup "^\\*doom-regex-groups" '((side . left)) '((select) (escape-quit)))
|
||||
(set! :popup "^\\*doom-regex\\*$" '((size . 4)) '((quit)))
|
||||
(set! :popup "^\\*doom-regex-groups" '((side . left)) '((select) (quit)))
|
||||
|
||||
|
|
|
@ -234,7 +234,7 @@ or 'other. This window parameter is ignored if FORCE-P is non-nil."
|
|||
(setq window (selected-window)))
|
||||
(when (and (+popup-p window)
|
||||
(or force-p
|
||||
(memq (+popup-parameter 'escape-quit window)
|
||||
(memq (+popup-parameter 'quit window)
|
||||
'(t current))))
|
||||
(when +popup--remember-last
|
||||
(+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)
|
||||
"Close all open popup windows.
|
||||
|
||||
This will ignore popups with an `escape-quit' parameter that is either nil or
|
||||
'current. This window parameter is ignored if FORCE-P is non-nil."
|
||||
This will ignore popups with an `quit' parameter that is either nil or 'current.
|
||||
This window parameter is ignored if FORCE-P is non-nil."
|
||||
(interactive "P")
|
||||
(let (targets +popup--remember-last)
|
||||
(dolist (window (+popup-windows))
|
||||
(when (or force-p
|
||||
(memq (+popup-parameter 'escape-quit window)
|
||||
(memq (+popup-parameter 'quit window)
|
||||
'(t other)))
|
||||
(push window targets)))
|
||||
(when targets
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;;; config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(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'.
|
||||
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 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
|
||||
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 'other, close this popup if escape is pressed outside of any popup. This 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
|
||||
the popup.
|
||||
If nil, pressing escape will never close this buffer.
|
||||
If t, close the popup if ESC/C-g is pressed inside or outside of popups.
|
||||
If 'other, close this popup if ESC/C-g is pressed outside of any popup. This
|
||||
is great for popups you just want to peek at and discard.
|
||||
If 'current, close the current popup if ESC/C-g is pressed from inside of the
|
||||
popup.
|
||||
If nil, pressing ESC/C-g will never close this buffer.
|
||||
|
||||
(select . BOOl)
|
||||
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
|
||||
'((transient . t)
|
||||
(escape-quit . t))
|
||||
(quit . t))
|
||||
"The default window parameters to add alists fed to `display-buffer-alist'.")
|
||||
|
||||
(defvar +popup-ttl 10
|
||||
|
@ -124,7 +124,7 @@ module."
|
|||
'((select . t)))
|
||||
(set! :+popup "^\\*doom:"
|
||||
'((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))
|
||||
(add-hook 'doom-init-ui-hook #'+popup-mode)
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
(setq nrepl-hide-special-buffers t)
|
||||
|
||||
;; 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.
|
||||
(setq cider-cljs-lein-repl
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
:commands restclient-mode
|
||||
:mode ("\\.http$" . restclient-mode)
|
||||
:config
|
||||
(set! :popup "^\\*HTTP Response" '((size . 0.4)) '((escape-quit . other)))
|
||||
(set! :popup "^\\*HTTP Response" '((size . 0.4)) '((quit . other)))
|
||||
(map! :mode restclient-mode
|
||||
:n [M-return] 'restclient-http-send-current
|
||||
:localleader
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
:config
|
||||
(set! :popup "^\\*Ilist"
|
||||
'((side . right) (size . 35))
|
||||
'((escape-quit . current) (select) (transient . 0)))
|
||||
'((quit . current) (select) (transient . 0)))
|
||||
|
||||
(defun +imenu|cleanup-on-popup-close ()
|
||||
"Clean up after `imenu-list-minor-mode' when killing the list window."
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
|
||||
(set! :popup "^ ?\\*NeoTree"
|
||||
`((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)
|
||||
(push neo-buffer-name winner-boring-buffers)))
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
:commands pass
|
||||
:config
|
||||
(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
|
||||
"j" #'pass-next-entry
|
||||
"k" #'pass-prev-entry
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue