Switch automatically to *Help* window with describe-key

This commit is contained in:
laurensmiers 2018-11-11 15:05:56 +01:00
parent 44b23b046a
commit af3c038501

View file

@ -181,6 +181,22 @@ Disable the generation of backup-files, I don't use them.
(setq make-backup-files nil) (setq make-backup-files nil)
#+END_SRC #+END_SRC
** Describe key
Describe key will open a new buffer with the relevant information.
However, it stays in the current window and opens a new window with the help-info, forcing you to switch buffers to close the help window.
This small function just switches the focus to the newly opened window so we can close it more easily.
#+BEGIN_SRC emacs-lisp
(defun move-to-help-window ()
(switch-to-buffer-other-window "*Help*")
)
(add-hook 'help-mode-hook 'move-to-help-window)
#+END_SRC
#+RESULTS:
| move-to-help-window |
* Which-key * Which-key
Display available keybindings in popup: Display available keybindings in popup: