diff --git a/modules/ui/popup/+hacks.el b/modules/ui/popup/+hacks.el index e69ba4ae5..85c7d617a 100644 --- a/modules/ui/popup/+hacks.el +++ b/modules/ui/popup/+hacks.el @@ -35,7 +35,7 @@ ;; ;; `company' -(after! company +(progn (defun +popup*dont-select-me (orig-fn &rest args) (let ((+popup--inhibit-select t)) (apply orig-fn args))) @@ -43,7 +43,7 @@ ;; `eshell' -(after! eshell +(progn (setq eshell-destroy-buffer-when-process-dies t) ;; When eshell runs a visual command (see `eshell-visual-commands'), it spawns @@ -59,7 +59,7 @@ ;; `evil' -(after! evil +(progn (defun +popup*evil-command-window (hist cmd-key execute-fn) "The evil command window has a mind of its own (uses `switch-to-buffer'). We monkey patch it to use pop-to-buffer, and to remember the previous window." @@ -150,7 +150,7 @@ the command buffer." ;; `helpful' -(after! helpful +(progn ;; Open link in origin window (non-popup) instead of inside the popup window. (defun +popup*helpful--navigate (button) (let ((path (substring-no-properties (button-get button 'path))) @@ -183,7 +183,7 @@ the command buffer." ;; `helm-ag' -(after! helm-ag +(progn (defun +helm*pop-to-buffer (orig-fn &rest args) (pop-to-buffer (save-window-excursion (apply orig-fn args) @@ -290,17 +290,16 @@ instead of switch-to-buffer-*." ;; `which-key' -(after! which-key - (setq which-key-popup-type 'custom - which-key-custom-popup-max-dimensions-function (lambda (_) (which-key--side-window-max-dimensions)) - which-key-custom-hide-popup-function #'which-key--hide-buffer-side-window - which-key-custom-show-popup-function - (lambda (act-popup-dim) - (cl-letf (((symbol-function 'display-buffer-in-side-window) - (lambda (buffer alist) - (+popup-display-buffer-stacked-side-window - buffer (append '((vslot . -9999)) alist))))) - (which-key--show-buffer-side-window act-popup-dim))))) +(setq which-key-popup-type 'custom + which-key-custom-popup-max-dimensions-function (lambda (_) (which-key--side-window-max-dimensions)) + which-key-custom-hide-popup-function #'which-key--hide-buffer-side-window + which-key-custom-show-popup-function + (lambda (act-popup-dim) + (cl-letf (((symbol-function 'display-buffer-in-side-window) + (lambda (buffer alist) + (+popup-display-buffer-stacked-side-window + buffer (append '((vslot . -9999)) alist))))) + (which-key--show-buffer-side-window act-popup-dim)))) ;; `windmove'