Show
Ignore:
Timestamp:
04/04/08 22:04:40 (8 months ago)
Author:
miyoshi
Message:

Sync up with Emacs22.2.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/man/cl.texi

    r4204 r4220  
    66This file documents the GNU Emacs Common Lisp emulation package. 
    77 
    8 Copyright @copyright{} 1993, 2001, 2002, 2003, 2004, 2005, 2006, 2007 
     8Copyright @copyright{} 1993, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 
    99Free Software Foundation, Inc. 
    1010 
     
    6363* Overview::             Installation, usage, etc. 
    6464* Program Structure::    Arglists, `eval-when', `defalias' 
    65 * Predicates::           `typep', `eql', and `equalp' 
     65* Predicates::           `typep' and `equalp' 
    6666* Control Structure::    `setf', `do', `loop', etc. 
    6767* Macros::               Destructuring, `define-compiler-macro' 
     
    7070* Numbers::              Predicates, functions, random numbers 
    7171* Sequences::            Mapping, functions, searching, sorting 
    72 * Lists::                `cadr', `sublis', `member*', `assoc*', etc. 
     72* Lists::                `caddr', `sublis', `member*', `assoc*', etc. 
    7373* Structures::           `defstruct' 
    7474* Assertions::           `check-type', `assert', `ignore-errors'. 
     
    288288 
    289289@example 
    290 eql           floatp-safe   endp 
     290floatp-safe   endp 
    291291evenp         oddp          plusp         minusp 
    292292caaar .. cddddr 
     
    701701@menu 
    702702* Type Predicates::      `typep', `deftype', and `coerce' 
    703 * Equality Predicates::  `eql' and `equalp' 
     703* Equality Predicates::  `equalp' 
    704704@end menu 
    705705 
     
    841841 
    842842@noindent 
    843 This package defines two Common Lisp predicates, @code{eql} and 
    844 @code{equalp}. 
    845  
    846 @defun eql a b 
    847 This function is almost the same as @code{eq}, except that if @var{a} 
    848 and @var{b} are numbers of the same type, it compares them for numeric 
    849 equality (as if by @code{equal} instead of @code{eq}).  This makes a 
    850 difference only for versions of Emacs that are compiled with 
    851 floating-point support.  Emacs floats are allocated 
    852 objects just like cons cells, which means that @code{(eq 3.0 3.0)} 
    853 will not necessarily be true---if the two @code{3.0}s were allocated 
    854 separately, the pointers will be different even though the numbers are 
    855 the same.  But @code{(eql 3.0 3.0)} will always be true. 
    856  
    857 The types of the arguments must match, so @code{(eql 3 3.0)} is 
    858 still false. 
    859  
    860 Note that Emacs integers are ``direct'' rather than allocated, which 
    861 basically means @code{(eq 3 3)} will always be true.  Thus @code{eq} 
    862 and @code{eql} behave differently only if floating-point numbers are 
    863 involved, and are indistinguishable on Emacs versions that don't 
    864 support floats. 
    865  
    866 There is a slight inconsistency with Common Lisp in the treatment of 
    867 positive and negative zeros.  Some machines, notably those with IEEE 
    868 standard arithmetic, represent @code{+0} and @code{-0} as distinct 
    869 values.  Normally this doesn't matter because the standard specifies 
    870 that @code{(= 0.0 -0.0)} should always be true, and this is indeed 
    871 what Emacs Lisp and Common Lisp do.  But the Common Lisp standard 
    872 states that @code{(eql 0.0 -0.0)} and @code{(equal 0.0 -0.0)} should 
    873 be false on IEEE-like machines; Emacs Lisp does not do this, and in 
    874 fact the only known way to distinguish between the two zeros in Emacs 
    875 Lisp is to @code{format} them and check for a minus sign. 
    876 @end defun 
     843This package defines the Common Lisp predicate @code{equalp}. 
    877844 
    878845@defun equalp a b 
     
    25052472@item for @var{var} being the key-codes of @var{keymap} 
    25062473This clause iterates over the entries in @var{keymap}. 
    2507 The iteration does not enter nested keymaps or inherited (parent) keymaps. 
     2474The iteration does not enter nested keymaps but does enter inherited 
     2475(parent) keymaps. 
    25082476You can use @samp{the key-bindings} to access the commands bound to 
    25092477the keys rather than the key codes, and you can add a @code{using} 
     
    36863654true (non-@code{nil}) to indicate a match; instead, you may use 
    36873655@code{:test-not} to give a function which returns @emph{false} to 
    3688 indicate a match.  The default test function is @code{:test 'eql}. 
     3656indicate a match.  The default test function is @code{eql}. 
    36893657 
    36903658Many functions which take @var{item} and @code{:test} or @code{:test-not} 
     
    49994967inside recursive argument lists). 
    50004968 
    5001 The @code{eql} and @code{equal} predicates do not distinguish 
     4969The @code{equal} predicate does not distinguish 
    50024970between IEEE floating-point plus and minus zero.  The @code{equalp} 
    50034971predicate has several differences with Common Lisp; @pxref{Predicates}. 
     
    52185186Some Lisp packages use reader macros to create special syntaxes 
    52195187for themselves, which the Emacs parser is incapable of reading. 
    5220  
    5221 The lack of reader macros, incidentally, is the reason behind 
    5222 Emacs Lisp's unusual backquote syntax.  Since backquotes are 
    5223 implemented as a Lisp package and not built-in to the Emacs 
    5224 parser, they are forced to use a regular macro named @code{`} 
    5225 which is used with the standard function/macro call notation. 
    52265188 
    52275189@item 
     
    52885250 
    52895251@item 
    5290 Characters are distinct from integers in Common Lisp.  The 
    5291 notation for character constants is also different:  @code{#\A} 
    5292 instead of @code{?A}.  Also, @code{string=} and @code{string-equal} 
    5293 are synonyms in Emacs Lisp whereas the latter is case-insensitive 
    5294 in Common Lisp. 
     5252Characters are distinct from integers in Common Lisp.  The notation 
     5253for character constants is also different: @code{#\A} in Common Lisp 
     5254where Emacs Lisp uses @code{?A}.  Also, @code{string=} and 
     5255@code{string-equal} are synonyms in Emacs Lisp, whereas the latter is 
     5256case-insensitive in Common Lisp. 
    52955257 
    52965258@item