# HG changeset patch # User Kenichi Handa # Date 978005763 0 # Node ID 6ab3c587f8bc2c61a24cac9ab822fbca9d220bed # Parent 1486728b21f0c52edf41aa91bf9efaee78f83021 (butlast, nbutlast): Moved to subr.el. diff -r 1486728b21f0 -r 6ab3c587f8bc lisp/emacs-lisp/cl.el --- a/lisp/emacs-lisp/cl.el Thu Dec 28 12:15:44 2000 +0000 +++ b/lisp/emacs-lisp/cl.el Thu Dec 28 12:16:03 2000 +0000 @@ -472,20 +472,6 @@ ;; (while (consp (cdr x)) (pop x)) ;; x)) -(defun butlast (x &optional n) - "Returns a copy of LIST with the last N elements removed." - (if (and n (<= n 0)) x - (nbutlast (copy-sequence x) n))) - -(defun 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)))) - (defun list* (arg &rest rest) ; See compiler macro in cl-macs.el "Return a new list with specified args as elements, cons'd to last arg. Thus, `(list* A B C D)' is equivalent to `(nconc (list A B C) D)', or to