Skip to content

Commit 18ff365

Browse files
julliardgitster
authored andcommitted
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>
1 parent 550f8fd commit 18ff365

File tree

1 file changed

+42
-1
lines changed

1 file changed

+42
-1
lines changed

contrib/emacs/git.el

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
(eval-when-compile (require 'cl))
5050
(require 'ewoc)
5151
(require 'log-edit)
52+
(require 'easymenu)
5253

5354

5455
;;;; Customizations
@@ -1297,7 +1298,47 @@ Return the list of files that haven't been handled."
12971298
(define-key toggle-map "i" 'git-toggle-show-ignored)
12981299
(define-key toggle-map "k" 'git-toggle-show-unknown)
12991300
(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+
13011342

13021343
;; git mode should only run in the *git status* buffer
13031344
(put 'git-status-mode 'mode-class 'special)

0 commit comments

Comments
 (0)