summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2005-06-01 15:33:50 +0000
committerJuanma Barranquero <lekktu@gmail.com>2005-06-01 15:33:50 +0000
commit358e4d6d1db0b101d2862f97475f6e5999f8bfa0 (patch)
treef435e7f7e1dc986b9f9210adf1b9d26e8119fe96 /lisp/emacs-lisp
parent859463640aab206bbead70e359e5e480c8b11750 (diff)
downloademacs-358e4d6d1db0b101d2862f97475f6e5999f8bfa0.tar.gz
emacs-358e4d6d1db0b101d2862f97475f6e5999f8bfa0.tar.bz2
emacs-358e4d6d1db0b101d2862f97475f6e5999f8bfa0.zip
(defsetf): Improve argument/docstring consistency.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/cl-macs.el11
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 4a01181e777..0301476afc2 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -1565,14 +1565,21 @@ form. See `defsetf' for a simpler way to define most setf-methods.
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).
+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))."
+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)