emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/cl.el


From: Richard M. Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/cl.el
Date: Mon, 10 Jun 2002 05:00:52 -0400

Index: emacs/lisp/emacs-lisp/cl.el
diff -c emacs/lisp/emacs-lisp/cl.el:1.30 emacs/lisp/emacs-lisp/cl.el:1.31
*** emacs/lisp/emacs-lisp/cl.el:1.30    Sat Jun  8 17:42:00 2002
--- emacs/lisp/emacs-lisp/cl.el Mon Jun 10 05:00:52 2002
***************
*** 514,519 ****
--- 514,528 ----
        (push (pop list) res))
      (nreverse res)))
  
+ (defun copy-list (list)
+   "Return a copy of a list, which may be a dotted list.
+ The elements of the list are not copied, just the list structure itself."
+   (if (consp list)
+       (let ((res nil))
+       (while (consp list) (push (pop list) res))
+       (prog1 (nreverse res) (setcdr res list)))
+     (car list)))
+ 
  (defun cl-maclisp-member (item list)
    (while (and list (not (equal item (car list)))) (setq list (cdr list)))
    list)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]