From 32fb5741fb2d46e662cc72897f0de4ae98377ed9 Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Fri, 5 Dec 2014 09:01:52 +0900 Subject: [PATCH 1/2] Stub --- emacs.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/emacs.el b/emacs.el index e8f83da..1552059 100644 --- a/emacs.el +++ b/emacs.el @@ -931,6 +931,10 @@ found, otherwise returns nil." '("graph" . fundamental-mode)) (add-to-list 'git-command-major-mode-alist '("log" . fundamental-mode)) + (when (boundp 'git-command-view-command-list) + (setq git-command-view-command-list + `("log" "graph" ,@git-command-view-command-list)) + ) (or git-command-prompt-file (setq git-command-prompt-file (git-command-find-git-ps1 From b5eeb8038cfd89efc0e6ca75ae9c6a7db1422c8f Mon Sep 17 00:00:00 2001 From: 10sr <8slashes+git@gmail.com> Date: Mon, 8 Dec 2014 00:16:11 +0900 Subject: [PATCH 2/2] emacs.el: Add prefs for new git-command --- emacs.el | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/emacs.el b/emacs.el index 1552059..20ec527 100644 --- a/emacs.el +++ b/emacs.el @@ -925,16 +925,28 @@ found, otherwise returns nil." t) (lazy-load-eval 'git-command nil - (add-to-list 'git-command-major-mode-alist - '("di" . diff-mode)) - (add-to-list 'git-command-major-mode-alist - '("graph" . fundamental-mode)) - (add-to-list 'git-command-major-mode-alist - '("log" . fundamental-mode)) + + ;; for git-command old version + (when (boundp 'git-command-major-mode-alist) + (add-to-list 'git-command-major-mode-alist + '("di" . diff-mode)) + (add-to-list 'git-command-major-mode-alist + '("graph" . fundamental-mode)) + (add-to-list 'git-command-major-mode-alist + '("log" . fundamental-mode))) + + ;; for git-command new version (when (boundp 'git-command-view-command-list) (setq git-command-view-command-list `("log" "graph" ,@git-command-view-command-list)) ) + (when (boundp 'git-command-aliases-alist) + ;; (message "new version of git-command!") + (add-to-list 'git-command-aliases-alist + '("di" . (lambda (options cmd args) + (git-command-exec options + "diff" + args))))) (or git-command-prompt-file (setq git-command-prompt-file (git-command-find-git-ps1