Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
9852a51d
Commit
9852a51d
authored
May 06, 2008
by
Eric S. Raymond
Browse files
Back out menu move, it broke something obscure.
parent
a12a9e45
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
46 deletions
+47
-46
lisp/vc-dispatcher.el
lisp/vc-dispatcher.el
+47
-3
lisp/vc.el
lisp/vc.el
+0
-43
No files found.
lisp/vc-dispatcher.el
View file @
9852a51d
...
@@ -852,6 +852,7 @@ This code, like dired, assumes UNIX -l format."
...
@@ -852,6 +852,7 @@ This code, like dired, assumes UNIX -l format."
(
defun
vc-directory-resynch-file
(
file
)
(
defun
vc-directory-resynch-file
(
file
)
"Update the entries for FILE in any VC Dired buffers that list it."
"Update the entries for FILE in any VC Dired buffers that list it."
;;FIXME This needs to be implemented so it works for vc-dir
(
let
((
buffers
(
vc-dired-buffers-for-dir
(
file-name-directory
file
))))
(
let
((
buffers
(
vc-dired-buffers-for-dir
(
file-name-directory
file
))))
(
when
buffers
(
when
buffers
(
mapcar
(
lambda
(
buffer
)
(
mapcar
(
lambda
(
buffer
)
...
@@ -1012,6 +1013,42 @@ See `run-hooks'."
...
@@ -1012,6 +1013,42 @@ See `run-hooks'."
(define-key map [open]
(define-key map [open]
'(menu-item "
Open
file
" vc-dir-find-file
'(menu-item "
Open
file
" vc-dir-find-file
:help "
Find
the
file
on
the
current
line
"))
:help "
Find
the
file
on
the
current
line
"))
;; FIXME: Stuff starting here should be appended by vc
;; VC info details
(define-key map [sepvcdet] '("
--
"))
(define-key map [remup]
'(menu-item "
Hide
up-to-date
" vc-dir-hide-up-to-date
:help "
Hide
up-to-date
items
from
display
"))
;; FIXME: This needs a key binding. And maybe a better name
;; ("
Insert
" like PCL-CVS uses does not sound that great either)...
(define-key map [ins]
'(menu-item "
Show
File
" vc-dir-show-fileentry
:help "
Show
a
file
in
the
VC
status
listing
even
though
it
might
be
up
to
date
"))
(define-key map [annotate]
'(menu-item "
Annotate
" vc-annotate
:help "
Display
the
edit
history
of
the
current
file
using
colors
"))
(define-key map [diff]
'(menu-item "
Compare
with
Base
Version
" vc-diff
:help "
Compare
file
set
with
the
base
version
"))
(define-key map [log]
'(menu-item "
Show
history
" vc-print-log
:help "
List
the
change
log
of
the
current
file
set
in
a
window
"))
;; VC commands.
(define-key map [sepvccmd] '("
--
"))
(define-key map [update]
'(menu-item "
Update
to
latest
version
" vc-update
:help "
Update
the
current
fileset
's
files
to
their
tip
revisions
"))
(define-key map [revert]
'(menu-item "
Revert
to
base
version
" vc-revert
:help "
Revert
working
copies
of
the
selected
fileset
to
their
repository
contents.
"))
(define-key map [next-action]
;; FIXME: This really really really needs a better name!
;; And a key binding too.
'(menu-item "
Check
In/Out
" vc-next-action
:help "
Do
the
next
logical
version
control
operation
on
the
current
fileset
"))
(define-key map [register]
'(menu-item "
Register
" vc-dir-register
:help "
Register
file
set
into
the
version
control
system
"))
map)
map)
"
Menu
for
VC
status
")
"
Menu
for
VC
status
")
...
@@ -1042,8 +1079,16 @@ See `run-hooks'."
...
@@ -1042,8 +1079,16 @@ See `run-hooks'."
(define-key map "
\C-c\C-c
" 'vc-dir-kill-dir-status-process)
(define-key map "
\C-c\C-c
" 'vc-dir-kill-dir-status-process)
(define-key map [(down-mouse-3)] 'vc-dir-menu)
(define-key map [(down-mouse-3)] 'vc-dir-menu)
(define-key map [(mouse-2)] 'vc-dir-toggle-mark)
(define-key map [(mouse-2)] 'vc-dir-toggle-mark)
;; FIXME: Calls back into vc.el
;; Hook up the menu.
(define-key map [menu-bar vc-dir-mode]
'(menu-item
;; This is used so that client modes can add mode-specific
;; menu items to vc-dir-menu-map.
"
VC
Status
" vc-dir-menu-map :filter vc-dir-menu-map-filter))
map)
map)
"
Keymap
for
VC
dispatcher
command
s
")
"
Keymap
for
VC
statu
s
")
(defmacro vc-at-event (event &rest body)
(defmacro vc-at-event (event &rest body)
"
Evaluate
`
body
'
wich
point
located
at
event-start
of
`
event
'.
"
Evaluate
`
body
'
wich
point
located
at
event-start
of
`
event
'.
...
@@ -1059,7 +1104,7 @@ If `body' uses `event', it should be a variable,
...
@@ -1059,7 +1104,7 @@ If `body' uses `event', it should be a variable,
(defun vc-dir-menu (e)
(defun vc-dir-menu (e)
"
Popup
the
VC
status
menu.
"
"
Popup
the
VC
status
menu.
"
(interactive "
e
")
(interactive "
e
")
(vc-at-event e (popup-menu
right
-menu-map e)))
(vc-at-event e (popup-menu
vc-dir
-menu-map e)))
(defvar vc-dir-tool-bar-map
(defvar vc-dir-tool-bar-map
(let ((map (make-sparse-keymap)))
(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,7 +1612,6 @@ U - if the cursor is on a file: unmark all the files with the same VC state
(setq buffer-read-only t)
(setq buffer-read-only t)
(use-local-map vc-dir-mode-map)
(use-local-map vc-dir-mode-map)
(set (make-local-variable 'tool-bar-map) vc-dir-tool-bar-map)
(set (make-local-variable 'tool-bar-map) vc-dir-tool-bar-map)
(set (make-local-variable 'right-menu-map) vc-dir-menu-map)
(set (make-local-variable 'vc-client-mode) client-object)
(set (make-local-variable 'vc-client-mode) client-object)
(let ((buffer-read-only nil))
(let ((buffer-read-only nil))
(erase-buffer)
(erase-buffer)
...
...
lisp/vc.el
View file @
9852a51d
...
@@ -2135,49 +2135,6 @@ outside of VC) and one wants to do some operation on it."
...
@@ -2135,49 +2135,6 @@ outside of VC) and one wants to do some operation on it."
(
define-key
map
"A"
'vc-annotate
)
;; g is taken by dispatcher referesh
(
define-key
map
"A"
'vc-annotate
)
;; g is taken by dispatcher referesh
(
define-key
map
"l"
'vc-print-log
)
;; C-x v l
(
define-key
map
"l"
'vc-print-log
)
;; C-x v l
(
define-key
map
"x"
'vc-dir-hide-up-to-date
))
(
define-key
map
"x"
'vc-dir-hide-up-to-date
))
;; Add VC-specific context menu items
(
let
((
map
right-menu-map
))
;; VC info details
(
define-key
map
[sepvcdet]
'
(
"--"
))
(
define-key
map
[remup]
'
(
menu-item
"Hide up-to-date"
vc-dir-hide-up-to-date
:help
"Hide up-to-date items from display"
))
;; FIXME: This needs a key binding. And maybe a better name
;; ("Insert" like PCL-CVS uses does not sound that great either)...
(
define-key
map
[ins]
'
(
menu-item
"Show File"
vc-dir-show-fileentry
:help
"Show a file in the VC status listing even though it might be up to date"
))
(
define-key
map
[annotate]
'
(
menu-item
"Annotate"
vc-annotate
:help
"Display the edit history of the current file using colors"
))
(
define-key
map
[diff]
'
(
menu-item
"Compare with Base Version"
vc-diff
:help
"Compare file set with the base version"
))
(
define-key
map
[log]
'
(
menu-item
"Show history"
vc-print-log
:help
"List the change log of the current file set in a window"
))
;; VC commands.
(
define-key
map
[sepvccmd]
'
(
"--"
))
(
define-key
map
[update]
'
(
menu-item
"Update to latest version"
vc-update
:help
"Update the current fileset's files to their tip revisions"
))
(
define-key
map
[revert]
'
(
menu-item
"Revert to base version"
vc-revert
:help
"Revert working copies of the selected fileset to their repository contents."
))
(
define-key
map
[next-action]
;; FIXME: This really really really needs a better name!
;; And a key binding too.
'
(
menu-item
"Check In/Out"
vc-next-action
:help
"Do the next logical version control operation on the current fileset"
))
(
define-key
map
[register]
'
(
menu-item
"Register"
vc-dir-register
:help
"Register file set into the version control system"
)))
;; Hook up the menu.
(
define-key
(
current-local-map
)
[menu-bar
vc-dir-mode]
'
(
menu-item
;; This is used so that back ends can add mode-specific
;; menu items to vc-dir-menu-map.
"VC Status"
vc-dir-menu-map
:filter
vc-dir-menu-map-filter
))
)))
)))
;; Named-configuration entry points
;; Named-configuration entry points
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment