justbur / emacs-which-key

Emacs package that displays available keybindings in popup
GNU General Public License v3.0
1.74k stars 87 forks source link

Support packages that use another frame to display bindings #303

Closed tarsius closed 3 years ago

tarsius commented 3 years ago

which-key-posframe no longer worked as reported https://github.com/yanghaoxie/which-key-posframe/issues/8 because which-key assumed that the which-key buffer is always displayed in the selected frame. I address this in the last commit:

Get which-key--buffer's window from any frame

Previously we assumed the buffer was being displayed in a window
of the current frame, which isn't the case if e.g. a child frame
is being used.

We also cannot assume that the third-party code that sets up such
a child frame also deletes it.  `which-key-posframe' for example
merely hides it.

I couldn't resist and also smuggled in some cosmetic changes; feel free to drop those commits.

justbur commented 3 years ago

Thank you!