diff options
| author | Eric S. Raymond | 2008-05-06 23:44:50 +0000 |
|---|---|---|
| committer | Eric S. Raymond | 2008-05-06 23:44:50 +0000 |
| commit | 9852a51d14ed3c0eb93537a7abe4e59fb9e35bb3 (patch) | |
| tree | 8d8e0b4a90fc63466978ae90abf61c36793b7b09 | |
| parent | a12a9e45270416ae405e39478516d16cd7b6a404 (diff) | |
| download | emacs-9852a51d14ed3c0eb93537a7abe4e59fb9e35bb3.tar.gz emacs-9852a51d14ed3c0eb93537a7abe4e59fb9e35bb3.zip | |
Back out menu move, it broke something obscure.
| -rw-r--r-- | lisp/vc-dispatcher.el | 50 | ||||
| -rw-r--r-- | lisp/vc.el | 43 |
2 files changed, 47 insertions, 46 deletions
diff --git a/lisp/vc-dispatcher.el b/lisp/vc-dispatcher.el index 2dc3c8b41bd..3bfa65f915b 100644 --- a/lisp/vc-dispatcher.el +++ b/lisp/vc-dispatcher.el | |||
| @@ -852,6 +852,7 @@ This code, like dired, assumes UNIX -l format." | |||
| 852 | 852 | ||
| 853 | (defun vc-directory-resynch-file (file) | 853 | (defun vc-directory-resynch-file (file) |
| 854 | "Update the entries for FILE in any VC Dired buffers that list it." | 854 | "Update the entries for FILE in any VC Dired buffers that list it." |
| 855 | ;;FIXME This needs to be implemented so it works for vc-dir | ||
| 855 | (let ((buffers (vc-dired-buffers-for-dir (file-name-directory file)))) | 856 | (let ((buffers (vc-dired-buffers-for-dir (file-name-directory file)))) |
| 856 | (when buffers | 857 | (when buffers |
| 857 | (mapcar (lambda (buffer) | 858 | (mapcar (lambda (buffer) |
| @@ -1012,6 +1013,42 @@ See `run-hooks'." | |||
| 1012 | (define-key map [open] | 1013 | (define-key map [open] |
| 1013 | '(menu-item "Open file" vc-dir-find-file | 1014 | '(menu-item "Open file" vc-dir-find-file |
| 1014 | :help "Find the file on the current line")) | 1015 | :help "Find the file on the current line")) |
| 1016 | ;; FIXME: Stuff starting here should be appended by vc | ||
| 1017 | ;; VC info details | ||
| 1018 | (define-key map [sepvcdet] '("--")) | ||
| 1019 | (define-key map [remup] | ||
| 1020 | '(menu-item "Hide up-to-date" vc-dir-hide-up-to-date | ||
| 1021 | :help "Hide up-to-date items from display")) | ||
| 1022 | ;; FIXME: This needs a key binding. And maybe a better name | ||
| 1023 | ;; ("Insert" like PCL-CVS uses does not sound that great either)... | ||
| 1024 | (define-key map [ins] | ||
| 1025 | '(menu-item "Show File" vc-dir-show-fileentry | ||
| 1026 | :help "Show a file in the VC status listing even though it might be up to date")) | ||
| 1027 | (define-key map [annotate] | ||
| 1028 | '(menu-item "Annotate" vc-annotate | ||
| 1029 | :help "Display the edit history of the current file using colors")) | ||
| 1030 | (define-key map [diff] | ||
| 1031 | '(menu-item "Compare with Base Version" vc-diff | ||
| 1032 | :help "Compare file set with the base version")) | ||
| 1033 | (define-key map [log] | ||
| 1034 | '(menu-item "Show history" vc-print-log | ||
| 1035 | :help "List the change log of the current file set in a window")) | ||
| 1036 | ;; VC commands. | ||
| 1037 | (define-key map [sepvccmd] '("--")) | ||
| 1038 | (define-key map [update] | ||
| 1039 | '(menu-item "Update to latest version" vc-update | ||
| 1040 | :help "Update the current fileset's files to their tip revisions")) | ||
| 1041 | (define-key map [revert] | ||
| 1042 | '(menu-item "Revert to base version" vc-revert | ||
| 1043 | :help "Revert working copies of the selected fileset to their repository contents.")) | ||
| 1044 | (define-key map [next-action] | ||
| 1045 | ;; FIXME: This really really really needs a better name! | ||
| 1046 | ;; And a key binding too. | ||
| 1047 | '(menu-item "Check In/Out" vc-next-action | ||
| 1048 | :help "Do the next logical version control operation on the current fileset")) | ||
| 1049 | (define-key map [register] | ||
| 1050 | '(menu-item "Register" vc-dir-register | ||
| 1051 | :help "Register file set into the version control system")) | ||
| 1015 | map) | 1052 | map) |
| 1016 | "Menu for VC status") | 1053 | "Menu for VC status") |
| 1017 | 1054 | ||
| @@ -1042,8 +1079,16 @@ See `run-hooks'." | |||
| 1042 | (define-key map "\C-c\C-c" 'vc-dir-kill-dir-status-process) | 1079 | (define-key map "\C-c\C-c" 'vc-dir-kill-dir-status-process) |
| 1043 | (define-key map [(down-mouse-3)] 'vc-dir-menu) | 1080 | (define-key map [(down-mouse-3)] 'vc-dir-menu) |
| 1044 | (define-key map [(mouse-2)] 'vc-dir-toggle-mark) | 1081 | (define-key map [(mouse-2)] 'vc-dir-toggle-mark) |
| 1082 | |||
| 1083 | ;; FIXME: Calls back into vc.el | ||
| 1084 | ;; Hook up the menu. | ||
| 1085 | (define-key map [menu-bar vc-dir-mode] | ||
| 1086 | '(menu-item | ||
| 1087 | ;; This is used so that client modes can add mode-specific | ||
| 1088 | ;; menu items to vc-dir-menu-map. | ||
| 1089 | "VC Status" vc-dir-menu-map :filter vc-dir-menu-map-filter)) | ||
| 1045 | map) | 1090 | map) |
| 1046 | "Keymap for VC dispatcher commands") | 1091 | "Keymap for VC status") |
| 1047 | 1092 | ||
| 1048 | (defmacro vc-at-event (event &rest body) | 1093 | (defmacro vc-at-event (event &rest body) |
| 1049 | "Evaluate `body' wich point located at event-start of `event'. | 1094 | "Evaluate `body' wich point located at event-start of `event'. |
| @@ -1059,7 +1104,7 @@ If `body' uses `event', it should be a variable, | |||
| 1059 | (defun vc-dir-menu (e) | 1104 | (defun vc-dir-menu (e) |
| 1060 | "Popup the VC status menu." | 1105 | "Popup the VC status menu." |
| 1061 | (interactive "e") | 1106 | (interactive "e") |
| 1062 | (vc-at-event e (popup-menu right-menu-map e))) | 1107 | (vc-at-event e (popup-menu vc-dir-menu-map e))) |
| 1063 | 1108 | ||
| 1064 | (defvar vc-dir-tool-bar-map | 1109 | (defvar vc-dir-tool-bar-map |
| 1065 | (let ((map (make-sparse-keymap))) | 1110 | (let ((map (make-sparse-keymap))) |
| @@ -1567,7 +1612,6 @@ U - if the cursor is on a file: unmark all the files with the same VC state | |||
| 1567 | (setq buffer-read-only t) | 1612 | (setq buffer-read-only t) |
| 1568 | (use-local-map vc-dir-mode-map) | 1613 | (use-local-map vc-dir-mode-map) |
| 1569 | (set (make-local-variable 'tool-bar-map) vc-dir-tool-bar-map) | 1614 | (set (make-local-variable 'tool-bar-map) vc-dir-tool-bar-map) |
| 1570 | (set (make-local-variable 'right-menu-map) vc-dir-menu-map) | ||
| 1571 | (set (make-local-variable 'vc-client-mode) client-object) | 1615 | (set (make-local-variable 'vc-client-mode) client-object) |
| 1572 | (let ((buffer-read-only nil)) | 1616 | (let ((buffer-read-only nil)) |
| 1573 | (erase-buffer) | 1617 | (erase-buffer) |
diff --git a/lisp/vc.el b/lisp/vc.el index d47e5713ce2..3eeeb6dfad4 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -2135,49 +2135,6 @@ outside of VC) and one wants to do some operation on it." | |||
| 2135 | (define-key map "A" 'vc-annotate) ;; g is taken by dispatcher referesh | 2135 | (define-key map "A" 'vc-annotate) ;; g is taken by dispatcher referesh |
| 2136 | (define-key map "l" 'vc-print-log) ;; C-x v l | 2136 | (define-key map "l" 'vc-print-log) ;; C-x v l |
| 2137 | (define-key map "x" 'vc-dir-hide-up-to-date)) | 2137 | (define-key map "x" 'vc-dir-hide-up-to-date)) |
| 2138 | ;; Add VC-specific context menu items | ||
| 2139 | (let ((map right-menu-map)) | ||
| 2140 | ;; VC info details | ||
| 2141 | (define-key map [sepvcdet] '("--")) | ||
| 2142 | (define-key map [remup] | ||
| 2143 | '(menu-item "Hide up-to-date" vc-dir-hide-up-to-date | ||
| 2144 | :help "Hide up-to-date items from display")) | ||
| 2145 | ;; FIXME: This needs a key binding. And maybe a better name | ||
| 2146 | ;; ("Insert" like PCL-CVS uses does not sound that great either)... | ||
| 2147 | (define-key map [ins] | ||
| 2148 | '(menu-item "Show File" vc-dir-show-fileentry | ||
| 2149 | :help "Show a file in the VC status listing even though it might be up to date")) | ||
| 2150 | (define-key map [annotate] | ||
| 2151 | '(menu-item "Annotate" vc-annotate | ||
| 2152 | :help "Display the edit history of the current file using colors")) | ||
| 2153 | (define-key map [diff] | ||
| 2154 | '(menu-item "Compare with Base Version" vc-diff | ||
| 2155 | :help "Compare file set with the base version")) | ||
| 2156 | (define-key map [log] | ||
| 2157 | '(menu-item "Show history" vc-print-log | ||
| 2158 | :help "List the change log of the current file set in a window")) | ||
| 2159 | ;; VC commands. | ||
| 2160 | (define-key map [sepvccmd] '("--")) | ||
| 2161 | (define-key map [update] | ||
| 2162 | '(menu-item "Update to latest version" vc-update | ||
| 2163 | :help "Update the current fileset's files to their tip revisions")) | ||
| 2164 | (define-key map [revert] | ||
| 2165 | '(menu-item "Revert to base version" vc-revert | ||
| 2166 | :help "Revert working copies of the selected fileset to their repository contents.")) | ||
| 2167 | (define-key map [next-action] | ||
| 2168 | ;; FIXME: This really really really needs a better name! | ||
| 2169 | ;; And a key binding too. | ||
| 2170 | '(menu-item "Check In/Out" vc-next-action | ||
| 2171 | :help "Do the next logical version control operation on the current fileset")) | ||
| 2172 | (define-key map [register] | ||
| 2173 | '(menu-item "Register" vc-dir-register | ||
| 2174 | :help "Register file set into the version control system"))) | ||
| 2175 | ;; Hook up the menu. | ||
| 2176 | (define-key (current-local-map) [menu-bar vc-dir-mode] | ||
| 2177 | '(menu-item | ||
| 2178 | ;; This is used so that back ends can add mode-specific | ||
| 2179 | ;; menu items to vc-dir-menu-map. | ||
| 2180 | "VC Status" vc-dir-menu-map :filter vc-dir-menu-map-filter)) | ||
| 2181 | ))) | 2138 | ))) |
| 2182 | 2139 | ||
| 2183 | ;; Named-configuration entry points | 2140 | ;; Named-configuration entry points |