[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/doc/misc ChangeLog cl.texi
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] emacs/doc/misc ChangeLog cl.texi |
Date: |
Wed, 07 Oct 2009 15:04:44 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Chong Yidong <cyd> 09/10/07 15:04:44
Modified files:
doc/misc : ChangeLog cl.texi
Log message:
* cl.texi (Argument Lists): Clarify explicit keyword arguments.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/doc/misc/ChangeLog?cvsroot=emacs&r1=1.326&r2=1.327
http://cvs.savannah.gnu.org/viewcvs/emacs/doc/misc/cl.texi?cvsroot=emacs&r1=1.13&r2=1.14
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/doc/misc/ChangeLog,v
retrieving revision 1.326
retrieving revision 1.327
diff -u -b -r1.326 -r1.327
--- ChangeLog 7 Oct 2009 01:43:06 -0000 1.326
+++ ChangeLog 7 Oct 2009 15:04:43 -0000 1.327
@@ -1,3 +1,7 @@
+2009-10-07 Chong Yidong <address@hidden>
+
+ * cl.texi (Argument Lists): Clarify explicit keyword arguments.
+
2009-10-07 Juanma Barranquero <address@hidden>
* makefile.w32-in (INFO_TARGETS, DVI_TARGETS, clean): Add eieio, ede.
Index: cl.texi
===================================================================
RCS file: /sources/emacs/emacs/doc/misc/cl.texi,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- cl.texi 16 Feb 2009 17:42:00 -0000 1.13
+++ cl.texi 7 Oct 2009 15:04:43 -0000 1.14
@@ -457,15 +457,26 @@
@code{b} to the keyword @code{:c}, then signal an error because
@code{2} is not a valid keyword.
-If a @var{keyword} symbol is explicitly specified in the argument
-list as shown in the above diagram, then that keyword will be
-used instead of just the variable name prefixed with a colon.
-You can specify a @var{keyword} symbol which does not begin with
-a colon at all, but such symbols will not be self-quoting; you
-will have to quote them explicitly with an apostrophe in the
-function call.
+You can also explicitly specify the keyword argument; it need not be
+simply the variable name prefixed with a colon. For example,
+
address@hidden
+(defun* bar (&key (a 1) ((baz b) 4)))
address@hidden example
+
address@hidden
+
+specifies a keyword @code{:a} that sets the variable @code{a} with
+default value 1, as well as a keyword @code{baz} that sets the
+variable @code{b} with default value 4. In this case, because
address@hidden is not self-quoting, you must quote it explicitly in the
+function call, like this:
+
address@hidden
+(bar :a 10 'baz 42)
address@hidden example
-Ordinarily it is an error to pass an unrecognized keyword to
+Ordinarily, it is an error to pass an unrecognized keyword to
a function, e.g., @code{(foo 1 2 :c 3 :goober 4)}. You can ask
Lisp to ignore unrecognized keywords, either by adding the
marker @code{&allow-other-keys} after the keyword section
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/doc/misc ChangeLog cl.texi,
Chong Yidong <=