Executing with custom options implemented.

This commit is contained in:
Phil Jackson 2010-08-31 08:55:05 +01:00
parent 5570e6ad55
commit 602f257e7a
2 changed files with 7 additions and 2 deletions

View file

@ -164,16 +164,18 @@
("h" "Reflog" magit-reflog) ("h" "Reflog" magit-reflog)
("H" "Reflog on head" magit-reflog-head)) ("H" "Reflog on head" magit-reflog-head))
(switches (switches
("f" "First parent" "--first-parent")
("a" "All" "--all")))) ("a" "All" "--all"))))
"Holds the key, help, function mapping for the log-mode. If you "Holds the key, help, function mapping for the log-mode. If you
modify this make sure you reset `magit-key-mode-key-maps' to modify this make sure you reset `magit-key-mode-key-maps' to
nil.") nil.")
; (magit-key-mode 'logging)
(defun magit-key-mode-options-for-group (for-group) (defun magit-key-mode-options-for-group (for-group)
(or (cdr (assoc for-group magit-key-mode-groups)) (or (cdr (assoc for-group magit-key-mode-groups))
(error "Unknown group '%s'" for-group))) (error "Unknown group '%s'" for-group)))
; (magit-key-mode 'logging)
(defun magit-key-mode-build-keymap (for-group) (defun magit-key-mode-build-keymap (for-group)
"Construct a normal looking keymap for the key mode to use and "Construct a normal looking keymap for the key mode to use and
put it in magit-key-mode-key-maps for fast lookup." put it in magit-key-mode-key-maps for fast lookup."
@ -222,7 +224,7 @@ put it in magit-key-mode-key-maps for fast lookup."
(list magit-key-mode-action-re '(1 font-lock-builtin-face)))) (list magit-key-mode-action-re '(1 font-lock-builtin-face))))
(defmacro with-magit-key-mode-command (&rest body) (defmacro with-magit-key-mode-command (&rest body)
`(progn `(let ((magit-custom-options magit-key-mode-current-options))
,@body ,@body
(magit-key-mode-kill-buffer))) (magit-key-mode-kill-buffer)))

View file

@ -316,6 +316,9 @@ Many Magit faces inherit from this one by default."
"Face for tag labels shown in log buffer." "Face for tag labels shown in log buffer."
:group 'magit) :group 'magit)
(defvar magit-custom-options '()
"List of custom options to pass git. Do not customise this.")
(defvar magit-completing-read 'completing-read (defvar magit-completing-read 'completing-read
"Function to be called when requesting input from the user.") "Function to be called when requesting input from the user.")