feature/popup: always pop up which-key at bottom of frame

This commit is contained in:
Henrik Lissner 2018-03-21 16:37:08 -04:00
parent f2641dbc11
commit 462b1f7853
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -231,6 +231,19 @@ instead of switch-to-buffer-*."
(advice-add #'wgrep-finish-edit :after #'+popup*close))
;; `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
buffer (append '((vslot . -9999)) alist)))))
(which-key--show-buffer-side-window act-popup-dim))))
;; `windmove'
(progn
;; Users should be about to hop into popups easily, but Elisp shouldn't.