summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/cl.el
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2000-12-28 12:16:03 +0000
committerKenichi Handa <handa@m17n.org>2000-12-28 12:16:03 +0000
commit3aac3bcfdb79ab81736a9642ed27ac8cee6dd3c3 (patch)
treef96b786bd11fa9b1b43972289e3da859b9ffbf75 /lisp/emacs-lisp/cl.el
parent1c1c65de36652e5ea0dcec9f7b37d0dc7eeb035c (diff)
downloademacs-3aac3bcfdb79ab81736a9642ed27ac8cee6dd3c3.tar.gz
emacs-3aac3bcfdb79ab81736a9642ed27ac8cee6dd3c3.tar.bz2
emacs-3aac3bcfdb79ab81736a9642ed27ac8cee6dd3c3.zip
(butlast, nbutlast): Moved to subr.el.
Diffstat (limited to 'lisp/emacs-lisp/cl.el')
-rw-r--r--lisp/emacs-lisp/cl.el14
1 files changed, 0 insertions, 14 deletions
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el
index 0e8897db2f4..1b8bb838a8f 100644
--- a/lisp/emacs-lisp/cl.el
+++ b/lisp/emacs-lisp/cl.el
@@ -472,20 +472,6 @@ SEQ, this is like `mapcar'. With several, it is like the Common Lisp
;; (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