all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Daniel Colascione <danc@merrillprint.com>
To: emacs-devel@gnu.org
Subject: [PATCH] inline CL list functions
Date: Mon, 10 Aug 2009 13:45:46 -0400	[thread overview]
Message-ID: <200908101345.46352.danc@merrillprint.com> (raw)

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	other threads:[~2009-08-10 17:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200908101345.46352.danc@merrillprint.com \
    --to=danc@merrillprint.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.