mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-03 11:33:37 +00:00
(caar, cadr, cdar, cddr): Add defsetfs.
This commit is contained in:
parent
3c0ed7cec3
commit
c382fb0af7
@ -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)))
|
||||
|
Loading…
Reference in New Issue
Block a user