diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2008-02-04 13:50:45 +0100 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2008-02-04 13:50:45 +0100 |
commit | 0630f04094cc6928d2667f4e07cf12c03ca41d2e (patch) | |
tree | 0f2395b9742dca4b36d8c5b6ef0b6bb29ed438e8 | |
parent | 8e7e33acfe174020f641c95d9248075e872df5ed (diff) | |
download | gitsum-0630f04094cc6928d2667f4e07cf12c03ca41d2e.tar.gz gitsum-0630f04094cc6928d2667f4e07cf12c03ca41d2e.tar.xz gitsum-0630f04094cc6928d2667f4e07cf12c03ca41d2e.zip |
Hack into keymap only if git.el is loaded
-rw-r--r-- | gitsum.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gitsum.el b/gitsum.el index 50fa09a..fc3842f 100644 --- a/gitsum.el +++ b/gitsum.el @@ -9,8 +9,6 @@ ;; Version: 0.2 ;; 04feb2008 +chris+ -(require 'git) - (easy-mmode-defmap gitsum-diff-mode-shared-map '(("c" . gitsum-commit) ("u" . gitsum-undo) @@ -30,7 +28,9 @@ This mode is meant to be activated by `M-x gitsum' or pressing `s' in git-status (define-key gitsum-diff-mode-map (kbd "C-/") 'gitsum-undo) (define-key gitsum-diff-mode-map (kbd "C-_") 'gitsum-undo) -(define-key git-status-mode-map "s" 'gitsum) +;; When git.el is loaded, hack into keymap. +(when (boundp 'git-status-mode-map) + (define-key git-status-mode-map "s" 'gitsum)) ;; Undo doesn't work in read-only buffers else. (defun gitsum-undo () |