changeset 19491:f5fd22f3462c

(caar, cadr, cdar, cddr): Definitions moved here and changed into defsubsts.
author Richard M. Stallman <rms@gnu.org>
date Sat, 23 Aug 1997 18:55:52 +0000
parents 04b0c835c0eb
children 892a09772457
files lisp/subr.el
diffstat 1 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/subr.el	Sat Aug 23 18:53:50 1997 +0000
+++ b/lisp/subr.el	Sat Aug 23 18:55:52 1997 +0000
@@ -62,6 +62,22 @@
   (cons 'if (cons cond (cons nil body))))
 (put 'unless 'lisp-indent-function 1)
 (put 'unless 'edebug-form-spec '(&rest form))
+
+(defsubst caar (x)
+  "Return the car of the car of X."
+  (car (car x)))
+
+(defsubst cadr (x)
+  "Return the car of the cdr of X."
+  (car (cdr x)))
+
+(defsubst cdar (x)
+  "Return the cdr of the car of X."
+  (cdr (car x)))
+
+(defsubst cddr (x)
+  "Return the cdr of the cdr of X."
+  (cdr (cdr x)))
 
 ;;;; Keymap support.