branch: externals/frog-menu commit f45005d9c2afaff72e4cd3a0672a6b79dfe0154b Merge: 173aea7 75f5243 Author: Clemens Radermacher <clem...@posteo.net> Commit: Clemens Radermacher <clem...@posteo.net>
Merge branch 'master' of github.com:clemera/frog-menu --- frog-menu.el | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/frog-menu.el b/frog-menu.el index 3617711..dab6cc5 100644 --- a/frog-menu.el +++ b/frog-menu.el @@ -165,6 +165,10 @@ exits through an error." "If non-nil use padding between avy hints and candidates." :type 'boolean) +(defcustom frog-menu-posframe-parameters nil + "Explicit frame parameters to be used by the posframe `frog-menu' creates." + :type 'list) + (defcustom frog-menu-format-actions-function #'frog-menu-action-format "Function used to format the actions passed to `frog-menu-read'." :type 'function) @@ -229,6 +233,14 @@ be drawn by single characters." '((t (:inherit default))) "Face used for menu actions.") +(defface frog-menu-action-keybinding-face + '((t (:inherit default))) + "Face used for menu action keybindings.") + +(defface frog-menu-posframe-background-face + '((t (:inherit default))) + "Face used for the background color of the posframe.") + (defvar frog-menu--buffer " *frog-menu-menu*" "Buffer used for the frog menu.") @@ -321,8 +333,13 @@ ACTIONS." (add-text-properties (point) (progn - (insert (car action) - "_" + (insert (car action)) + (point)) + '(face frog-menu-action-keybinding-face)) + (add-text-properties + (point) + (progn + (insert "_" (replace-regexp-in-string " " "_" (cadr action)) " ") @@ -385,7 +402,9 @@ Returns window of displayed buffer." (posframe-show buf :poshandler(or display-option #'posframe-poshandler-point-bottom-left-corner) - :internal-border-width 1) + :internal-border-width 1 + :background-color (face-attribute 'frog-menu-posframe-background-face :background) + :override-parameters frog-menu-posframe-parameters) (set-face-attribute 'internal-border (buffer-local-value 'posframe--frame buf) :inherit 'frog-menu-border)