summaryrefslogtreecommitdiff
path: root/lisp/vc-dir.el
diff options
context:
space:
mode:
authorSam Steingold <sds@gnu.org>2008-07-30 14:59:08 +0000
committerSam Steingold <sds@gnu.org>2008-07-30 14:59:08 +0000
commit9b9b76556abef6cec7cd0a50b35828b42ba5ac07 (patch)
treedc8697b37f47de4e4227dd5ae35953f3d4f346f5 /lisp/vc-dir.el
parenta35aeb5f278929a32e3a2027d62a123d33799b40 (diff)
(vc-dir): Call file-truename on the dir argument.
Diffstat (limited to 'lisp/vc-dir.el')
-rw-r--r--lisp/vc-dir.el35
1 files changed, 13 insertions, 22 deletions
diff --git a/lisp/vc-dir.el b/lisp/vc-dir.el
index c3fe0b2853..79f5de88af 100644
--- a/lisp/vc-dir.el
+++ b/lisp/vc-dir.el
@@ -206,7 +206,7 @@ See `run-hooks'."
'(menu-item "Register" vc-register
:help "Register file set into the version control system"))
map)
- "Menu for VC dir")
+ "Menu for dispatcher status")
;; VC backends can use this to add mode-specific menu items to
;; vc-dir-menu-map.
@@ -231,9 +231,8 @@ See `run-hooks'."
(define-key map "+" 'vc-update) ;; C-x v +
(define-key map "l" 'vc-print-log) ;; C-x v l
;; More confusing than helpful, probably
- ;;(define-key map "R" 'vc-revert) ;; u is taken by vc-dir-unmark.
- ;;(define-key map "A" 'vc-annotate) ;; g is taken by revert-buffer
- ;; bound by `special-mode'.
+ ;;(define-key map "R" 'vc-revert) ;; u is taken by dispatcher unmark.
+ ;;(define-key map "A" 'vc-annotate) ;; g is taken by dispatcher refresh
;; Marking.
(define-key map "m" 'vc-dir-mark)
(define-key map "M" 'vc-dir-mark-all-files)
@@ -286,7 +285,7 @@ If `body' uses `event', it should be a variable,
,@body))))
(defun vc-dir-menu (e)
- "Popup the VC dir menu."
+ "Popup the dispatcher status menu."
(interactive "e")
(vc-at-event e (popup-menu vc-dir-menu-map e)))
@@ -872,7 +871,7 @@ If it is a file, return the corresponding cons for the file itself."
(defvar use-vc-backend) ;; dynamically bound
(define-derived-mode vc-dir-mode special-mode "VC dir"
- "Major mode for VC directory buffers.
+ "Major mode for dispatcher directory buffers.
Marking/Unmarking key bindings and actions:
m - marks a file/directory or if the region is active, mark all the files
in region.
@@ -890,19 +889,6 @@ U - if the cursor is on a file: unmark all the files with the same state
- if the cursor is on a directory: unmark all child files
- with a prefix argument: unmark all files
-VC commands
-VC commands in the `C-x v' can be used, they act on the marked
-entries, or on the current entry if nothing is marked.
-
-Search & Replace
-S - searches the marked files
-Q - does a query replace on the marked files
-M-s a C-s - does an isearch on the marked files
-M-s a C-M-s - does an isearch on the marked files
-If nothing is marked, these commands act on the current entry.
-When a directory is current or marked, the Search & Replace
-commands act on the files in those directories displayed in the
-*vc-dir* buffer.
\\{vc-dir-mode-map}"
(set (make-local-variable 'vc-dir-backend) use-vc-backend)
@@ -1107,9 +1093,14 @@ Optional second argument BACKEND specifies the VC backend to use.
Interactively, a prefix argument means to ask for the backend."
(interactive
(list
- (read-file-name "VC status for directory: "
- default-directory default-directory t
- nil #'file-directory-p)
+ ;; When you hit C-x v d in a visited VC file,
+ ;; the *vc-dir* buffer visits the directory under its truename;
+ ;; therefore it makes sense to always do that.
+ ;; Otherwise if you do C-x v d -> C-x C-f -> C-c v d
+ ;; you may get a new *vc-dir* buffer, different from the original
+ (file-truename (read-file-name "VC status for directory: "
+ default-directory default-directory t
+ nil #'file-directory-p))
(if current-prefix-arg
(intern
(completing-read