CVS update by scop packages/xemacs-packages/vc ...

[email protected]
Newsgroups gmane.emacs.xemacs.cvs
Message-ID <[email protected]>
  User: scop    
  Date: 09/03/02 17:33:12

  Modified:    packages/xemacs-packages/vc ChangeLog vc-hooks.el
Log:
Simplify menu construction/filtering, drop obsolete code.

Revision  Changes    Path
1.56      +6 -0      XEmacs/packages/xemacs-packages/vc/ChangeLog

Index: ChangeLog
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/vc/ChangeLog,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -p -r1.55 -r1.56
--- ChangeLog	2007/10/30 10:04:15	1.55
+++ ChangeLog	2009/03/02 16:33:11	1.56
@@ -1,3 +1,9 @@
+2009-03-02  Ville Skyttä  <[email protected]>
+
+	* vc-hooks.el (vc-menu):
+	* vc-hooks.el (vc-menu-filter):
+	Simplify menu construction/filtering, drop obsolete code.
+
 2007-10-30  Norbert Koch  <[email protected]>
 
 	* Makefile (VERSION): XEmacs package 1.45 released.



1.16      +6 -39     XEmacs/packages/xemacs-packages/vc/vc-hooks.el

Index: vc-hooks.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/vc/vc-hooks.el,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -p -r1.15 -r1.16
--- vc-hooks.el	2007/10/28 17:46:57	1.15
+++ vc-hooks.el	2009/03/02 16:33:11	1.16
@@ -6,7 +6,7 @@
 ;; Author:     FSF (see vc.el for full credits)
 ;; Maintainer: Andre Spiegel <[email protected]>
 
-;; $Id: vc-hooks.el,v 1.15 2007/10/28 17:46:57 scop Exp $
+;; $Id: vc-hooks.el,v 1.16 2009/03/02 16:33:11 scop Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -935,7 +935,7 @@ Used in `find-file-not-found-functions'.
 (defconst vc-menu
   '("Version Control"
     :filter vc-menu-filter
-    [""                           vc-next-action          buffer-file-name nil]
+    ["Next Action on"             vc-next-action          buffer-file-name nil]
     ["Update to Latest Version"   vc-update               vc-mode]
     ["Revert to Base Version"     vc-revert-buffer        vc-mode]
     ["Undo Last Check-In"         vc-cancel-version       vc-mode]
@@ -956,48 +956,15 @@ Used in `find-file-not-found-functions'.
 
 (defun vc-menu-filter (menu-items)
   (let* ((result menu-items)		; modify in-place
-	 (case-fold-search t)
-	 (type (vc-backend buffer-file-name))
 	 ;; VC works with full path!
-	 (file (if buffer-file-name
-		   buffer-file-name
-		 (expand-file-name (buffer-name))))
-	 op owner item status)
-    (setq op (cond ((null type)
-		    "Register File")
-		   ((eq type 'CVS)
-		    (setq status
-			  (vc-file-getprop buffer-file-name 'cvs-status))
-		    (if status
-			(cdr (assoc status
-				    '(("Locally Modified" . "Commit")
-				      ("Needs Merge" . "Merge with repository")
-				      ("Up-to-date" . "Do nothing to")
-				      ("Needs Checkout" . "Update"))))
-		      ;; #### - we're not gonna call cvs status just to
-		      ;; post a lousy menu...that's insane!
-		      "Next action on" 
-		      ))
-		   ;; these are all for RCS and SCCS
-		   ((not (setq owner (vc-locking-user file)))
-		    ;; VC locking user is faster now. vc-file-owner
-		    ;; is superceded by incompatible FSF version (JV).
-		    "Check out File")
-		   ((not (string-equal owner (user-login-name)))
-		    "Steal File Lock")
-		   (t "Check in File")))
+	 (file (or buffer-file-name (expand-file-name (buffer-name))))
+	 item)
     ;; We do not want the full name in the menu
     (setq file (file-name-nondirectory file))
     (while (setq item (pop menu-items))
       (and (vectorp item)
-	   (cond ((eq 'vc-next-action (aref item 1))
-		  (aset item 0 op)
-		  (aset item 3 file))
-		 ((eq 'vc-file-status (aref item 1))
-		  (aset item 2 (eq 'CVS type))
-		  (aset item 3 file))
-		 ((> (length item) 3)
-		  (aset item 3 file)))))
+	   (> (length item) 3)
+	   (aset item 3 file)))
     result))
 
 (and (featurep 'menubar)

_______________________________________________
XEmacs-CVS mailing list
[email protected]
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.