Concat -> format.

This commit is contained in:
Phil Jackson 2010-09-01 10:21:50 +01:00
parent e882f3c78a
commit 3b22dbcd5a

View file

@ -324,37 +324,29 @@ put it in magit-key-mode-key-maps for fast lookup."
(insert "Actions:\n") (insert "Actions:\n")
(dolist (action actions) (dolist (action actions)
(insert (insert
(concat " " (car action) ": " (nth 1 action) "\n"))) (format " %s: %s\n" (car action) (nth 1 action))))
(when switches (when switches
(insert "Switches:\n") (insert "Switches:\n")
(dolist (switch switches) (dolist (switch switches)
(let ((option (nth 2 switch))) (let ((option (nth 2 switch)))
(insert (insert
(concat (format " %s: %s (%s)\n"
" " (car switch)
(car switch) (nth 1 switch)
": " (if (member option magit-key-mode-current-options)
(nth 1 switch) (propertize option
" (" 'font-lock-face 'font-lock-warning-face)
(if (member option magit-key-mode-current-options) option))))))
(propertize option 'font-lock-face 'font-lock-warning-face)
option)
")\n")))))
(when arguments (when arguments
(insert "Arguments:\n") (insert "Arguments:\n")
(dolist (argument arguments) (dolist (argument arguments)
(insert (insert
(concat (format " %s: (%s) %s\n"
" "
(car argument) (car argument)
": "
(nth 1 argument) (nth 1 argument)
" ("
(nth 2 argument) (nth 2 argument)
") "
(propertize (propertize
(gethash (nth 2 argument) magit-key-mode-current-args "") (gethash (nth 2 argument) magit-key-mode-current-args "")
'font-lock-face 'widget-field) 'font-lock-face 'widget-field)))))))
"\n"))))))
(provide 'magit-key-mode) (provide 'magit-key-mode)