emacs-devel
[Top][All Lists]
Advanced

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

[PATCH] inline CL list functions


From: Daniel Colascione
Subject: [PATCH] inline CL list functions
Date: Mon, 10 Aug 2009 13:45:46 -0400
User-agent: KMail/1.11.4 (Linux/2.6.29.6-217.2.3.fc11.i586; KDE/4.2.4; i686; ; )

I can't see any reason these shouldn't be defsubsts.

--- /net/home/danc/software/emacs/lisp/emacs-lisp/cl.el 2009-08-10 
13:40:59.000000000 -0400
+++ new-cl.el   2009-08-10 13:43:30.000000000 -0400
@@ -369,131 +369,131 @@
 (defalias 'rest 'cdr)
 (defalias 'endp 'null)
 
-(defun third (x)
+(defsubst third (x)
   "Return the third element of the list X."
   (car (cdr (cdr x))))
 
-(defun fourth (x)
+(defsubst fourth (x)
   "Return the fourth element of the list X."
   (nth 3 x))
 
-(defun fifth (x)
+(defsubst fifth (x)
   "Return the fifth element of the list X."
   (nth 4 x))
 
-(defun sixth (x)
+(defsubst sixth (x)
   "Return the sixth element of the list X."
   (nth 5 x))
 
-(defun seventh (x)
+(defsubst seventh (x)
   "Return the seventh element of the list X."
   (nth 6 x))
 
-(defun eighth (x)
+(defsubst eighth (x)
   "Return the eighth element of the list X."
   (nth 7 x))
 
-(defun ninth (x)
+(defsubst ninth (x)
   "Return the ninth element of the list X."
   (nth 8 x))
 
-(defun tenth (x)
+(defsubst tenth (x)
   "Return the tenth element of the list X."
   (nth 9 x))
 
-(defun caaar (x)
+(defsubst caaar (x)
   "Return the `car' of the `car' of the `car' of X."
   (car (car (car x))))
 
-(defun caadr (x)
+(defsubst caadr (x)
   "Return the `car' of the `car' of the `cdr' of X."
   (car (car (cdr x))))
 
-(defun cadar (x)
+(defsubst cadar (x)
   "Return the `car' of the `cdr' of the `car' of X."
   (car (cdr (car x))))
 
-(defun caddr (x)
+(defsubst caddr (x)
   "Return the `car' of the `cdr' of the `cdr' of X."
   (car (cdr (cdr x))))
 
-(defun cdaar (x)
+(defsubst cdaar (x)
   "Return the `cdr' of the `car' of the `car' of X."
   (cdr (car (car x))))
 
-(defun cdadr (x)
+(defsubst cdadr (x)
   "Return the `cdr' of the `car' of the `cdr' of X."
   (cdr (car (cdr x))))
 
-(defun cddar (x)
+(defsubst cddar (x)
   "Return the `cdr' of the `cdr' of the `car' of X."
   (cdr (cdr (car x))))
 
-(defun cdddr (x)
+(defsubst cdddr (x)
   "Return the `cdr' of the `cdr' of the `cdr' of X."
   (cdr (cdr (cdr x))))
 
-(defun caaaar (x)
+(defsubst caaaar (x)
   "Return the `car' of the `car' of the `car' of the `car' of X."
   (car (car (car (car x)))))
 
-(defun caaadr (x)
+(defsubst caaadr (x)
   "Return the `car' of the `car' of the `car' of the `cdr' of X."
   (car (car (car (cdr x)))))
 
-(defun caadar (x)
+(defsubst caadar (x)
   "Return the `car' of the `car' of the `cdr' of the `car' of X."
   (car (car (cdr (car x)))))
 
-(defun caaddr (x)
+(defsubst caaddr (x)
   "Return the `car' of the `car' of the `cdr' of the `cdr' of X."
   (car (car (cdr (cdr x)))))
 
-(defun cadaar (x)
+(defsubst cadaar (x)
   "Return the `car' of the `cdr' of the `car' of the `car' of X."
   (car (cdr (car (car x)))))
 
-(defun cadadr (x)
+(defsubst cadadr (x)
   "Return the `car' of the `cdr' of the `car' of the `cdr' of X."
   (car (cdr (car (cdr x)))))
 
-(defun caddar (x)
+(defsubst caddar (x)
   "Return the `car' of the `cdr' of the `cdr' of the `car' of X."
   (car (cdr (cdr (car x)))))
 
-(defun cadddr (x)
+(defsubst cadddr (x)
   "Return the `car' of the `cdr' of the `cdr' of the `cdr' of X."
   (car (cdr (cdr (cdr x)))))
 
-(defun cdaaar (x)
+(defsubst cdaaar (x)
   "Return the `cdr' of the `car' of the `car' of the `car' of X."
   (cdr (car (car (car x)))))
 
-(defun cdaadr (x)
+(defsubst cdaadr (x)
   "Return the `cdr' of the `car' of the `car' of the `cdr' of X."
   (cdr (car (car (cdr x)))))
 
-(defun cdadar (x)
+(defsubst cdadar (x)
   "Return the `cdr' of the `car' of the `cdr' of the `car' of X."
   (cdr (car (cdr (car x)))))
 
-(defun cdaddr (x)
+(defsubst cdaddr (x)
   "Return the `cdr' of the `car' of the `cdr' of the `cdr' of X."
   (cdr (car (cdr (cdr x)))))
 
-(defun cddaar (x)
+(defsubst cddaar (x)
   "Return the `cdr' of the `cdr' of the `car' of the `car' of X."
   (cdr (cdr (car (car x)))))
 
-(defun cddadr (x)
+(defsubst cddadr (x)
   "Return the `cdr' of the `cdr' of the `car' of the `cdr' of X."
   (cdr (cdr (car (cdr x)))))
 
-(defun cdddar (x)
+(defsubst cdddar (x)
   "Return the `cdr' of the `cdr' of the `cdr' of the `car' of X."
   (cdr (cdr (cdr (car x)))))
 
-(defun cddddr (x)
+(defsubst cddddr (x)
   "Return the `cdr' of the `cdr' of the `cdr' of the `cdr' of X."
   (cdr (cdr (cdr (cdr x)))))
 




reply via email to

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