From 602f257e7a140b24b358352cd24ec4e7edffc53c Mon Sep 17 00:00:00 2001 From: Phil Jackson Date: Tue, 31 Aug 2010 08:55:05 +0100 Subject: [PATCH] Executing with custom options implemented. --- magit-key-mode.el | 6 ++++-- magit.el | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/magit-key-mode.el b/magit-key-mode.el index 988df07a..6e09afa4 100644 --- a/magit-key-mode.el +++ b/magit-key-mode.el @@ -164,16 +164,18 @@ ("h" "Reflog" magit-reflog) ("H" "Reflog on head" magit-reflog-head)) (switches + ("f" "First parent" "--first-parent") ("a" "All" "--all")))) "Holds the key, help, function mapping for the log-mode. If you modify this make sure you reset `magit-key-mode-key-maps' to nil.") +; (magit-key-mode 'logging) + (defun magit-key-mode-options-for-group (for-group) (or (cdr (assoc for-group magit-key-mode-groups)) (error "Unknown group '%s'" for-group))) -; (magit-key-mode 'logging) (defun magit-key-mode-build-keymap (for-group) "Construct a normal looking keymap for the key mode to use and 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)))) (defmacro with-magit-key-mode-command (&rest body) - `(progn + `(let ((magit-custom-options magit-key-mode-current-options)) ,@body (magit-key-mode-kill-buffer))) diff --git a/magit.el b/magit.el index 56e406e9..22f20a08 100644 --- a/magit.el +++ b/magit.el @@ -316,6 +316,9 @@ Many Magit faces inherit from this one by default." "Face for tag labels shown in log buffer." :group 'magit) +(defvar magit-custom-options '() + "List of custom options to pass git. Do not customise this.") + (defvar magit-completing-read 'completing-read "Function to be called when requesting input from the user.")