]> code.delx.au - gnu-emacs/blobdiff - lispref/sequences.texi
*** empty log message ***
[gnu-emacs] / lispref / sequences.texi
index 62662d885d75fe557b3c6e5fc16890747ee221ad..8e7ab4176e2e0a647c30bb964bc20494af07a04d 100644 (file)
@@ -1,7 +1,7 @@
 @c -*-texinfo-*-
 @c This is part of the GNU Emacs Lisp Reference Manual.
 @c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999
-@c   Free Software Foundation, Inc. 
+@c   Free Software Foundation, Inc.
 @c See the file elisp.texi for copying conditions.
 @setfilename ../info/sequences
 @node Sequences Arrays Vectors, Hash Tables, Lists, Top
@@ -222,7 +222,7 @@ in the list.
   Emacs defines four types of array, all one-dimensional: @dfn{strings},
 @dfn{vectors}, @dfn{bool-vectors} and @dfn{char-tables}.  A vector is a
 general array; its elements can be any Lisp objects.  A string is a
-specialized array; its elements must be characters.  Each type of array 
+specialized array; its elements must be characters.  Each type of array
 has its own read syntax.
 @xref{String Type}, and @ref{Vector Type}.
 
@@ -539,7 +539,7 @@ integer between 0 and 10.  This integer specifies the number of
 @dfn{extra slots} in the char-table.
 
 @cindex parent of char-table
-  A char-table can have a @dfn{parent}. which is another char-table.  If
+  A char-table can have a @dfn{parent}, which is another char-table.  If
 it does, then whenever the char-table specifies @code{nil} for a
 particular character @var{c}, it inherits the value specified in the
 parent.  In other words, @code{(aref @var{char-table} @var{c})} returns
@@ -694,7 +694,7 @@ from that, you manipulate them with same functions used for other kinds
 of arrays.
 
 @defun make-bool-vector length initial
-Return a new book-vector of @var{length} elements,
+Return a new bool-vector of @var{length} elements,
 each one initialized to @var{initial}.
 @end defun
 
@@ -703,3 +703,22 @@ This returns @code{t} if @var{object} is a bool-vector,
 and @code{nil} otherwise.
 @end defun
 
+  Here is an example of creating, examining, and updating a
+bool-vector.  Note that the printed form represents up to 8 boolean
+values as a single character.
+
+@example
+(setq bv (make-bool-vector 5 t))
+     @result{} #&5"^_"
+(aref bv 1)
+     @result{} t
+(aset bv 3 nil)
+     @result{} nil
+bv
+     @result{} #&5"^W"
+@end example
+
+@noindent
+These results make sense because the binary codes for control-_ and
+control-W are 11111 and 10111, respectively.
+