2001-07-24 Katsumi Yamaoka <yamaoka@jpl.org>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Tue, 24 Jul 2001 17:55:06 +0000 (17:55 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Tue, 24 Jul 2001 17:55:06 +0000 (17:55 +0000)
* dgnushack.el (copy-list): New compiler macro.

lisp/ChangeLog
lisp/dgnushack.el

index e197372..090a5c2 100644 (file)
@@ -1,3 +1,7 @@
+2001-07-24  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * dgnushack.el (copy-list): New compiler macro.
+
 2001-07-24 09:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * message.el (message-bounce): If no Return-Path, the whole
index ae16322..9f4eca2 100644 (file)
                          (setq i (1+ i)
                                start (1+ start)))
                        res)))))))))
+
+  (define-compiler-macro copy-list (&whole form list)
+    (if (and (fboundp 'copy-list)
+            (subrp (symbol-function 'copy-list)))
+       form
+      `(let ((list ,list))
+        (if (consp list)
+            (let ((res nil))
+              (while (consp list) (push (pop list) res))
+              (prog1 (nreverse res) (setcdr res list)))
+          (car list)))))
   )
 
 ;; If we are building w3 in a different directory than the source