diff options
| author | Stefan Monnier | 2000-11-08 14:31:51 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2000-11-08 14:31:51 +0000 |
| commit | a9c498a57d1990d161d615cf335c077e3b16bd7e (patch) | |
| tree | 1282f393a86506b77fc164a21c65d223c6867796 | |
| parent | 4faaa994b1a206e5d9b39721dbfa5b1d051f9589 (diff) | |
| download | emacs-a9c498a57d1990d161d615cf335c077e3b16bd7e.tar.gz emacs-a9c498a57d1990d161d615cf335c077e3b16bd7e.zip | |
Remove obsolete warnings about use of memq for keyword args.
| -rw-r--r-- | man/cl.texi | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/man/cl.texi b/man/cl.texi index b5fb683b7c9..4aa01b32f6e 100644 --- a/man/cl.texi +++ b/man/cl.texi | |||
| @@ -498,19 +498,6 @@ accepts other keyword arguments which are passed on to the | |||
| 498 | keep both @code{find-thing} and @code{member*} from complaining | 498 | keep both @code{find-thing} and @code{member*} from complaining |
| 499 | about each others' keywords in the arguments. | 499 | about each others' keywords in the arguments. |
| 500 | 500 | ||
| 501 | As a (significant) performance optimization, this package | ||
| 502 | implements the scan for keyword arguments by calling @code{memq} | ||
| 503 | to search for keywords in a ``rest'' argument. Technically | ||
| 504 | speaking, this is incorrect, since @code{memq} looks at the | ||
| 505 | odd-numbered values as well as the even-numbered keywords. | ||
| 506 | The net effect is that if you happen to pass a keyword symbol | ||
| 507 | as the @emph{value} of another keyword argument, where that | ||
| 508 | keyword symbol happens to equal the name of a valid keyword | ||
| 509 | argument of the same function, then the keyword parser will | ||
| 510 | become confused. This minor bug can only affect you if you | ||
| 511 | use keyword symbols as general-purpose data in your program; | ||
| 512 | this practice is strongly discouraged in Emacs Lisp. | ||
| 513 | |||
| 514 | The fifth section of the argument list consists of @dfn{auxiliary | 501 | The fifth section of the argument list consists of @dfn{auxiliary |
| 515 | variables}. These are not really arguments at all, but simply | 502 | variables}. These are not really arguments at all, but simply |
| 516 | variables which are bound to @code{nil} or to the specified | 503 | variables which are bound to @code{nil} or to the specified |
| @@ -4991,13 +4978,7 @@ have built-in compiler macros to optimize them in common cases. | |||
| 4991 | Common Lisp compliance has in general not been sacrificed for the | 4978 | Common Lisp compliance has in general not been sacrificed for the |
| 4992 | sake of efficiency. A few exceptions have been made for cases | 4979 | sake of efficiency. A few exceptions have been made for cases |
| 4993 | where substantial gains were possible at the expense of marginal | 4980 | where substantial gains were possible at the expense of marginal |
| 4994 | incompatibility. One example is the use of @code{memq} (which is | 4981 | incompatibility. |
| 4995 | treated very efficiently by the byte-compiler) to scan for keyword | ||
| 4996 | arguments; this can become confused in rare cases when keyword | ||
| 4997 | symbols are used as both keywords and data values at once. This | ||
| 4998 | is extremely unlikely to occur in practical code, and the use of | ||
| 4999 | @code{memq} allows functions with keyword arguments to be nearly | ||
| 5000 | as fast as functions that use @code{&optional} arguments. | ||
| 5001 | 4982 | ||
| 5002 | The Common Lisp standard (as embodied in Steele's book) uses the | 4983 | The Common Lisp standard (as embodied in Steele's book) uses the |
| 5003 | phrase ``it is an error if'' to indicate a situation which is not | 4984 | phrase ``it is an error if'' to indicate a situation which is not |
| @@ -5057,13 +5038,6 @@ which understand full-featured argument lists. The @code{&whole} | |||
| 5057 | keyword does not work in @code{defmacro} argument lists (except | 5038 | keyword does not work in @code{defmacro} argument lists (except |
| 5058 | inside recursive argument lists). | 5039 | inside recursive argument lists). |
| 5059 | 5040 | ||
| 5060 | In order to allow an efficient implementation, keyword arguments use | ||
| 5061 | a slightly cheesy parser which may be confused if a keyword symbol | ||
| 5062 | is passed as the @emph{value} of another keyword argument. | ||
| 5063 | (Specifically, @code{(memq :@var{keyword} @var{rest-of-arguments})} | ||
| 5064 | is used to scan for @code{:@var{keyword}} among the supplied | ||
| 5065 | keyword arguments.) | ||
| 5066 | |||
| 5067 | The @code{eql} and @code{equal} predicates do not distinguish | 5041 | The @code{eql} and @code{equal} predicates do not distinguish |
| 5068 | between IEEE floating-point plus and minus zero. The @code{equalp} | 5042 | between IEEE floating-point plus and minus zero. The @code{equalp} |
| 5069 | predicate has several differences with Common Lisp; @pxref{Predicates}. | 5043 | predicate has several differences with Common Lisp; @pxref{Predicates}. |