diff lisp/pcl-cvs/pcl-cvs.el @ 10:49a24b4fd526 r19-15b6

Import from CVS: tag r19-15b6
author cvs
date Mon, 13 Aug 2007 08:47:52 +0200
parents 376386a54a3c
children 1a767b41a199
line wrap: on
line diff
--- a/lisp/pcl-cvs/pcl-cvs.el	Mon Aug 13 08:47:36 2007 +0200
+++ b/lisp/pcl-cvs/pcl-cvs.el	Mon Aug 13 08:47:52 2007 +0200
@@ -1,10 +1,10 @@
 ;;;
 ;;;#ident "@(#)OrigId: pcl-cvs.el,v 1.93 1993/05/31 22:44:00 ceder Exp "
 ;;;
-;;;#ident "@(#)cvs/contrib/pcl-cvs:$Name: r19-14 $:$Id: pcl-cvs.el,v 1.1.1.1 1996/12/18 03:32:27 steve Exp $"
+;;;#ident "@(#)cvs/contrib/pcl-cvs:$Name: r19-15b6 $:$Id: pcl-cvs.el,v 1.2 1996/12/29 00:15:02 steve Exp $"
 ;;;
 ;;; pcl-cvs.el -- A Front-end to CVS 1.3 or later.
-;;; Release 1.05-CVS-$Name: r19-14 $.
+;;; Release 1.05-CVS-$Name: r19-15b6 $.
 ;;; Copyright (C) 1991, 1992, 1993  Per Cederqvist
 
 ;;; This program is free software; you can redistribute it and/or modify
@@ -19,7 +19,8 @@
 ;;;
 ;;; You should have received a copy of the GNU General Public License
 ;;; along with this program; if not, write to the Free Software
-;;; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;;; 02111-1307, USA.
 
 ;;; See below for installation instructions.
 
@@ -33,41 +34,35 @@
 ;;; or newer.  Use the version of RCS best suited for the version of CVS you're
 ;;; using.
 
-; (require 'cookie)			; from ELIB-1.0
-(load "cookie.el")
+(require 'cookie)			; from ELIB-1.0
 (require 'add-log)			; for all the ChangeLog goodies
 
-(provide 'pcl-cvs)
-
 ;;; -------------------------------------------------------
 ;;;	    START OF THINGS TO CHECK WHEN INSTALLING
 
 ;; also use $GNU here, since may folks might install CVS as a GNU package
 ;;
-(defvar local-path (cond
-		      ((getenv "LOCAL")
-		       (getenv "LOCAL"))
-		      ((getenv "GNU")
-		       (getenv "GNU"))
-		      (t
-		       "/usr/local"))
-  "*Path prefix for most locally installed things.")
-
-;; this isn't likely to be right all the time....
-;;
-(defvar local-gnu-path (cond
-		      ((getenv "GNU")
-		       (getenv "GNU"))
-		      (t
-		       "/usr/local"))	; or "/usr/gnu"?
-  "*Path prefix for locally installed GNU software.")
-
-(defvar cvs-program (concat local-path "/bin/cvs")
+(defun cvs-find-program (program)
+  (let ((path (list (getenv "LOCAL")
+		    (getenv "GNU")
+		    "/usr/local/bin"
+		    "/usr/bin"
+		    "/bin")))
+    (while path
+      (if (stringp (car path))
+	  (let ((abs-program (expand-file-name program (car path))))
+	    (if (file-executable-p abs-program)
+		(setq path nil
+		      program abs-program))))
+      (setq path (cdr path)))
+    program))
+
+(defvar cvs-program (cvs-find-program "cvs")
   "*Full path to the cvs executable.")
 
 ;; SunOS-4.1.1_U1 has "diff.c 1.12 88/08/04 SMI; from UCB 4.6 86/04/03"
 ;;
-(defvar cvs-diff-program (concat local-gnu-path "/bin/diff")
+(defvar cvs-diff-program (cvs-find-program "diff")
   "*Full path to the best diff program you've got.
 NOTE:  there are some nasty bugs in the context diff variants of some vendor
 versions, such as the one in SunOS-4.1.1_U1")
@@ -131,7 +126,7 @@
 ;;;	     END OF THINGS TO CHECK WHEN INSTALLING
 ;;; --------------------------------------------------------
 
-(defconst pcl-cvs-version "1.05-CVS-$Name: r19-14 $"
+(defconst pcl-cvs-version "1.05-CVS-$Name: r19-15b6 $"
   "A string denoting the current release version of pcl-cvs.")
 
 ;; You are NOT allowed to disable this message by default.  However, you
@@ -144,8 +139,8 @@
 
 (defconst cvs-startup-message
   (if cvs-inhibit-copyright-message
-      "PCL-CVS release 1.05-CVS-$Name: r19-14 $"
-    "PCL-CVS release 1.05 from CVS release $Name: r19-14 $.
+      "PCL-CVS release 1.05-CVS-$Name: r19-15b6 $"
+    "PCL-CVS release 1.05 from CVS release $Name: r19-15b6 $.
 Copyright (C) 1992, 1993 Per Cederqvist
 Pcl-cvs comes with absolutely no warranty; for details consult the manual.
 This is free software, and you are welcome to redistribute it under certain
@@ -729,7 +724,7 @@
 \\[cvs-mode-undo-local-changes]   Revert the last checked in version - discard your changes to the file.
 
 Entry to this mode runs cvs-mode-hook.
-This description is updated for release 1.05-CVS-$Name: r19-14 $ of pcl-cvs.
+This description is updated for release 1.05-CVS-$Name: r19-15b6 $ of pcl-cvs.
 
 All bindings:
 \\{cvs-mode-map}"
@@ -1018,7 +1013,7 @@
     (insert "Pcl-cvs Version: "
 	    "@(#)OrigId: pcl-cvs.el,v 1.93 1993/05/31 22:44:00 ceder Exp\n")
     (insert "CVS Version: "
-	    "@(#)cvs/contrib/pcl-cvs:$Name: r19-14 $:$Id: pcl-cvs.el,v 1.1.1.1 1996/12/18 03:32:27 steve Exp $\n\n")
+	    "@(#)lisp/pcl-cvs:$Name: r19-15b6 $:$Id: pcl-cvs.el,v 1.2 1996/12/29 00:15:02 steve Exp $\n\n")
     (insert (format "--- Contents of stdout buffer (%d chars) ---\n"
 		    (length stdout)))
     (insert stdout)
@@ -1229,6 +1224,9 @@
 	 ((looking-at
 	   "^cvs \\(update\\|server\\): \\[..:..:..\\] waiting for .*lock in ")
 	  (forward-line 1))
+	 ((looking-at
+	   "^cvs \\(update\\|server\\): \\[..:..:..\\] obtained lock in ")
+	  (forward-line 1))
 
 	 ;; File removed in repository, but edited by you.
 
@@ -1350,7 +1348,7 @@
 
 	     ((looking-at
 	       ;; Allow both RCS 5.5 and 5.6.  (5.6 prints "rcs" and " warning").
-	       "^\\(rcs\\)?merge[:]*\\( warning\\)?: \\((overlaps\\|conflicts\\) during merge$")
+	       "^\\(rcs\\)?merge[:]*\\( warning\\)?: \\(overlaps\\|conflicts\\) during merge$")
 
 	      ;; Yes, this is a conflict.
 	      (cvs-skip-line stdout-buffer stderr-buffer
@@ -1604,11 +1602,11 @@
   (define-key cvs-mode-map "\C-p"	'cvs-mode-previous-line)
   ;; ^C- keys are used to set various flags to control CVS features
   (define-key cvs-mode-map "\C-c"	'cvs-mode-map-control-c-prefix)
-  (define-key cvs-mode-map "\C-cc"	'cvs-change-cvsroot)
-  (define-key cvs-mode-map "\C-cd"	'cvs-set-diff-flags)
-  (define-key cvs-mode-map "\C-cl"	'cvs-set-log-flags)
-  (define-key cvs-mode-map "\C-cs"	'cvs-set-status-flags)
-  (define-key cvs-mode-map "\C-cu"	'cvs-set-update-optional-flags)
+  (define-key cvs-mode-map "\C-c\C-c"	'cvs-change-cvsroot)
+  (define-key cvs-mode-map "\C-c\C-d"	'cvs-set-diff-flags)
+  (define-key cvs-mode-map "\C-c\C-l"	'cvs-set-log-flags)
+  (define-key cvs-mode-map "\C-c\C-s"	'cvs-set-status-flags)
+  (define-key cvs-mode-map "\C-c\C-u"	'cvs-set-update-optional-flags)
   ;; M- keys are usually those that operate on modules
   (define-key cvs-mode-map "\M-\C-?"	'cvs-mode-unmark-all-files)
   (define-key cvs-mode-map "\M-C"	'cvs-mode-rcs2log) ; i.e. "Create a ChangeLog"
@@ -3452,4 +3450,6 @@
       (setq cvs-commit-list marked)
       (message "Press C-c C-c when you are done editing."))))
 
-;;;; end of file pcl-cvs.el
+(provide 'pcl-cvs)
+
+;;; pcl-cvs.el ends here