git.el: Added a menu for git-status-mode.
Originally written by Rémi Vanicat, I just changed the layout a little. Signed-off-by: Rémi Vanicat <vanicat@debian.org> Signed-off-by: Alexandre Julliard <julliard@winehq.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Alexandre Julliard committed
Dec 11, 2007 at 13:56 UTC
18ff365fcb3b16d6802c04da03ceda3a260c0ab9
1 file changed
+42
-1
contrib/emacs/git.el
+42
-1
@@ -49,6 +49,7 @@
49
(eval-when-compile (require 'cl))
50
(require 'ewoc)
51
(require 'log-edit)
52
+(require 'easymenu)
53
54
55
;;;; Customizations
@@ -1297,7 +1298,47 @@ Return the list of files that haven't been handled."
1298
(define-key toggle-map "i" 'git-toggle-show-ignored)
1299
(define-key toggle-map "k" 'git-toggle-show-unknown)
1300
(define-key toggle-map "m" 'git-toggle-all-marks)
1300
- (setq git-status-mode-map map)))
1301
+ (setq git-status-mode-map map))
1302
+ (easy-menu-define git-menu git-status-mode-map
1303
+ "Git Menu"
1304
+ `("Git"
1305
+ ["Refresh" git-refresh-status t]
1306
+ ["Commit" git-commit-file t]
1307
+ ("Merge"
1308
+ ["Next Unmerged File" git-next-unmerged-file t]
1309
+ ["Prev Unmerged File" git-prev-unmerged-file t]
1310
+ ["Mark as Resolved" git-resolve-file t]
1311
+ ["Interactive Merge File" git-find-file-imerge t]
1312
+ ["Diff Against Common Base File" git-diff-file-base t]
1313
+ ["Diff Combined" git-diff-file-combined t]
1314
+ ["Diff Against Merge Head" git-diff-file-merge-head t]
1315
+ ["Diff Against Mine" git-diff-file-mine t]
1316
+ ["Diff Against Other" git-diff-file-other t])
1317
+ "--------"
1318
+ ["Add File" git-add-file t]
1319
+ ["Revert File" git-revert-file t]
1320
+ ["Ignore File" git-ignore-file t]
1321
+ ["Remove File" git-remove-file t]
1322
+ "--------"
1323
+ ["Find File" git-find-file t]
1324
+ ["View File" git-view-file t]
1325
+ ["Diff File" git-diff-file t]
1326
+ ["Interactive Diff File" git-diff-file-idiff t]
1327
+ ["Log" git-log-file t]
1328
+ "--------"
1329
+ ["Mark" git-mark-file t]
1330
+ ["Mark All" git-mark-all t]
1331
+ ["Unmark" git-unmark-file t]
1332
+ ["Unmark All" git-unmark-all t]
1333
+ ["Toggle All Marks" git-toggle-all-marks t]
1334
+ ["Hide Handled Files" git-remove-handled t]
1335
+ "--------"
1336
+ ["Show Uptodate Files" git-toggle-show-uptodate :style toggle :selected git-show-uptodate]
1337
+ ["Show Ignored Files" git-toggle-show-ignored :style toggle :selected git-show-ignored]
1338
+ ["Show Unknown Files" git-toggle-show-unknown :style toggle :selected git-show-unknown]
1339
+ "--------"
1340
+ ["Quit" git-status-quit t])))
1341
+
1342
1343
;; git mode should only run in the *git status* buffer
1344
(put 'git-status-mode 'mode-class 'special)