Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
358e4d6d
Commit
358e4d6d
authored
Jun 01, 2005
by
Juanma Barranquero
Browse files
(defsetf): Improve argument/docstring consistency.
parent
85946364
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
lisp/ChangeLog
lisp/ChangeLog
+3
-0
lisp/emacs-lisp/cl-macs.el
lisp/emacs-lisp/cl-macs.el
+9
-2
No files found.
lisp/ChangeLog
View file @
358e4d6d
2005-06-01 Juanma Barranquero <lekktu@gmail.com>
* emacs-lisp/cl-macs.el (defsetf):
Improve argument/docstring consistency.
* faces.el (list-faces-display): Improve the formatting by
computing the maximum length required for any face-name (reworked
patch of 1999-01-11, accidentally deleted on 1999-07-21).
...
...
lisp/emacs-lisp/cl-macs.el
View file @
358e4d6d
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment