@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
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}.)
@item
glyph
@item
-hashtable
+hash-table
@item
image-instance
@item
@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
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
are integers are the same. Byte code compiled under any version 19
Emacs will have all such functions mapped to their @code{old-} equivalents
when the byte code is read into XEmacs 20. This is to preserve
-compatibility -- Emacs 19 converts all constant characters to the equivalent
+compatibility---Emacs 19 converts all constant characters to the equivalent
integer during byte-compilation, and thus there is no other way to preserve
byte-code compatibility even if the code has specifically been written
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
-range of this integer will always be 0 to 255 -- eight bits, or one
+@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
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:
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
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
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
of three as follows:
@example
-@var{beg} @var{end} @var{plist}
+@var{start} @var{end} @var{plist}
@end example
@noindent
-The elements @var{beg} and @var{end} are integers, and together specify
+The elements @var{start} and @var{end} are integers, and together specify
a range of indices in the string; @var{plist} is the property list for
that range.
@end ignore
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
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
(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
@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}.
@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},
NOTE: Under XEmacs 19, characters are really just integers, and thus
characters and integers are @code{eq}. Under XEmacs 20, it was
-necessary to preserve remants of this in function such as @code{old-eq}
+necessary to preserve remnants of this in function such as @code{old-eq}
in order to maintain byte-code compatibility. Byte code compiled
under any Emacs 19 will automatically have calls to @code{eq} mapped
to @code{old-eq} when executed under XEmacs 20.
@end defun
-@defun old-eq obj1 obj2
+@defun old-eq object1 object2
This function exists under XEmacs 20 and is exactly like @code{eq}
except that it suffers from the char-int confoundance disease.
In other words, it returns @code{t} if given a character and the