]> code.delx.au - gnu-emacs/blobdiff - lisp/pcvs-defs.el
(describe-function-1): Kluge around cases of functions fset to subrs
[gnu-emacs] / lisp / pcvs-defs.el
index 1a7ea9a51734c33f20eb42139db89aac0697d29f..51262372a331a4c41b080c653e5770e970c8f254 100644 (file)
@@ -5,7 +5,7 @@
 ;; Author: Stefan Monnier <monnier@cs.yale.edu>
 ;; Keywords: pcl-cvs
 ;; Version: $Name:  $
-;; Revision: $Id: pcl-cvs-defs.el,v 1.27 2000/03/03 20:58:09 monnier Exp $
+;; Revision: $Id: pcvs-defs.el,v 1.4 2000/06/11 22:35:19 monnier Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -68,6 +68,7 @@ versions, such as the one in SunOS-4.")
 
 (defgroup pcl-cvs nil
   "Special support for the CVS versioning system."
+  :version "21.1"
   :group 'tools
   :prefix "cvs-")
 
@@ -135,12 +136,12 @@ useful to be able to tag a single file.  The normal way to do that is to use
 Normally they run on the files that are marked (with `cvs-mode-mark'),
 or the file under the cursor if no files are marked.  If this variable
 is set to a non-nil value they will by default run on the file on the
-current line.  See also `cvs-ignore-marks'"
+current line.  See also `cvs-invert-ignore-marks'"
   :group 'pcl-cvs
   :type '(boolean))
 
 (defvar cvs-diff-ignore-marks t
-  "Obsolete variable: use cvs-ignore-marks instead.")
+  "Obsolete: use `cvs-invert-ignore-marks' instead.")
 
 (defcustom cvs-invert-ignore-marks
   (let ((l ()))
@@ -178,7 +179,7 @@ If set to NIL, `cvs-mode-add' will always prompt for a message."
 (defvar cvs-diff-buffer-name "*cvs-diff*"
   "Obsolete variable: use `cvs-buffer-name-alist' instead.")
 
-(defcustom cvs-find-file-and-jump t
+(defcustom cvs-find-file-and-jump nil
   "Jump to the modified area when finding a file.
 If non-nil, `cvs-mode-file-file' will place the cursor at the beginning of
 the modified area.  If the file is not locally modified, this will obviously
@@ -294,10 +295,6 @@ This variable is buffer local and only used in the *cvs* buffer.")
 ;;;; Global internal variables
 ;;;;
 
-(defconst cvs-startup-message
-  (concat "PCL-CVS release " pcl-cvs-version)
-  "*Startup message for CVS.")
-
 (defconst cvs-vendor-branch "1.1.1"
   "The default branch used by CVS for vendor code.")
 
@@ -344,6 +341,9 @@ This variable is buffer local and only used in the *cvs* buffer.")
     ("e" .     cvs-mode-idiff)
     ("E" .     cvs-mode-imerge))
   "Keymap for diff-related operations in `cvs-mode'.")
+;; This is necessary to allow correct handling of \\[cvs-mode-diff-map] 
+;; in substitute-command-keys.
+(fset 'cvs-mode-diff-map cvs-mode-diff-map)
 
 (easy-mmode-defmap cvs-mode-map
   ;;(define-prefix-command 'cvs-mode-map-diff-prefix)
@@ -384,7 +384,7 @@ This variable is buffer local and only used in the *cvs* buffer.")
     ("\M-s".   cvs-status)
     ;; diff commands
     ("=" .     cvs-mode-diff)
-    ("d" .     ,cvs-mode-diff-map)
+    ("d" .     cvs-mode-diff-map)
     ;; keys that operate on individual files
     ("\C-k".   cvs-mode-acknowledge)
     ("A" .     cvs-mode-add-change-log-entry-other-window)
@@ -410,6 +410,7 @@ This variable is buffer local and only used in the *cvs* buffer.")
     ;; cvstree bindings
     ("+" .     cvs-mode-tree)
     ;; mouse bindings
+    ([mouse-2] . cvs-mode-find-file)
     ([(down-mouse-3)] . cvs-menu)
     ;; Emacs-21 toolbar
     ;;([tool-bar item1] . (menu-item "Examine" cvs-examine :image (image :file "/usr/share/icons/xpaint.xpm" :type xpm)))
@@ -460,18 +461,25 @@ It is expected to call the function.")
 (defconst cvs-pcl-cvs-dirchange-re "^pcl-cvs: descending directory \\(.*\\)$")
 
 ;;;; 
-;;;; 
+;;;; autoload the global menu
 ;;;; 
 
 ;;;###autoload
-(if (progn (condition-case () (require 'easymenu) (error nil))
-          (fboundp 'easy-menu-add-item))
-    (easy-menu-add-item nil '("tools")
-                       '("PCL CVS"
-                         ["Update Directory"    cvs-update    t]
-                         ["Examine Directory"   cvs-examine   t]
-                         ["Status Directory"    cvs-status    t]
-                         ["Checkout Module"     cvs-checkout  t]) "vc"))
+(defvar cvs-global-menu
+  (let ((m (make-sparse-keymap "PCL-CVS")))
+    (define-key m [status]
+      '(menu-item "Directory Status" cvs-status
+                 :help "A more verbose status of a workarea"))
+    (define-key m [checkout]
+      '(menu-item "Checkout Module" cvs-checkout
+                 :help "Check out a module from the repository"))
+    (define-key m [update]
+      '(menu-item "Update Directory" cvs-update
+                 :help "Fetch updates from the repository"))
+    (define-key m [examine]
+      '(menu-item "Examine Directory" cvs-examine
+                 :help "Examine the current state of a workarea"))
+    m))
 
 
 ;; cvs-1.10 and above can take file arguments in other directories