]> code.delx.au - gnu-emacs/blobdiff - doc/lispref/objects.texi
Merge from trunk.
[gnu-emacs] / doc / lispref / objects.texi
index 1a72fdf671c9bc9a6341a7fff5959fb266c0f469..26def7858b7bd20d989e955ebd1057a15acc5845 100644 (file)
@@ -1,7 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2001,
-@c   2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+@c Copyright (C) 1990-1995, 1998-1999, 2001-2011
 @c   Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../../info/objects
@@ -157,7 +156,7 @@ latter are unique to Emacs Lisp.
 * Macro Type::          A method of expanding an expression into another
                           expression, more fundamental but less pretty.
 * Primitive Function Type::     A function written in C, callable from Lisp.
-* Funvec Type::         A vector type callable as a function.
+* Byte-Code Type::      A function written in Lisp, then compiled.
 * Autoload Type::       A type used for automatically loading seldom-used
                         functions.
 @end menu
@@ -180,10 +179,9 @@ to
 @tex
 @math{2^{29}-1})
 @end tex
-on most machines.  (Some machines may provide a wider range.)  It is
-important to note that the Emacs Lisp arithmetic functions do not check
-for overflow.  Thus @code{(1+ 536870911)} is @minus{}536870912 on most
-machines.
+on typical 32-bit machines.  (Some machines provide a wider range.)
+Emacs Lisp arithmetic functions do not check for overflow.  Thus
+@code{(1+ 536870911)} is @minus{}536870912 if Emacs integers are 30 bits.
 
   The read syntax for integers is a sequence of (base ten) digits with an
 optional sign at the beginning and an optional period at the end.  The
@@ -196,7 +194,6 @@ leading @samp{+} or a final @samp{.}.
 1                ; @r{The integer 1.}
 1.               ; @r{Also the integer 1.}
 +1               ; @r{Also the integer 1.}
-1073741825       ; @r{Also the integer 1 on a 30-bit implementation.}
 @end group
 @end example
 
@@ -204,8 +201,8 @@ leading @samp{+} or a final @samp{.}.
 As a special exception, if a sequence of digits specifies an integer
 too large or too small to be a valid integer object, the Lisp reader
 reads it as a floating-point number (@pxref{Floating Point Type}).
-For instance, on most machines @code{536870912} is read as the
-floating-point number @code{536870912.0}.
+For instance, if Emacs integers are 30 bits, @code{536870912} is read
+as the floating-point number @code{536870912.0}.
 
   @xref{Numbers}, for more information.
 
@@ -395,7 +392,7 @@ value is more important than the @acronym{ASCII} representation.
 and the hexadecimal character code.  You can use any number of hex
 digits, so you can represent any character code in this way.
 Thus, @samp{?\x41} for the character @kbd{A}, @samp{?\x1} for the
-character @kbd{C-a}, and @code{?\x8e0} for the Latin-1 character
+character @kbd{C-a}, and @code{?\xe0} for the Latin-1 character
 @iftex
 @samp{@`a}.
 @end iftex
@@ -582,7 +579,6 @@ makes it invalid as a number.
 @group
 foo                 ; @r{A symbol named @samp{foo}.}
 FOO                 ; @r{A symbol named @samp{FOO}, different from @samp{foo}.}
-char-to-string      ; @r{A symbol named @samp{char-to-string}.}
 @end group
 @group
 1+                  ; @r{A symbol named @samp{1+}}
@@ -601,6 +597,7 @@ char-to-string      ; @r{A symbol named @samp{char-to-string}.}
 @end group
 @end example
 
+@cindex @samp{##} read syntax
 @ifinfo
 @c This uses ``colon'' instead of a literal `:' because Info cannot
 @c cope with a `:' in a menu
@@ -609,9 +606,12 @@ char-to-string      ; @r{A symbol named @samp{char-to-string}.}
 @ifnotinfo
 @cindex @samp{#:} read syntax
 @end ifnotinfo
-  Normally the Lisp reader interns all symbols (@pxref{Creating
-Symbols}).  To prevent interning, you can write @samp{#:} before the
-name of the symbol.
+  As an exception to the rule that a symbol's name serves as its
+printed representation, @samp{##} is the printed representation for an
+interned symbol whose name is an empty string.  Furthermore,
+@samp{#:@var{foo}} is the printed representation for an uninterned
+symbol whose name is @var{foo}.  (Normally, the Lisp reader interns
+all symbols; @pxref{Creating Symbols}.)
 
 @node Sequence Type
 @subsection Sequence Types
@@ -1041,7 +1041,7 @@ digits as necessary.  (Multibyte non-@acronym{ASCII} character codes are all
 greater than 256.)  Any character which is not a valid hex digit
 terminates this construct.  If the next character in the string could be
 interpreted as a hex digit, write @w{@samp{\ }} (backslash and space) to
-terminate the hex escape---for example, @w{@samp{\x8e0\ }} represents
+terminate the hex escape---for example, @w{@samp{\xe0\ }} represents
 one character, @samp{a} with grave accent.  @w{@samp{\ }} in a string
 constant is just like backslash-newline; it does not contribute any
 character to the string, but it does terminate the preceding hex escape.
@@ -1189,8 +1189,8 @@ Syntax tables (@pxref{Syntax Tables}).
 @node Bool-Vector Type
 @subsection Bool-Vector Type
 
-  A @dfn{bool-vector} is a one-dimensional array of elements that
-must be @code{t} or @code{nil}.
+  A @dfn{bool-vector} is a one-dimensional array whose elements must
+be @code{t} or @code{nil}.
 
   The printed representation of a bool-vector is like a string, except
 that it begins with @samp{#&} followed by the length.  The string
@@ -1315,55 +1315,18 @@ with the name of the subroutine.
 @end group
 @end example
 
-@node Funvec Type
-@subsection ``Function Vector' Type
-@cindex function vector
-@cindex funvec
+@node Byte-Code Type
+@subsection Byte-Code Function Type
 
-A @dfn{function vector}, or @dfn{funvec} is a vector-like object whose
-purpose is to define special kinds of functions.  You can examine or
-modify the contents of a funvec like a normal vector, using the
-@code{aref} and @code{aset} functions.
+The byte compiler produces @dfn{byte-code function objects}.
+Internally, a byte-code function object is much like a vector; however,
+the evaluator handles this data type specially when it appears as a
+function to be called.  @xref{Byte Compilation}, for information about
+the byte compiler.
 
-The behavior of a funvec when called is dependent on the kind of
-funvec it is, and that is determined by its first element (a
-zero-length funvec will signal an error if called):
-
-@table @asis
-@item A list
-A funvec with a list as its first element is a byte-compiled function,
-produced by the byte compiler; such funvecs are known as
-@dfn{byte-code function objects}.  @xref{Byte Compilation}, for
-information about the byte compiler.
-
-@item The symbol @code{curry}
-A funvec with @code{curry} as its first element is a ``curried function''.
-
-The second element in such a funvec is the function which is
-being curried, and the remaining elements are a list of arguments.
-
-Calling such a funvec operates by calling the embedded function with
-an argument list composed of the arguments in the funvec followed by
-the arguments the funvec was called with.  @xref{Function Currying}.
-@end table
-
-The printed representation and read syntax for a funvec object is like
-that for a vector, with an additional @samp{#} before the opening
-@samp{[}.
-
-@defun funvecp object
-@code{funvecp} returns @code{t} if @var{object} is a function vector
-object (including byte-code objects), and @code{nil} otherwise.
-@end defun
-
-@defun funvec kind &rest params
-@code{funvec} returns a new function vector containing @var{kind} and
-@var{params}.  @var{kind} determines the type of funvec; it should be
-one of the choices listed in the table above.
-
-Typically you should use the @code{make-byte-code} function to create
-byte-code objects, though they are a type of funvec.
-@end defun
+The printed representation and read syntax for a byte-code function
+object is like that for a vector, with an additional @samp{#} before the
+opening @samp{[}.
 
 @node Autoload Type
 @subsection Autoload Type
@@ -1810,7 +1773,7 @@ with references to further information.
 @xref{Buffer Basics, bufferp}.
 
 @item byte-code-function-p
-@xref{Funvec Type, byte-code-function-p}.
+@xref{Byte-Code Type, byte-code-function-p}.
 
 @item case-table-p
 @xref{Case Tables, case-table-p}.
@@ -2144,7 +2107,3 @@ that for two strings to be equal, they have the same text properties.
 @end group
 @end example
 @end defun
-
-@ignore
-   arch-tag: 9711a66e-4749-4265-9e8c-972d55b67096
-@end ignore