changeset 91584:c72722ab4a01

(vc-prefix-map): Bind `vc-status' to "?". (vc-prefix-key): New user-customizable variable. (vc-menu-map): Add `vc-status'.
author Sam Steingold <sds@gnu.org>
date Wed, 06 Feb 2008 17:52:35 +0000
parents 846fe57f9c57
children 4fe734146ac9
files lisp/ChangeLog lisp/vc-hooks.el
diffstat 2 files changed, 29 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Feb 06 14:44:14 2008 +0000
+++ b/lisp/ChangeLog	Wed Feb 06 17:52:35 2008 +0000
@@ -1,3 +1,9 @@
+2008-02-06  Sam Steingold  <sds@gnu.org>
+
+	* vc-hooks.el (vc-prefix-map): Bind `vc-status' to "?".
+	(vc-prefix-key): New user-customizable variable.
+	(vc-menu-map): Add `vc-status'.
+
 2008-02-06  Stefan Monnier  <monnier@iro.umontreal.ca>
 
 	* net/ange-ftp.el (ange-ftp-unhandled-file-name-directory):
--- a/lisp/vc-hooks.el	Wed Feb 06 14:44:14 2008 +0000
+++ b/lisp/vc-hooks.el	Wed Feb 06 17:52:35 2008 +0000
@@ -77,8 +77,8 @@
   :group 'vc)
 
 ;; Note: we don't actually have a darcs back end yet.
-(defcustom vc-directory-exclusion-list '("SCCS" "RCS" "CVS" "MCVS" 
-					 ".svn" ".git" ".hg" ".bzr" 
+(defcustom vc-directory-exclusion-list '("SCCS" "RCS" "CVS" "MCVS"
+					 ".svn" ".git" ".hg" ".bzr"
 					 "_MTN" "_darcs" "{arch}")
   "List of directory names to be ignored when walking directory trees."
   :type '(repeat string)
@@ -505,22 +505,22 @@
                      with monotonic IDs like Subversion and Mercurial.
 
   'removed           Scheduled to be deleted from the repository on next commit.
- 
-  'ignored           The file showed up in a dir-state listing with a flag 
+
+  'ignored           The file showed up in a dir-state listing with a flag
                      indicating the version-control system is ignoring it,
-                     Note: This property is not set reliably (some VCSes 
-                     don't have useful directory-status commands) so assume 
+                     Note: This property is not set reliably (some VCSes
+                     don't have useful directory-status commands) so assume
                      that any file with vc-state nil might be ignorable
-                     without VC knowing it. 
+                     without VC knowing it.
 
-  'unregistered      The file showed up in a dir-state listing with a flag 
+  'unregistered      The file showed up in a dir-state listing with a flag
                      indicating that it is not under version control.
-                     Note: This property is not set reliably (some VCSes 
-                     don't have useful directory-status commands) so assume 
+                     Note: This property is not set reliably (some VCSes
+                     don't have useful directory-status commands) so assume
                      that any file with vc-state nil might be unregistered
-                     without VC knowing it. 
+                     without VC knowing it.
 
-A return of nil from this function means we have no information on the 
+A return of nil from this function means we have no information on the
 status of this file.
 "
   ;; Note: in Emacs 22 and older, return of nil meant the file was unregistered.
@@ -796,7 +796,7 @@
                  (propertize
                   ml-string
                   'mouse-face 'mode-line-highlight
-                  'help-echo 
+                  'help-echo
                   (concat (or ml-echo
                               (format "File under the %s version control system"
                                       backend))
@@ -968,9 +968,17 @@
     (define-key map "+" 'vc-update)
     (define-key map "=" 'vc-diff)
     (define-key map "~" 'vc-revision-other-window)
+    (define-key map "?" 'vc-status)
     map))
 (fset 'vc-prefix-map vc-prefix-map)
-(define-key global-map "\C-xv" 'vc-prefix-map)
+(defcustom vc-prefix-key "\C-xv" "*The prefix for the VC bindings."
+  :set (lambda (symbol prefix)  ; symbol == vc-prefix-key
+         (define-key global-map prefix 'vc-prefix-map) ; install new prefix
+         (when (boundp 'vc-prefix-key) ; disable the previous prefix
+           (define-key global-map vc-prefix-key nil))
+         (set symbol prefix))   ; save the new prefix
+  :version "23.1"
+  :group 'vc)
 
 (defvar vc-menu-map
   (let ((map (make-sparse-keymap "Version Control")))
@@ -981,6 +989,7 @@
     (define-key map [vc-create-snapshot]
       '("Create Snapshot" . vc-create-snapshot))
     (define-key map [vc-directory] '("VC Directory Listing" . vc-directory))
+    (define-key map [vc-status] '("VC Status" . vc-status))
     (define-key map [separator1] '("----"))
     (define-key map [vc-annotate] '("Annotate" . vc-annotate))
     (define-key map [vc-rename-file] '("Rename File" . vc-rename-file))