draw-args function.
This commit is contained in:
parent
880b98d60e
commit
ab566aaee9
1 changed files with 14 additions and 11 deletions
|
@ -307,6 +307,19 @@ put it in magit-key-mode-key-maps for fast lookup."
|
||||||
(defun magit-key-mode-draw-header (header)
|
(defun magit-key-mode-draw-header (header)
|
||||||
(insert (propertize header 'face 'font-lock-keyword-face)))
|
(insert (propertize header 'face 'font-lock-keyword-face)))
|
||||||
|
|
||||||
|
(defun magit-key-mode-draw-args (args)
|
||||||
|
(when args
|
||||||
|
(magit-key-mode-draw-header "Args\n")
|
||||||
|
(dolist (argument args)
|
||||||
|
(insert
|
||||||
|
(format " %s: (%s) %s %s\n"
|
||||||
|
(car argument)
|
||||||
|
(nth 1 argument)
|
||||||
|
(nth 2 argument)
|
||||||
|
(propertize
|
||||||
|
(gethash (nth 2 argument) magit-key-mode-current-args "")
|
||||||
|
'font-lock-face 'widget-field))))))
|
||||||
|
|
||||||
(defun magit-key-mode-draw-actions (actions)
|
(defun magit-key-mode-draw-actions (actions)
|
||||||
(when actions
|
(when actions
|
||||||
(let* ((action-strs (mapcar
|
(let* ((action-strs (mapcar
|
||||||
|
@ -346,16 +359,6 @@ put it in magit-key-mode-key-maps for fast lookup."
|
||||||
(propertize option
|
(propertize option
|
||||||
'face 'font-lock-warning-face)
|
'face 'font-lock-warning-face)
|
||||||
option))))))
|
option))))))
|
||||||
(when arguments
|
(magit-key-mode-draw-args arguments)))
|
||||||
(magit-key-mode-draw-header "Arguments\n")
|
|
||||||
(dolist (argument arguments)
|
|
||||||
(insert
|
|
||||||
(format " %s: (%s) %s %s\n"
|
|
||||||
(car argument)
|
|
||||||
(nth 1 argument)
|
|
||||||
(nth 2 argument)
|
|
||||||
(propertize
|
|
||||||
(gethash (nth 2 argument) magit-key-mode-current-args "")
|
|
||||||
'font-lock-face 'widget-field)))))))
|
|
||||||
|
|
||||||
(provide 'magit-key-mode)
|
(provide 'magit-key-mode)
|
||||||
|
|
Loading…
Add table
Reference in a new issue