comparison lisp/pcvs-util.el @ 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 06cfa273543d
children c76308387eec
comparison
equal deleted inserted replaced
30617:5e28cf8a757a 30618:9dd1a6504bdd
3 ;; Copyright (C) 1998-2000 Free Software Foundation, Inc. 3 ;; Copyright (C) 1998-2000 Free Software Foundation, Inc.
4 4
5 ;; Author: Stefan Monnier <monnier@cs.yale.edu> 5 ;; Author: Stefan Monnier <monnier@cs.yale.edu>
6 ;; Keywords: pcl-cvs 6 ;; Keywords: pcl-cvs
7 ;; Version: $Name: $ 7 ;; Version: $Name: $
8 ;; Revision: $Id: pcvs-util.el,v 1.2 2000/03/17 10:07:00 fx Exp $ 8 ;; Revision: $Id: pcvs-util.el,v 1.1 2000/08/05 19:33:53 gerd Exp gerd $
9 9
10 ;; This file is part of GNU Emacs. 10 ;; This file is part of GNU Emacs.
11 11
12 ;; GNU Emacs is free software; you can redistribute it and/or modify 12 ;; GNU Emacs is free software; you can redistribute it and/or modify
13 ;; it under the terms of the GNU General Public License as published by 13 ;; it under the terms of the GNU General Public License as published by
312 (let ((defaults ,defaults)) 312 (let ((defaults ,defaults))
313 ;; sanity ensurance 313 ;; sanity ensurance
314 (unless (>= (length defaults) cvs-prefix-number) 314 (unless (>= (length defaults) cvs-prefix-number)
315 (setq defaults (append defaults 315 (setq defaults (append defaults
316 (make-list (1- cvs-prefix-number) 316 (make-list (1- cvs-prefix-number)
317 (first defaults))))) 317 (nth 0 defaults)))))
318 (-cvs-flags-make ,desc defaults ,qtypedesc ,hist-sym)))))) 318 (-cvs-flags-make ,desc defaults ,qtypedesc ,hist-sym))))))
319 319
320 (defun cvs-prefix-make-local (sym) 320 (defun cvs-prefix-make-local (sym)
321 (let ((cps (cvs-prefix-sym sym))) 321 (let ((cps (cvs-prefix-sym sym)))
322 (make-local-variable sym) 322 (make-local-variable sym)
345 ;; set the value 345 ;; set the value
346 (set sym 346 (set sym
347 (cond 347 (cond
348 ((null arg) 348 ((null arg)
349 (setf (cvs-flags-persist prefix) nil) 349 (setf (cvs-flags-persist prefix) nil)
350 (unless (symbol-value sym) (first (cvs-flags-defaults prefix)))) 350 (unless (symbol-value sym) (nth 0 (cvs-flags-defaults prefix))))
351 351
352 ((or (consp arg) (< numarg 0)) 352 ((or (consp arg) (< numarg 0))
353 (setf (nth (- numarg) (cvs-flags-defaults prefix)) 353 (setf (nth (- numarg) (cvs-flags-defaults prefix))
354 (cvs-query-read (nth (- numarg) (cvs-flags-defaults prefix)) 354 (cvs-query-read (nth (- numarg) (cvs-flags-defaults prefix))
355 (format "%s: " (cvs-flags-desc prefix)) 355 (format "%s: " (cvs-flags-desc prefix))