Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CADR, etc., in GNU Emacs-Lisp

29 views
Skip to first unread message

Litvintchouk

unread,
Nov 5, 1986, 9:50:17 AM11/5/86
to

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

0 new messages