diff options
| author | Juanma Barranquero | 2005-06-01 15:33:50 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2005-06-01 15:33:50 +0000 |
| commit | 358e4d6d1db0b101d2862f97475f6e5999f8bfa0 (patch) | |
| tree | f435e7f7e1dc986b9f9210adf1b9d26e8119fe96 | |
| parent | 859463640aab206bbead70e359e5e480c8b11750 (diff) | |
| download | emacs-358e4d6d1db0b101d2862f97475f6e5999f8bfa0.tar.gz emacs-358e4d6d1db0b101d2862f97475f6e5999f8bfa0.zip | |
(defsetf): Improve argument/docstring consistency.
| -rw-r--r-- | lisp/ChangeLog | 3 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 11 |
2 files changed, 12 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8312df06d6e..4ea507543e6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,8 @@ | |||
| 1 | 2005-06-01 Juanma Barranquero <lekktu@gmail.com> | 1 | 2005-06-01 Juanma Barranquero <lekktu@gmail.com> |
| 2 | 2 | ||
| 3 | * emacs-lisp/cl-macs.el (defsetf): | ||
| 4 | Improve argument/docstring consistency. | ||
| 5 | |||
| 3 | * faces.el (list-faces-display): Improve the formatting by | 6 | * faces.el (list-faces-display): Improve the formatting by |
| 4 | computing the maximum length required for any face-name (reworked | 7 | computing the maximum length required for any face-name (reworked |
| 5 | patch of 1999-01-11, accidentally deleted on 1999-07-21). | 8 | patch of 1999-01-11, accidentally deleted on 1999-07-21). |
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. | |||
| 1565 | This macro is an easy-to-use substitute for `define-setf-method' that works | 1565 | This macro is an easy-to-use substitute for `define-setf-method' that works |
| 1566 | well for simple place forms. In the simple `defsetf' form, `setf's of | 1566 | well for simple place forms. In the simple `defsetf' form, `setf's of |
| 1567 | the form (setf (NAME ARGS...) VAL) are transformed to function or macro | 1567 | the form (setf (NAME ARGS...) VAL) are transformed to function or macro |
| 1568 | calls of the form (FUNC ARGS... VAL). Example: (defsetf aref aset). | 1568 | calls of the form (FUNC ARGS... VAL). Example: |
| 1569 | |||
| 1570 | (defsetf aref aset) | ||
| 1571 | |||
| 1569 | Alternate form: (defsetf NAME ARGLIST (STORE) BODY...). | 1572 | Alternate form: (defsetf NAME ARGLIST (STORE) BODY...). |
| 1570 | Here, the above `setf' call is expanded by binding the argument forms ARGS | 1573 | Here, the above `setf' call is expanded by binding the argument forms ARGS |
| 1571 | according to ARGLIST, binding the value form VAL to STORE, then executing | 1574 | according to ARGLIST, binding the value form VAL to STORE, then executing |
| 1572 | BODY, which must return a Lisp form that does the necessary `setf' operation. | 1575 | BODY, which must return a Lisp form that does the necessary `setf' operation. |
| 1573 | Actually, ARGLIST and STORE may be bound to temporary variables which are | 1576 | Actually, ARGLIST and STORE may be bound to temporary variables which are |
| 1574 | introduced automatically to preserve proper execution order of the arguments. | 1577 | introduced automatically to preserve proper execution order of the arguments. |
| 1575 | Example: (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v))." | 1578 | Example: |
| 1579 | |||
| 1580 | (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v)) | ||
| 1581 | |||
| 1582 | \(fn NAME [FUNC | ARGLIST (STORE) BODY...])" | ||
| 1576 | (if (listp arg1) | 1583 | (if (listp arg1) |
| 1577 | (let* ((largs nil) (largsr nil) | 1584 | (let* ((largs nil) (largsr nil) |
| 1578 | (temps nil) (tempsr nil) | 1585 | (temps nil) (tempsr nil) |