XEmacs 21.2.22 "Mercedes".
[chise/xemacs-chise.git.1] / man / lispref / objects.texi
index 97ab831..a809171 100644 (file)
@@ -1,6 +1,6 @@
 @c -*-texinfo-*-
 @c This is part of the XEmacs Lisp Reference Manual.
-@c Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. 
+@c Copyright (C) 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
 @c See the file lispref.texi for copying conditions.
 @setfilename ../../info/objects.info
 @node Lisp Data Types, Numbers, Introduction, Top
@@ -26,7 +26,7 @@ which all other types are constructed, are called @dfn{primitive types}.
 Each object belongs to one and only one primitive type.  These types
 include @dfn{integer}, @dfn{character} (starting with XEmacs 20.0),
 @dfn{float}, @dfn{cons}, @dfn{symbol}, @dfn{string}, @dfn{vector},
-@dfn{bit-vector}, @dfn{subr}, @dfn{compiled-function}, @dfn{hashtable},
+@dfn{bit-vector}, @dfn{subr}, @dfn{compiled-function}, @dfn{hash-table},
 @dfn{range-table}, @dfn{char-table}, @dfn{weak-list}, and several
 special types, such as @dfn{buffer}, that are related to editing.
 (@xref{Editing Types}.)
@@ -173,7 +173,7 @@ frame
 @item
 glyph
 @item
-hashtable
+hash-table
 @item
 image-instance
 @item
@@ -343,7 +343,7 @@ number whose value is 1500.  They are all equivalent.
 
 @node Character Type
 @subsection Character Type
-@cindex @sc{ASCII} character codes
+@cindex @sc{ascii} character codes
 @cindex char-int confoundance disease
 
   In XEmacs version 19, and in all versions of FSF GNU Emacs, a
@@ -352,7 +352,7 @@ This is yet another holdover from XEmacs Lisp's derivation from
 vintage-1980 Lisps; modern versions of Lisp consider this equivalence
 a bad idea, and have separate character types.  In XEmacs version 20,
 the modern convention is followed, and characters are their own
-primitive types. (This change was necessary in order for @sc{MULE},
+primitive types. (This change was necessary in order for @sc{mule},
 i.e. Asian-language, support to be correctly implemented.)
 
   Even in XEmacs version 20, remnants of the equivalence between
@@ -370,21 +370,21 @@ with the distinction between characters and integers in mind.
 
   Every character has an equivalent integer, called the @dfn{character
 code}.  For example, the character @kbd{A} is represented as the
-@w{integer 65}, following the standard @sc{ASCII} representation of
-characters.  If XEmacs was not compiled with @sc{MULE} support, the
+@w{integer 65}, following the standard @sc{ascii} representation of
+characters.  If XEmacs was not compiled with @sc{mule} support, the
 range of this integer will always be 0 to 255 -- eight bits, or one
 byte. (Integers outside this range are accepted but silently truncated;
 however, you should most decidedly @emph{not} rely on this, because it
-will not work under XEmacs with @sc{MULE} support.)  When @sc{MULE}
+will not work under XEmacs with @sc{mule} support.)  When @sc{mule}
 support is present, the range of character codes is much
 larger. (Currently, 19 bits are used.)
 
   FSF GNU Emacs uses kludgy character codes above 255 to represent
-keyboard input of @sc{ASCII} characters in combination with certain
+keyboard input of @sc{ascii} characters in combination with certain
 modifiers.  XEmacs does not use this (a more general mechanism is
-used that does not distinguish between @sc{ASCII} keys and other
+used that does not distinguish between @sc{ascii} keys and other
 keys), so you will never find character codes above 255 in a
-non-@sc{MULE} XEmacs.
+non-@sc{mule} XEmacs.
 
   Individual characters are not often used in programs.  It is far more
 common to work with @emph{strings}, which are sequences composed of
@@ -407,7 +407,7 @@ provides for characters.
   The usual read syntax for alphanumeric characters is a question mark
 followed by the character; thus, @samp{?A} for the character
 @kbd{A}, @samp{?B} for the character @kbd{B}, and @samp{?a} for the
-character @kbd{a}.  
+character @kbd{a}.
 
   For example:
 
@@ -506,15 +506,15 @@ with character code 193, or 128 plus 65.  You should @emph{not} use this
 syntax in your programs.  It is a holdover of yet another confoundance
 disease from earlier Emacsen. (This was used to represent keyboard input
 with the @key{META} key set, thus the @samp{M}; however, it conflicts
-with the legitimate @sc{ISO}-8859-1 interpretation of the character code.
+with the legitimate @sc{iso}-8859-1 interpretation of the character code.
 For example, character code 193 is a lowercase @samp{a} with an acute
-accent, in @sc{ISO}-8859-1.)
+accent, in @sc{iso}-8859-1.)
 
 @ignore @c None of this crap applies to XEmacs.
   For use in strings and buffers, you are limited to the control
-characters that exist in @sc{ASCII}, but for keyboard input purposes,
+characters that exist in @sc{ascii}, but for keyboard input purposes,
 you can turn any character into a control character with @samp{C-}.  The
-character codes for these non-@sc{ASCII} control characters include the
+character codes for these non-@sc{ascii} control characters include the
 @iftex
 $2^{26}$
 @end iftex
@@ -617,9 +617,9 @@ bit values are 2**22 for alt, 2**23 for super and 2**24 for hyper.
 followed by a backslash and the character code in octal (up to three
 octal digits); thus, @samp{?\101} for the character @kbd{A},
 @samp{?\001} for the character @kbd{C-a}, and @code{?\002} for the
-character @kbd{C-b}.  Although this syntax can represent any @sc{ASCII}
+character @kbd{C-b}.  Although this syntax can represent any @sc{ascii}
 character, it is preferred only when the precise octal value is more
-important than the @sc{ASCII} representation.
+important than the @sc{ascii} representation.
 
 @example
 @group
@@ -1051,15 +1051,15 @@ ignores an escaped newline while reading a string.
 in documentation strings,
 but the newline is \
 ignored if escaped."
-     @result{} "It is useful to include newlines 
-in documentation strings, 
+     @result{} "It is useful to include newlines
+in documentation strings,
 but the newline is ignored if escaped."
 @end example
 
   A string can hold extents and properties of the text it contains, in
 addition to the characters themselves.  This enables programs that copy
 text between strings and buffers to preserve the extents and properties
-with no special effort.  @xref{Extents}; @xref{Text Properties}.
+with no special effort.  @xref{Extents}, @xref{Text Properties}.
 
   Note that FSF GNU Emacs has a special read and print syntax for
 strings with text properties, but XEmacs does not currently implement
@@ -1253,17 +1253,22 @@ called @dfn{hashing}.  Hash tables are very fast (much more efficient
 that using an association list, when there are a large number of
 elements in the table).
 
-  Hash tables have no read syntax.  They print in hash notation (The
-``hash'' in ``hash notation'' has nothing to do with the ``hash'' in
-``hash table''), giving the number of elements, total space allocated
-for elements, and a unique number assigned at the time the hash table
-was created. (Hash tables automatically resize as necessary so there
-is no danger of running out of space for elements.)
+Hash tables have a special read syntax beginning with
+@samp{#s(hash-table} (this is an example of @dfn{structure} read
+syntax.  This notation is also used for printing when
+@code{print-readably} is @code{t}.
+
+Otherwise they print in hash notation (The ``hash'' in ``hash notation''
+has nothing to do with the ``hash'' in ``hash table''), giving the
+number of elements, total space allocated for elements, and a unique
+number assigned at the time the hash table was created. (Hash tables
+automatically resize as necessary so there is no danger of running out
+of space for elements.)
 
 @example
 @group
-(make-hashtable 50)
-     @result{} #<hashtable 0/71 0x313a>
+(make-hash-table :size 50)
+     @result{} #<hash-table 0/107 0x313a>
 @end group
 @end example
 
@@ -1516,7 +1521,7 @@ Normally, there is only one device object, but there may be more
 than one if XEmacs is being run on a multi-headed display (e.g. an
 X server with attached color and mono screens) or if XEmacs is
 simultaneously driving frames attached to different consoles, e.g.
-an X display and a @sc{TTY} connection.
+an X display and a @sc{tty} connection.
 
   Devices do not have a read syntax.  They print in hash notation,
 giving the device's type, connection name, and a unique number assigned
@@ -1539,13 +1544,13 @@ related to devices.
 (i.e. displays on which frames exist) are connected.  Normally, there is
 only one console object, but there may be more than one if XEmacs is
 simultaneously driving frames attached to different X servers and/or
-@sc{TTY} connections. (XEmacs is capable of driving multiple X and
-@sc{TTY} connections at the same time, and provides a robust mechanism
+@sc{tty} connections. (XEmacs is capable of driving multiple X and
+@sc{tty} connections at the same time, and provides a robust mechanism
 for handling the differing display capabilities of such heterogeneous
 environments.  A buffer with embedded glyphs and multiple fonts and
 colors, for example, will display reasonably if it simultaneously
 appears on a frame on a color X display, a frame on a mono X display,
-and a frame on a @sc{TTY} connection.)
+and a frame on a @sc{tty} connection.)
 
   Consoles do not have a read syntax.  They print in hash notation,
 giving the console's type, connection name, and a unique number assigned
@@ -1983,8 +1988,8 @@ with references to further information.
 @item glyphp
 @xref{Glyphs, glyphp}.
 
-@item hashtablep
-@xref{Hash Tables, hashtablep}.
+@item hash-table-p
+@xref{Hash Tables, hash-table-p}.
 
 @item icon-glyph-p
 @xref{Glyph Types, icon-glyph-p}.
@@ -2153,7 +2158,7 @@ This function returns a symbol naming the primitive type of
 @code{coding-system}, @code{cons}, @code{color-instance},
 @code{compiled-function}, @code{console}, @code{database},
 @code{device}, @code{event}, @code{extent}, @code{face}, @code{float},
-@code{font-instance}, @code{frame}, @code{glyph}, @code{hashtable},
+@code{font-instance}, @code{frame}, @code{glyph}, @code{hash-table},
 @code{image-instance}, @code{integer}, @code{keymap}, @code{marker},
 @code{process}, @code{range-table}, @code{specifier}, @code{string},
 @code{subr}, @code{subwindow}, @code{symbol}, @code{toolbar-button},