As requested [1] by Phil Jackson <[email protected]>. [1] mid:"caff4w1zxpwrtplcmulsm8h50fjhuvgzutow32xrzhmvgg87...@mail.gmail.com"
Signed-off-by: Pieter Praet <[email protected]> --- magit-key-mode.el | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/magit-key-mode.el b/magit-key-mode.el index fb39086..56c34be 100644 --- a/magit-key-mode.el +++ b/magit-key-mode.el @@ -191,6 +191,26 @@ (defvar magit-key-mode-groups If you modify this make sure you reset `magit-key-mode-keymaps' to nil.") +(defface magit-key-mode-header-face + '((t :inherit font-lock-keyword-face)) + "Face for key mode header lines." + :group 'magit-faces) + +(defface magit-key-mode-button-face + '((t :inherit font-lock-builtin-face)) + "Face for key mode buttons." + :group 'magit-faces) + +(defface magit-key-mode-switch-face + '((t :inherit font-lock-warning-face)) + "Face for key mode switches." + :group 'magit-faces) + +(defface magit-key-mode-args-face + '((t :inherit widget-field)) + "Face for key mode switch arguments." + :group 'magit-faces) + (defun magit-key-mode-delete-group (group) "Delete a group from `magit-key-mode-keymaps'." (let ((items (assoc group magit-key-mode-groups))) @@ -486,7 +506,7 @@ (defun magit-key-mode-build-exec-point-alist () (defun magit-key-mode-draw-header (header) "Draw a header with the correct face." - (insert (propertize header 'face 'font-lock-keyword-face) "\n")) + (insert (propertize header 'face 'magit-key-mode-header-face) "\n")) (defvar magit-key-mode-args-in-cols nil "When true, draw arguments in columns as with switches and options.") @@ -500,7 +520,7 @@ (defun magit-key-mode-draw-args (args) (format "(%s) %s" (nth 2 x) (propertize (gethash (nth 2 x) magit-key-mode-current-args "") - 'face 'widget-field))) + 'face 'magit-key-mode-args-face))) (not magit-key-mode-args-in-cols))) (defun magit-key-mode-draw-switches (switches) @@ -511,7 +531,7 @@ (defun magit-key-mode-draw-switches (switches) (lambda (x) (format "(%s)" (let ((s (nth 2 x))) (if (member s magit-key-mode-current-options) - (propertize s 'face 'font-lock-warning-face) + (propertize s 'face 'magit-key-mode-switch-face) s)))))) (defun magit-key-mode-draw-actions (actions) @@ -524,7 +544,7 @@ (defun magit-key-mode-draw-buttons (section xs maker (magit-key-mode-draw-header section) (magit-key-mode-draw-in-cols (mapcar (lambda (x) - (let* ((head (propertize (car x) 'face 'font-lock-builtin-face)) + (let* ((head (propertize (car x) 'face 'magit-key-mode-button-face)) (desc (nth 1 x)) (more (and maker (funcall maker x))) (text (format " %s: %s%s%s" -- 1.7.11.1 -- --- You received this message because you are subscribed to the Google Groups "magit" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
