/[emacs]/emacs/lisp/pcvs-util.el
ViewVC logotype

Diff of /emacs/lisp/pcvs-util.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17.4.2 by miles, Tue Oct 14 23:51:20 2003 UTC revision 1.17.4.3 by miles, Tue Jul 6 09:31:49 2004 UTC
# Line 1  Line 1 
1  ;;; pcvs-util.el --- utility functions for PCL-CVS  -*- byte-compile-dynamic: t -*-  ;;; pcvs-util.el --- utility functions for PCL-CVS  -*- byte-compile-dynamic: t -*-
2    
3  ;; Copyright (C) 1991,92,93,94,95,96,97,98,99,2000, 2001  ;; Copyright (C) 1991,92,93,94,95,96,97,98,99, 2000,01,04
4  ;;  Free Software Foundation, Inc.  ;;  Free Software Foundation, Inc.
5    
6  ;; Author: Stefan Monnier <monnier@cs.yale.edu>  ;; Author: Stefan Monnier <monnier@cs.yale.edu>
# Line 50  Line 50 
50      (dolist (x xs zs)      (dolist (x xs zs)
51        (unless (member x ys) (push x zs)))))        (unless (member x ys) (push x zs)))))
52    
   
53  (defun cvs-map (-cvs-map-f &rest -cvs-map-ls)  (defun cvs-map (-cvs-map-f &rest -cvs-map-ls)
54    (unless (cvs-every 'null -cvs-map-ls)    (unless (cvs-every 'null -cvs-map-ls)
55      (cons (apply -cvs-map-f (mapcar 'car -cvs-map-ls))      (cons (apply -cvs-map-f (mapcar 'car -cvs-map-ls))
# Line 77  the other elements.  The ordering among Line 76  the other elements.  The ordering among
76        (if (funcall p x) (push x car) (push x cdr)))        (if (funcall p x) (push x car) (push x cdr)))
77      (cons (nreverse car) (nreverse cdr))))      (cons (nreverse car) (nreverse cdr))))
78    
 ;; Copied from CL ;-(  
   
 (defun cvs-butlast (x &optional n)  
   "Returns a copy of LIST with the last N elements removed."  
   (if (and n (<= n 0)) x  
     (cvs-nbutlast (copy-sequence x) n)))  
   
 (defun cvs-nbutlast (x &optional n)  
   "Modifies LIST to remove the last N elements."  
   (let ((m (length x)))  
     (or n (setq n 1))  
     (and (< n m)  
          (progn  
            (if (> n 0) (setcdr (nthcdr (- (1- m) n) x) nil))  
            x))))  
   
79  ;;;  ;;;
80  ;;; frame, window, buffer handling  ;;; frame, window, buffer handling
81  ;;;  ;;;

Legend:
Removed from v.1.17.4.2  
changed lines
  Added in v.1.17.4.3

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26