From: Gerd Moellmann Date: Fri, 18 Feb 2000 10:50:09 +0000 (+0000) Subject: (caar, cadr, cdar, cddr): Add defsetfs. X-Git-Tag: emacs-pretest-21.0.90~4977 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c382fb0af7755f48312b964ecf9efa06cf9cc6e5;p=emacs.git (caar, cadr, cdar, cddr): Add defsetfs. --- diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index b0709ac1e40..f2663d7f385 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el @@ -1523,6 +1523,10 @@ Example: (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v))." (defsetf aref aset) (defsetf car setcar) (defsetf cdr setcdr) +(defsetf caar (x) (val) (list 'setcar (list 'car x) val)) +(defsetf cadr (x) (val) (list 'setcar (list 'cdr x) val)) +(defsetf cdar (x) (val) (list 'setcdr (list 'car x) val)) +(defsetf cddr (x) (val) (list 'setcdr (list 'cdr x) val)) (defsetf elt (seq n) (store) (list 'if (list 'listp seq) (list 'setcar (list 'nthcdr n seq) store) (list 'aset seq n store)))