about summary refs log tree commit diff stats
path: root/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'init.el')
-rw-r--r--init.el20
1 files changed, 13 insertions, 7 deletions
diff --git a/init.el b/init.el index b438e73..fd3581a 100644 --- a/init.el +++ b/init.el
@@ -1010,15 +1010,19 @@ successive invocations."
1010 (global-goto-address-mode) 1010 (global-goto-address-mode)
1011 (add-hook 'after-change-major-mode-hook #'goto-address-mode))) 1011 (add-hook 'after-change-major-mode-hook #'goto-address-mode)))
1012 1012
1013;; TODO: figure out a popper.el / shackle.el ... thing to fix this
1014(setup (:straight helpful) 1013(setup (:straight helpful)
1014 (:require-after 3)
1015
1016 (defvar helpful-pre-windows nil
1017 "Window configuration /before/ helpful was called.")
1018
1015 (:option helpful-switch-buffer-function 1019 (:option helpful-switch-buffer-function
1016 (defun helpful-pop-to-buffer (&rest args) 1020 (defun helpful-pop-to-buffer (&rest args)
1017 (let ((foo 1021 (if (eq major-mode 'helpful-mode)
1018 (if (eq major-mode 'helpful-mode) 1022 (apply #'pop-to-buffer-same-window args)
1019 #'pop-to-buffer-same-window 1023 (require 'winner)
1020 #'pop-to-buffer))) 1024 (setq helpful-pre-windows (winner-conf))
1021 (apply foo args)))) 1025 (apply #'pop-to-buffer args))))
1022 1026
1023 (:global "<help> f" #'helpful-callable 1027 (:global "<help> f" #'helpful-callable
1024 "<help> v" #'helpful-variable 1028 "<help> v" #'helpful-variable
@@ -1031,7 +1035,9 @@ successive invocations."
1031 (quit-window) 1035 (quit-window)
1032 (unless (or (= 1 (count-windows)) 1036 (unless (or (= 1 (count-windows))
1033 (eq major-mode 'helpful-mode)) 1037 (eq major-mode 'helpful-mode))
1034 (delete-window)))))) 1038 (delete-window)
1039 (ignore-errors
1040 (winner-set helpful-pre-windows)))))))
1035 1041
1036(setup (:straight hungry-delete) 1042(setup (:straight hungry-delete)
1037 (:option hungry-delete-chars-to-skip " \t" 1043 (:option hungry-delete-chars-to-skip " \t"