🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Litvintchouk Wed, 05 Nov 1986 14:50
CADR, etc., in GNU Emacs-Lisp
#2212
Author: Litvintchouk
Date: Wed, 05 Nov 1986 14:50
29 lines
1704 bytes
When programming functions in GNU Emacs-Lisp, one would like to have
such convenient abbreviations for multiple car's and cdr's as caar
(car of car), cadr (car of cdr), etc.  Unfortunately, these are not
defined in GNU Emacs-Lisp upon startup.  (Strangely enough, convenient
macros for these do exist, but in the rnews.el library, so you only
get them when you read news!)

I would like to suggest that in future versions of GNUEmacs, the
following macros be moved from rnews.el to, say, simple.el, so that
they will be automatically available when GNUmacs is started up:

(defmacro caar (x) (list 'car (list 'car x)))
(defmacro cadr (x) (list 'car (list 'cdr x)))
(defmacro cdar (x) (list 'cdr (list 'car x)))
(defmacro caddr (x) (list 'car (list 'cdr (list 'cdr x))))
(defmacro cadar (x) (list 'car (list 'cdr (list 'car x))))
(defmacro caadr (x) (list 'car (list 'car (list 'cdr x))))
(defmacro cdadr (x) (list 'cdr (list 'car (list 'cdr x))))


Steven Litvintchouk
MITRE Corporation
Burlington Road
Bedford, MA  01730
(617)271-7753

ARPA:  sdl@mitre-bedford
UUCP:  ...{cbosgd,decvax,genrad,ll-xn,philabs,security,utzoo}!linus!sdl
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads