changeset 30618:9dd1a6504bdd

Use `nth' instead of `first', `second', and `third'.
author Gerd Moellmann <gerd@gnu.org>
date Sun, 06 Aug 2000 09:18:02 +0000
parents 5e28cf8a757a
children 33aed5c89562
files lisp/cvs-status.el lisp/pcvs-util.el lisp/pcvs.el
diffstat 3 files changed, 24 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/cvs-status.el	Sun Aug 06 09:17:27 2000 +0000
+++ b/lisp/cvs-status.el	Sun Aug 06 09:18:02 2000 +0000
@@ -5,7 +5,7 @@
 ;; Author: Stefan Monnier <monnier@cs.yale.edu>
 ;; Keywords: pcl-cvs cvs status tree
 ;; Version: $Name:  $
-;; Revision: $Id: cvs-status.el,v 1.3 2000/03/22 01:08:08 monnier Exp $
+;; Revision: $Id: cvs-status.el,v 1.4 2000/05/10 22:08:28 monnier Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -283,8 +283,8 @@
       (cvs-tree-merge tree1 (list (cons (cvs-tag-make (butlast vl2)) tree2)))))))))
 
 (defun cvs-tag-make-tag (tag)
-  (let ((vl (mapcar 'string-to-number (split-string (third tag) "\\."))))
-    (cvs-tag-make vl (first tag) (intern (second tag)))))
+  (let ((vl (mapcar 'string-to-number (split-string (nth 2 tag) "\\."))))
+    (cvs-tag-make vl (nth 0 tag) (intern (nth 1 tag)))))
 
 (defun cvs-tags->tree (tags)
   "Make a tree out of a list of TAGS."
@@ -425,9 +425,9 @@
 	      ;;(pt (save-excursion (forward-line -1) (point)))
 	      )
 	  (setq tags (sort tags 'cvs-tag-lessp))
-	  (let* ((first (first tags))
+	  (let* ((first (nth 0 tags))
 		 (prev (if (cvs-tag-p first)
-			   (list (first (cvs-tag->vlist first))) nil)))
+			   (list (nth 0 (cvs-tag->vlist first))) nil)))
 	    (cvs-tree-tags-insert tags prev)
 	    ;;(cvs-refontify pt (point))
 	    (sit-for 0)))))))
@@ -505,6 +505,9 @@
 
 ;;; Change Log:
 ;; $Log: cvs-status.el,v $
+;; Revision 1.4  2000/05/10 22:08:28  monnier
+;; (cvs-status-minor-wrap): Use mark-active.
+;;
 ;; Revision 1.3  2000/03/22 01:08:08  monnier
 ;; (cvs-status-mode): Use define-derived-mode.
 ;;
--- a/lisp/pcvs-util.el	Sun Aug 06 09:17:27 2000 +0000
+++ b/lisp/pcvs-util.el	Sun Aug 06 09:18:02 2000 +0000
@@ -5,7 +5,7 @@
 ;; Author: Stefan Monnier <monnier@cs.yale.edu>
 ;; Keywords: pcl-cvs
 ;; Version: $Name:  $
-;; Revision: $Id: pcvs-util.el,v 1.2 2000/03/17 10:07:00 fx Exp $
+;; Revision: $Id: pcvs-util.el,v 1.1 2000/08/05 19:33:53 gerd Exp gerd $
 
 ;; This file is part of GNU Emacs.
 
@@ -314,7 +314,7 @@
 	   (unless (>= (length defaults) cvs-prefix-number)
 	     (setq defaults (append defaults
 				    (make-list (1- cvs-prefix-number)
-					       (first defaults)))))
+					       (nth 0 defaults)))))
 	   (-cvs-flags-make ,desc defaults ,qtypedesc ,hist-sym))))))
 
 (defun cvs-prefix-make-local (sym)
@@ -347,7 +347,7 @@
 	 (cond
 	  ((null arg)
 	   (setf (cvs-flags-persist prefix) nil)
-	   (unless (symbol-value sym) (first (cvs-flags-defaults prefix))))
+	   (unless (symbol-value sym) (nth 0 (cvs-flags-defaults prefix))))
 
 	  ((or (consp arg) (< numarg 0))
 	   (setf (nth (- numarg) (cvs-flags-defaults prefix))
--- a/lisp/pcvs.el	Sun Aug 06 09:17:27 2000 +0000
+++ b/lisp/pcvs.el	Sun Aug 06 09:18:02 2000 +0000
@@ -14,7 +14,7 @@
 ;; Maintainer: (Stefan Monnier) monnier+lists/cvs/pcl@flint.cs.yale.edu
 ;; Keywords: CVS, version control, release management
 ;; Version: $Name:  $
-;; Revision: $Id: pcvs.el,v 1.1 2000/08/05 19:28:18 gerd Exp gerd $
+;; Revision: $Id: pcvs.el,v 1.6 2000/08/05 20:08:49 gerd Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -138,7 +138,7 @@
 (defun cvs-defaults (&rest defs)
   (let ((defs (cvs-first defs cvs-shared-start)))
     (append defs
-	    (make-list (- cvs-shared-start (length defs)) (first defs))
+	    (make-list (- cvs-shared-start (length defs)) (nth 0 defs))
 	    cvs-shared-flags)))
 
 ;; For cvs flags, we need to add "-f" to override the cvsrc settings
@@ -338,8 +338,8 @@
 from the current buffer."
   (let* ((cvs-buf (current-buffer))
 	 (info (cdr (assoc cmd cvs-buffer-name-alist)))
-	 (name (eval (first info)))
-	 (mode (second info))
+	 (name (eval (nth 0 info)))
+	 (mode (nth 1 info))
 	 (dir default-directory)
 	 (buf (cond
 	       (name (cvs-get-buffer-create name))
@@ -496,9 +496,9 @@
 			(fi (car fis) (car fis)))
 		      ((not (and fis (string= dir (cvs-fileinfo->dir fi))))
 		       (list dir files fis))))))
-	     (dir (first dir+files+rest))
-	     (files (second dir+files+rest))
-	     (rest (third dir+files+rest)))
+	     (dir (nth 0 dir+files+rest))
+	     (files (nth 1 dir+files+rest))
+	     (rest (nth 2 dir+files+rest)))
 
 	;; setup the (current) process buffer
 	(set (make-local-variable 'cvs-postprocess)
@@ -666,8 +666,8 @@
     (cond
      ;; a trivial interaction, no need to move it
      ((or (eq style 'SIMPLE)
-	  (null (second interact))
-	  (stringp (second interact)))
+	  (null (nth 1 interact))
+	  (stringp (nth 1 interact)))
       `(defun ,fun ,args ,docstring ,interact
 	 (cvs-mode! (lambda () ,@body))))
 
@@ -1301,7 +1301,7 @@
   (pop-to-buffer (cvs-temp-buffer "message" 'normal 'nosetup))
   (set (make-local-variable 'cvs-minor-wrap-function) 'cvs-commit-minor-wrap)
   (let ((lbd list-buffers-directory)
-	(setupfun (or (third (cdr (assoc "message" cvs-buffer-name-alist)))
+	(setupfun (or (nth 2 (cdr (assoc "message" cvs-buffer-name-alist)))
 		      'cvs-edit)))
     (funcall setupfun 'cvs-do-commit setup 'cvs-commit-filelist)
     (set (make-local-variable 'list-buffers-directory) lbd)))
@@ -1540,12 +1540,12 @@
 	 (fis (cvs-mode-marked 'diff "idiff" :file t)))
     (when (> (length fis) 2)
       (error "idiff-other cannot be applied to more than 2 files at a time."))
-    (let* ((fi1 (first fis))
+    (let* ((fi1 (nth 0 fis))
 	   (rev1-buf (if rev1 (cvs-retrieve-revision fi1 rev1)
 		       (find-file-noselect (cvs-fileinfo->full-path fi1))))
 	   rev2-buf)
       (if (cdr fis)
-	  (let ((fi2 (second fis)))
+	  (let ((fi2 (nth 1 fis)))
 	    (setq rev2-buf
 		  (if rev2 (cvs-retrieve-revision fi2 rev2)
 		    (find-file-noselect (cvs-fileinfo->full-path fi2)))))
@@ -1595,7 +1595,7 @@
 			 (member cmd cvs-execute-single-dir)))
 	 (parse (member cmd cvs-parse-known-commands))
 	 (args (append cvsargs (list cmd) flags))
-	 (after-mode (third (cdr (assoc cmd cvs-buffer-name-alist)))))
+	 (after-mode (nth 2 (cdr (assoc cmd cvs-buffer-name-alist)))))
     (cvs-cleanup-collection cvs-cookies ;cleanup remaining messages
 			    (eq cvs-auto-remove-handled 'delayed) nil t)
     (when (fboundp after-mode)