Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!nike!ucbcad!ucbvax!MITRE-BEDFORD.ARPA!sdl From: sdl@MITRE-BEDFORD.ARPA (Litvintchouk) Newsgroups: net.emacs Subject: CADR, etc., in GNU Emacs-Lisp Message-ID: <8611051450.AA10994@mitre-bedford.ARPA> Date: Wed, 5-Nov-86 09:50:17 EST Article-I.D.: mitre-be.8611051450.AA10994 Posted: Wed Nov 5 09:50:17 1986 Date-Received: Wed, 5-Nov-86 22:30:49 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The MITRE Corp., Bedford, MA Lines: 29 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