[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/cl-macs.el
From: |
Juanma Barranquero |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/emacs-lisp/cl-macs.el |
Date: |
Wed, 01 Jun 2005 11:33:07 -0400 |
Index: emacs/lisp/emacs-lisp/cl-macs.el
diff -c emacs/lisp/emacs-lisp/cl-macs.el:1.51
emacs/lisp/emacs-lisp/cl-macs.el:1.52
*** emacs/lisp/emacs-lisp/cl-macs.el:1.51 Sun May 22 17:48:54 2005
--- emacs/lisp/emacs-lisp/cl-macs.el Wed Jun 1 15:33:06 2005
***************
*** 1565,1578 ****
This macro is an easy-to-use substitute for `define-setf-method' that works
well for simple place forms. In the simple `defsetf' form, `setf's of
the form (setf (NAME ARGS...) VAL) are transformed to function or macro
! calls of the form (FUNC ARGS... VAL). Example: (defsetf aref aset).
Alternate form: (defsetf NAME ARGLIST (STORE) BODY...).
Here, the above `setf' call is expanded by binding the argument forms ARGS
according to ARGLIST, binding the value form VAL to STORE, then executing
BODY, which must return a Lisp form that does the necessary `setf' operation.
Actually, ARGLIST and STORE may be bound to temporary variables which are
introduced automatically to preserve proper execution order of the arguments.
! Example: (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v))."
(if (listp arg1)
(let* ((largs nil) (largsr nil)
(temps nil) (tempsr nil)
--- 1565,1585 ----
This macro is an easy-to-use substitute for `define-setf-method' that works
well for simple place forms. In the simple `defsetf' form, `setf's of
the form (setf (NAME ARGS...) VAL) are transformed to function or macro
! calls of the form (FUNC ARGS... VAL). Example:
!
! (defsetf aref aset)
!
Alternate form: (defsetf NAME ARGLIST (STORE) BODY...).
Here, the above `setf' call is expanded by binding the argument forms ARGS
according to ARGLIST, binding the value form VAL to STORE, then executing
BODY, which must return a Lisp form that does the necessary `setf' operation.
Actually, ARGLIST and STORE may be bound to temporary variables which are
introduced automatically to preserve proper execution order of the arguments.
! Example:
!
! (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v))
!
! \(fn NAME [FUNC | ARGLIST (STORE) BODY...])"
(if (listp arg1)
(let* ((largs nil) (largsr nil)
(temps nil) (tempsr nil)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/emacs-lisp/cl-macs.el,
Juanma Barranquero <=