aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2004-05-28 19:09:33 +0000
committerJuanma Barranquero2004-05-28 19:09:33 +0000
commit287aae6ce97e0a6bfd62ef259d2f9a44f00c547e (patch)
tree55a1e894cdc56b0d95d8ff07218f83c1f4b1768b
parent1703d649a7ef3303239c039665f6014d56c5ce6b (diff)
downloademacs-287aae6ce97e0a6bfd62ef259d2f9a44f00c547e.tar.gz
emacs-287aae6ce97e0a6bfd62ef259d2f9a44f00c547e.zip
(cvs-butlast, cvs-nbutlast): Remove (`butlast' and `nbutlast' are in
subr.el).
-rw-r--r--lisp/pcvs-util.el19
1 files changed, 1 insertions, 18 deletions
diff --git a/lisp/pcvs-util.el b/lisp/pcvs-util.el
index 86fafea37ea..3380077c74a 100644
--- a/lisp/pcvs-util.el
+++ b/lisp/pcvs-util.el
@@ -1,6 +1,6 @@
1;;; pcvs-util.el --- utility functions for PCL-CVS -*- byte-compile-dynamic: t -*- 1;;; pcvs-util.el --- utility functions for PCL-CVS -*- byte-compile-dynamic: t -*-
2 2
3;; Copyright (C) 1991,92,93,94,95,96,97,98,99,2000, 2001 3;; Copyright (C) 1991,92,93,94,95,96,97,98,99, 2000,01,04
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Stefan Monnier <monnier@cs.yale.edu> 6;; Author: Stefan Monnier <monnier@cs.yale.edu>
@@ -50,7 +50,6 @@
50 (dolist (x xs zs) 50 (dolist (x xs zs)
51 (unless (member x ys) (push x zs))))) 51 (unless (member x ys) (push x zs)))))
52 52
53
54(defun cvs-map (-cvs-map-f &rest -cvs-map-ls) 53(defun cvs-map (-cvs-map-f &rest -cvs-map-ls)
55 (unless (cvs-every 'null -cvs-map-ls) 54 (unless (cvs-every 'null -cvs-map-ls)
56 (cons (apply -cvs-map-f (mapcar 'car -cvs-map-ls)) 55 (cons (apply -cvs-map-f (mapcar 'car -cvs-map-ls))
@@ -77,22 +76,6 @@ the other elements. The ordering among elements is maintained."
77 (if (funcall p x) (push x car) (push x cdr))) 76 (if (funcall p x) (push x car) (push x cdr)))
78 (cons (nreverse car) (nreverse cdr)))) 77 (cons (nreverse car) (nreverse cdr))))
79 78
80;; Copied from CL ;-(
81
82(defun cvs-butlast (x &optional n)
83 "Returns a copy of LIST with the last N elements removed."
84 (if (and n (<= n 0)) x
85 (cvs-nbutlast (copy-sequence x) n)))
86
87(defun cvs-nbutlast (x &optional n)
88 "Modifies LIST to remove the last N elements."
89 (let ((m (length x)))
90 (or n (setq n 1))
91 (and (< n m)
92 (progn
93 (if (> n 0) (setcdr (nthcdr (- (1- m) n) x) nil))
94 x))))
95
96;;; 79;;;
97;;; frame, window, buffer handling 80;;; frame, window, buffer handling
98;;; 81;;;