aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Moellmann2000-08-06 09:17:27 +0000
committerGerd Moellmann2000-08-06 09:17:27 +0000
commitdc79c3ea3c2fbcaf80b70e33517c573451d671bb (patch)
tree44dfbbfb83c68e63461fd23bb6fae5ba9e1af2e8
parent6968a481f5e1c375b403263e233e9292196e1b79 (diff)
downloademacs-dc79c3ea3c2fbcaf80b70e33517c573451d671bb.tar.gz
emacs-dc79c3ea3c2fbcaf80b70e33517c573451d671bb.zip
(third...tenth): Undo change of 2000-08-05.
(second): Make it an alias for `cadr'.
-rw-r--r--lisp/emacs-lisp/cl.el21
1 files changed, 9 insertions, 12 deletions
diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el
index 2d91043077e..29e7f6d2ac5 100644
--- a/lisp/emacs-lisp/cl.el
+++ b/lisp/emacs-lisp/cl.el
@@ -329,42 +329,39 @@ SEQ, this is like `mapcar'. With several, it is like the Common Lisp
329;;; List functions. 329;;; List functions.
330 330
331(defalias 'first 'car) 331(defalias 'first 'car)
332(defalias 'second 'cadr)
332(defalias 'rest 'cdr) 333(defalias 'rest 'cdr)
333(defalias 'endp 'null) 334(defalias 'endp 'null)
334 335
335(defmacro second (x) 336(defun third (x)
336 "Return the second element of the list LIST."
337 `(car (cdr ,x)))
338
339(defmacro third (x)
340 "Return the third element of the list LIST." 337 "Return the third element of the list LIST."
341 `(car (cdr (cdr ,x)))) 338 `(car (cdr (cdr ,x))))
342 339
343(defmacro fourth (x) 340(defun fourth (x)
344 "Return the fourth element of the list LIST." 341 "Return the fourth element of the list LIST."
345 `(nth 3 ,x)) 342 `(nth 3 ,x))
346 343
347(defmacro fifth (x) 344(defun fifth (x)
348 "Return the fifth element of the list LIST." 345 "Return the fifth element of the list LIST."
349 `(nth 4 ,x)) 346 `(nth 4 ,x))
350 347
351(defmacro sixth (x) 348(defun sixth (x)
352 "Return the sixth element of the list LIST." 349 "Return the sixth element of the list LIST."
353 `(nth 5 ,x)) 350 `(nth 5 ,x))
354 351
355(defmacro seventh (x) 352(defun seventh (x)
356 "Return the seventh element of the list LIST." 353 "Return the seventh element of the list LIST."
357 `(nth 6 ,x)) 354 `(nth 6 ,x))
358 355
359(defmacro eighth (x) 356(defun eighth (x)
360 "Return the eighth element of the list LIST." 357 "Return the eighth element of the list LIST."
361 `(nth 7 ,x)) 358 `(nth 7 ,x))
362 359
363(defmacro ninth (x) 360(defun ninth (x)
364 "Return the ninth element of the list LIST." 361 "Return the ninth element of the list LIST."
365 `(nth 8 ,x)) 362 `(nth 8 ,x))
366 363
367(defmacro tenth (x) 364(defun tenth (x)
368 "Return the tenth element of the list LIST." 365 "Return the tenth element of the list LIST."
369 `(nth 9 ,x)) 366 `(nth 9 ,x))
370 367