*** emacs-lisp-intro.texi.~1.42.~	2006-08-21 12:53:59.000000000 -0600
--- emacs-lisp-intro.texi	2006-10-27 14:02:30.000000000 -0600
***************
*** 527,533 ****
  
  @code{zap-to-char}
  
- * Complete zap-to-char::        The complete implementation.
  * zap-to-char interactive::     A three part interactive expression.
  * zap-to-char body::            A short overview.
  * search-forward::              How to search for a string.
--- 527,532 ----
***************
*** 707,713 ****
  * Loading Files::               Load (i.e., evaluate) files automatically.
  * Autoload::                    Make functions available.
  * Simple Extension::            Define a function; bind it to a key.
! * X11 Colors::                  Colors in version 19 in X.
  * Miscellaneous::
  * Mode Line::                   How to customize your mode line.
  
--- 706,712 ----
  * Loading Files::               Load (i.e., evaluate) files automatically.
  * Autoload::                    Make functions available.
  * Simple Extension::            Define a function; bind it to a key.
! * X11 Colors::                  Setting colors to use in X.
  * Miscellaneous::
  * Mode Line::                   How to customize your mode line.
  
***************
*** 1376,1391 ****
  (this is an unquoted list)
  @end smallexample
  
- @noindent
- What you see depends on which version of Emacs you are running.  GNU
- Emacs version 21 provides more information than version 20 and before.
- First, the more recent result of generating an error; then the
- earlier, version 20 result.
- 
  @need 1250
  @noindent
! In GNU Emacs version 21, a @file{*Backtrace*} window will open up and
! you will see the following in it:
  
  @smallexample
  @group
--- 1375,1384 ----
  (this is an unquoted list)
  @end smallexample
  
  @need 1250
  @noindent
! A @file{*Backtrace*} window will open up and you will see the
! following in it:
  
  @smallexample
  @group
***************
*** 1464,1494 ****
  have a set of instructions for the computer to obey and those
  instructions must be to add the numbers that follow the @code{+}.
  
- @need 1250
- In GNU Emacs version 20, and in earlier versions, you will see only
- one line of error message; it will appear in the echo area and look
- like this:
- 
- @smallexample
- Symbol's function definition is void:@: this
- @end smallexample
- 
- @noindent
- (Also, your terminal may beep at you---some do, some don't; and others
- blink.  This is just a device to get your attention.)  The message goes
- away as soon as you type another key, even just to move the cursor.
- 
- We know the meaning of the word @samp{Symbol}.  It refers to the first
- atom of the list, the word @samp{this}.  The word @samp{function}
- refers to the instructions that tell the computer what to do.
- (Technically, the symbol tells the computer where to find the
- instructions, but this is a complication we can ignore for the
- moment.)
- 
- The error message can be understood: @samp{Symbol's function
- definition is void:@: this}.  The symbol (that is, the word
- @samp{this}) lacks instructions for the computer to carry out.
- 
  @node Names & Definitions, Lisp Interpreter, Making Errors, List Processing
  @comment  node-name,  next,  previous,  up
  @section Symbol Names and Function Definitions
--- 1457,1462 ----
***************
*** 1805,1812 ****
  
  @need 1250
  @noindent
! In GNU Emacs version 21, you will create a @file{*Backtrace*} buffer
! that says:
  
  @smallexample
  @group
--- 1773,1779 ----
  
  @need 1250
  @noindent
! You will create a @file{*Backtrace*} buffer that says
  
  @smallexample
  @group
***************
*** 1825,1841 ****
  (Remember, to quit the debugger and make the debugger window go away,
  type @kbd{q} in the @file{*Backtrace*} buffer.)
  
- @need 800
- In GNU Emacs 20 and before, you will produce an error message that says:
- 
- @smallexample
- Symbol's function definition is void:@: fill-column
- @end smallexample
- 
- @noindent
- (The message will go away away as soon as you move the cursor or type
- another key.)
- 
  @node Void Variable,  , Void Function, Variables
  @comment  node-name,  next,  previous,  up
  @subsection Error Message for a Symbol Without a Value
--- 1792,1797 ----
***************
*** 1854,1861 ****
  
  @need 1500
  @noindent
! In GNU Emacs 21, you will create a @file{*Backtrace*} buffer that
! says:
  
  @smallexample
  @group
--- 1810,1816 ----
  
  @need 1500
  @noindent
! You will create a @file{*Backtrace*} buffer that says
  
  @smallexample
  @group
***************
*** 1891,1906 ****
  definition, the error message reported that the symbol's value as a
  variable was void.
  
- @need 800
- In GNU Emacs version 20 and before, your error message will say:
- 
- @example
- Symbol's value as variable is void:@: +
- @end example
- 
- @noindent
- The meaning is the same as in GNU Emacs 21.
- 
  @node Arguments, set & setq, Variables, List Processing
  @comment  node-name,  next,  previous,  up
  @section Arguments
--- 1846,1851 ----
***************
*** 2180,2196 ****
  would have been a number, such as 37, rather than a symbol like
  @code{hello}.  But then you would not have got the error message.
  
- @need 1250
- In GNU Emacs version 20 and before, the echo area displays an error
- message that says:
- 
- @smallexample
- Wrong type argument:@: number-or-marker-p, hello
- @end smallexample
- 
- This says, in different words, the same as the top line of the
- @file{*Backtrace*} buffer.
- 
  @node message,  , Wrong Type of Argument, Arguments
  @comment  node-name,  next,  previous,  up
  @subsection The @code{message} Function
--- 2125,2130 ----
***************
*** 4032,4038 ****
  @smallexample
  @group
  (if (> 4 5)                             ; @r{if-part}
!     (message "5 is greater than 4!")    ; @r{then-part}
    (message "4 is not greater than 5!")) ; @r{else-part}
  @end group
  @end smallexample
--- 3966,3972 ----
  @smallexample
  @group
  (if (> 4 5)                             ; @r{if-part}
!     (message "4 is greater than 5?!")   ; @r{then-part}
    (message "4 is not greater than 5!")) ; @r{else-part}
  @end group
  @end smallexample
***************
*** 4429,4437 ****
  
  @smallexample
  @group
! (if (string-equal
!      (number-to-string 21)
!      (substring (emacs-version) 10 12))
      (message "This is version 21 Emacs")
    (message "This is not version 21 Emacs"))
  @end group
--- 4363,4369 ----
  
  @smallexample
  @group
! (if (= emacs-major-version 21)
      (message "This is version 21 Emacs")
    (message "This is not version 21 Emacs"))
  @end group
***************
*** 4452,4464 ****
  @itemx >
  @itemx <=
  @itemx >=
  The @code{<} function tests whether its first argument is smaller than
! its second argument.  A corresponding function, @code{>}, tests whether
! the first argument is greater than the second.  Likewise, @code{<=}
! tests whether the first argument is less than or equal to the second and
! @code{>=} tests whether the first argument is greater than or equal to
! the second.  In all cases, both arguments must be numbers or markers
! (markers indicate positions in buffers).
  
  @item string<
  @itemx string-lessp
--- 4384,4398 ----
  @itemx >
  @itemx <=
  @itemx >=
+ @itemx =
  The @code{<} function tests whether its first argument is smaller than
! its second argument.  A corresponding function, @code{>}, tests
! whether the first argument is greater than the second.  Likewise,
! @code{<=} tests whether the first argument is less than or equal to
! the second and @code{>=} tests whether the first argument is greater
! than or equal to the second.  Finally, @code{=} tests whether the
! arguments are numerically equal.  In all cases, both arguments must be
! numbers or markers (markers indicate positions in buffers).
  
  @item string<
  @itemx string-lessp
***************
*** 4591,4602 ****
  then @key{RET}).
  
  @cindex Find source of function
! In versions 20 and higher, when a function is written in Emacs Lisp,
! @code{describe-function} will also tell you the location of the
! function definition.  If you move point over the file name and press
! the @key{RET} key, which in this case means @code{help-follow} rather
! than `return' or `enter', Emacs will take you directly to the function
! definition.
  
  More generally, if you want to see a function in its original source
  file, you can use the @code{find-tags} function to jump to it.
--- 4525,4535 ----
  then @key{RET}).
  
  @cindex Find source of function
! When a function is written in Emacs Lisp, @code{describe-function}
! will also tell you the location of the function definition.  If you
! move point over the file name and press the @key{RET} key, which in
! this case means @code{help-follow} rather than `return' or `enter',
! Emacs will take you directly to the function definition.
  
  More generally, if you want to see a function in its original source
  file, you can use the @code{find-tags} function to jump to it.
***************
*** 4619,4625 ****
  @key{RET}}.  (On some keyboards, the @key{META} key is labelled
  @key{ALT}.)
  
! @c !!! 21.0.100 tags table location in this paragraph
  @cindex TAGS table, specifying
  @findex find-tags
  Depending on how the initial default values of your copy of Emacs are
--- 4552,4558 ----
  @key{RET}}.  (On some keyboards, the @key{META} key is labelled
  @key{ALT}.)
  
! @c !!! 22.1 tags table location in this paragraph
  @cindex TAGS table, specifying
  @findex find-tags
  Depending on how the initial default values of your copy of Emacs are
***************
*** 4629,4635 ****
  if it has already been created for you, will be in a subdirectory of
  the @file{/usr/local/share/emacs/} directory; thus you would use the
  @code{M-x visit-tags-table} command and specify a pathname such as
! @file{/usr/local/share/emacs/21.0.100/lisp/TAGS} or
  @file{/usr/local/src/emacs/src/TAGS}.  If the tags table has
  not already been created, you will have to create it yourself.
  
--- 4562,4568 ----
  if it has already been created for you, will be in a subdirectory of
  the @file{/usr/local/share/emacs/} directory; thus you would use the
  @code{M-x visit-tags-table} command and specify a pathname such as
! @file{/usr/local/share/emacs/22.1/lisp/TAGS} or
  @file{/usr/local/src/emacs/src/TAGS}.  If the tags table has
  not already been created, you will have to create it yourself.
  
***************
*** 4818,4832 ****
  @end ifnottex
  
  @need 1250
! In GNU Emacs 20, the code for the complete function looks like this:
  
  @smallexample
  @group
  (defun mark-whole-buffer ()
!   "Put point at beginning and mark at end of buffer."
    (interactive)
    (push-mark (point))
!   (push-mark (point-max))
    (goto-char (point-min)))
  @end group
  @end smallexample
--- 4751,4768 ----
  @end ifnottex
  
  @need 1250
! In GNU Emacs 22, the code for the complete function looks like this:
  
  @smallexample
  @group
  (defun mark-whole-buffer ()
!   "Put point at beginning and mark at end of buffer.
! You probably should not use this function in Lisp programs;
! it is usually a mistake for a Lisp function to use any subroutine
! that uses or sets the mark."
    (interactive)
    (push-mark (point))
!   (push-mark (point-max) nil t)
    (goto-char (point-min)))
  @end group
  @end smallexample
***************
*** 4866,4872 ****
  @smallexample
  @group
  (push-mark (point))
! (push-mark (point-max))
  (goto-char (point-min))
  @end group
  @end smallexample
--- 4802,4808 ----
  @smallexample
  @group
  (push-mark (point))
! (push-mark (point-max) nil t)
  (goto-char (point-min))
  @end group
  @end smallexample
***************
*** 4889,4922 ****
  line causes Emacs to determine the position of point and set a mark
  there.
  
! The next line of @code{mark-whole-buffer} is @code{(push-mark (point-max)}.
! This expression sets a mark at the point in the buffer
! that has the highest number.  This will be the end of the buffer (or,
! if the buffer is narrowed, the end of the accessible portion of the
! buffer.  @xref{Narrowing & Widening, , Narrowing and Widening}, for
! more about narrowing.)  After this mark has been set, the previous
! mark, the one set at point, is no longer set, but Emacs remembers its
! position, just as all other recent marks are always remembered.  This
! means that you can, if you wish, go back to that position by typing
! @kbd{C-u C-@key{SPC}} twice.
! 
! (In GNU Emacs 21, the @code{(push-mark (point-max)} is slightly more
! complicated than shown here.  The line reads
! 
! @smallexample
! (push-mark (point-max) nil t)
! @end smallexample
! 
! @noindent
! (The expression works nearly the same as before.  It sets a mark at
! the highest numbered place in the buffer that it can.  However, in
! this version, @code{push-mark} has two additional arguments.  The
! second argument to @code{push-mark} is @code{nil}.  This tells the
! function it @emph{should} display a message that says `Mark set' when
! it pushes the mark.  The third argument is @code{t}.  This tells
  @code{push-mark} to activate the mark when Transient Mark mode is
  turned on.  Transient Mark mode highlights the currently active
! region.  It is usually turned off.)
  
  Finally, the last line of the function is @code{(goto-char
  (point-min)))}.  This is written exactly the same way as it is written
--- 4825,4847 ----
  line causes Emacs to determine the position of point and set a mark
  there.
  
! The next line of @code{mark-whole-buffer} is @code{(push-mark
! (point-max) nil t)}.  This expression sets a mark at the point in the
! buffer that has the highest number.  This will be the end of the
! buffer (or, if the buffer is narrowed, the end of the accessible
! portion of the buffer.  @xref{Narrowing & Widening, , Narrowing and
! Widening}, for more about narrowing.)  After this mark has been set,
! the previous mark, the one set at point, is no longer set, but Emacs
! remembers its position, just as all other recent marks are always
! remembered.  This means that you can, if you wish, go back to that
! position by typing @kbd{C-u C-@key{SPC}} twice.  We also see here that
! @code{push-mark} has two additional, optional arguments.  The second
! argument to @code{push-mark} is @code{nil}.  This tells the function
! it, as is the default, @emph{should} display the message `Mark set' to
! the user.  The third argument is @code{t}.  This tells
  @code{push-mark} to activate the mark when Transient Mark mode is
  turned on.  Transient Mark mode highlights the currently active
! region.  It is usually turned off.
  
  Finally, the last line of the function is @code{(goto-char
  (point-min)))}.  This is written exactly the same way as it is written
***************
*** 7238,7283 ****
  @section @code{zap-to-char}
  @findex zap-to-char
  
! The @code{zap-to-char} function barely changed between GNU Emacs
! version 19 and GNU Emacs version 21.  However, @code{zap-to-char}
! calls another function, @code{kill-region}, which enjoyed a major rewrite
! on the way to version 21.
! 
! The @code{kill-region} function in Emacs 19 is complex, but does not
! use code that is important at this time.  We will skip it.
! 
! The @code{kill-region} function in Emacs 21 is easier to read than the
! same function in Emacs 19 and introduces a very important concept,
! that of error handling.  We will walk through the function.
! 
! But first, let us look at the interactive @code{zap-to-char} function.
! 
! @menu
! * Complete zap-to-char::        The complete implementation.
! * zap-to-char interactive::     A three part interactive expression.
! * zap-to-char body::            A short overview.
! * search-forward::              How to search for a string.
! * progn::                       The @code{progn} special form.
! * Summing up zap-to-char::      Using @code{point} and @code{search-forward}.
! @end menu
! 
! @node Complete zap-to-char, zap-to-char interactive, zap-to-char, zap-to-char
! @ifnottex
! @unnumberedsubsec The Complete @code{zap-to-char} Implementation
! @end ifnottex
! 
! The GNU Emacs version 19 and version 21 implementations of the
! @code{zap-to-char} function are nearly identical in form, and they
! work alike.  The function removes the text in the region between the
! location of the cursor (i.e., of point) up to and including the next
! occurrence of a specified character.  The text that @code{zap-to-char}
! removes is put in the kill ring; and it can be retrieved from the kill
! ring by typing @kbd{C-y} (@code{yank}).  If the command is given an
! argument, it removes text through that number of occurrences.  Thus,
! if the cursor were at the beginning of this sentence and the character
! were @samp{s}, @samp{Thus} would be removed.  If the argument were
! two, @samp{Thus, if the curs} would be removed, up to and including
! the @samp{s} in @samp{cursor}.
  
  If the specified character is not found, @code{zap-to-char} will say
  ``Search failed'', tell you the character you typed, and not remove
--- 7163,7178 ----
  @section @code{zap-to-char}
  @findex zap-to-char
  
! The @code{zap-to-char} function removes the text in the region between
! the location of the cursor (i.e., of point) up to and including the
! next occurrence of a specified character.  The text that
! @code{zap-to-char} removes is put in the kill ring; and it can be
! retrieved from the kill ring by typing @kbd{C-y} (@code{yank}).  If
! the command is given an argument, it removes text through that number
! of occurrences.  Thus, if the cursor were at the beginning of this
! sentence and the character were @samp{s}, @samp{Thus} would be
! removed.  If the argument were two, @samp{Thus, if the curs} would be
! removed, up to and including the @samp{s} in @samp{cursor}.
  
  If the specified character is not found, @code{zap-to-char} will say
  ``Search failed'', tell you the character you typed, and not remove
***************
*** 7289,7295 ****
  deletion command.
  
  @need 800
! Here is the complete text of the version 19 implementation of the function:
  
  @c v 19
  @smallexample
--- 7184,7193 ----
  deletion command.
  
  @need 800
! Here is the complete text of the version 19 implementation of the
! function, which is somewhat simpler than more recent versions but
! contains all essential behavior.  Following sections will discuss
! portions of the function definition in detail.
  
  @c v 19
  @smallexample
***************
*** 7306,7311 ****
--- 7204,7217 ----
  @end group
  @end smallexample
  
+ @menu
+ * zap-to-char interactive::     A three part interactive expression.
+ * zap-to-char body::            A short overview.
+ * search-forward::              How to search for a string.
+ * progn::                       The @code{progn} special form.
+ * Summing up zap-to-char::      Using @code{point} and @code{search-forward}.
+ @end menu
+ 
  @node zap-to-char interactive, zap-to-char body, Complete zap-to-char, zap-to-char
  @comment  node-name,  next,  previous,  up
  @subsection The @code{interactive} Expression
***************
*** 7325,7356 ****
  remove text, and you will receive a message that says ``Buffer is
  read-only''; your terminal may beep at you as well.
  
! The version 21 implementation does not have the asterisk, @samp{*}.  The
! function works the same as in version 19: in both cases, it cannot
! remove text from a read-only buffer but the function does copy the
! text that would have been removed to the kill ring.  Also, in both
! cases, you see an error message.
! 
! However, the version 19 implementation copies text from a read-only
! buffer only because of a mistake in the implementation of
! @code{interactive}.  According to the documentation for
! @code{interactive}, the asterisk, @samp{*}, should prevent the
! @code{zap-to-char} function from doing anything at all when the buffer
! is read only.  In version 19, the function should not copy the text to
! the kill ring.  It is a bug that it does.
! 
! In version 21, the function is designed to copy the text to the kill
! ring; moreover, @code{interactive} is implemented correctly.  So the
! asterisk, @samp{*}, had to be removed from the interactive
! specification.  However, if you insert an @samp{*} yourself and
! evaluate the function definition, then the next time you run the
! @code{zap-to-char} function on a read-only buffer, you will not copy
! any text.
! 
! That change aside, and a change to the documentation, the two versions
! of the  @code{zap-to-char} function are identical.
! 
! Let us continue with the interactive specification.
  
  The second part of @code{"*p\ncZap to char:@: "} is the @samp{p}.
  This part is separated from the next part by a newline, @samp{\n}.
--- 7231,7239 ----
  remove text, and you will receive a message that says ``Buffer is
  read-only''; your terminal may beep at you as well.
  
! (More recent implementations do not have the asterisk to allow copying
! text from a read-only buffer; the text is not deleted since it is
! read-only, but it is still put on the kill ring.)
  
  The second part of @code{"*p\ncZap to char:@: "} is the @samp{p}.
  This part is separated from the next part by a newline, @samp{\n}.
***************
*** 7422,7434 ****
  string, such as @samp{"z"}.
  
  As it happens, the argument passed to @code{zap-to-char} is a single
! character.  Because of the way computers are built, the Lisp
! interpreter may treat a single character as being different from a
! string of characters.  Inside the computer, a single character has a
! different electronic format than a string of one character.  (A single
! character can often be recorded in the computer using exactly one
! byte; but a string may be longer, and the computer needs to be ready
! for this.)  Since the @code{search-forward} function searches for a
  string, the character that the @code{zap-to-char} function receives as
  its argument must be converted inside the computer from one format to
  the other; otherwise the @code{search-forward} function will fail.
--- 7305,7314 ----
  string, such as @samp{"z"}.
  
  As it happens, the argument passed to @code{zap-to-char} is a single
! character.  The Lisp interpreter treats single characters as being
! different from strings of characters, since the former are always one
! character but the latter can each have different numbers of
! characters.  Since the @code{search-forward} function searches for a
  string, the character that the @code{zap-to-char} function receives as
  its argument must be converted inside the computer from one format to
  the other; otherwise the @code{search-forward} function will fail.
***************
*** 7533,7544 ****
  @findex kill-region
  
  The @code{zap-to-char} function uses the @code{kill-region} function.
! This function clips text from a region and copies that text to
! the kill ring, from which it may be retrieved.
! 
! The Emacs 21 version of that function uses @code{condition-case} and
! @code{copy-region-as-kill}, both of which we will explain.
! @code{condition-case} is an important special form.
  
  In essence, the @code{kill-region} function calls
  @code{condition-case}, which takes three arguments.  In this function,
--- 7413,7422 ----
  @findex kill-region
  
  The @code{zap-to-char} function uses the @code{kill-region} function.
! This function clips text from a region and copies that text to the
! kill ring, from which it may be retrieved.  It also uses
! @code{condition-case} and @code{copy-region-as-kill}, both of which we
! will explain.  @code{condition-case} is an important special form.
  
  In essence, the @code{kill-region} function calls
  @code{condition-case}, which takes three arguments.  In this function,
***************
*** 10636,10642 ****
  @group
  (defun @var{name-of-recursive-function} (@var{argument-list})
    "@var{documentation}@dots{}"
!   (if @var{do-again-test}
      @var{body}@dots{}
      (@var{name-of-recursive-function}
           @var{next-step-expression})))
--- 10514,10520 ----
  @group
  (defun @var{name-of-recursive-function} (@var{argument-list})
    "@var{documentation}@dots{}"
!   (when @var{do-again-test}
      @var{body}@dots{}
      (@var{name-of-recursive-function}
           @var{next-step-expression})))
***************
*** 10668,10687 ****
  of numbers can be written recursively.  Here is the code, including
  an expression to set the value of the variable @code{animals} to a list.
  
! If you are using Emacs 20 or before, this example must be copied to
! the @file{*scratch*} buffer and each expression must be evaluated
! there.  Use @kbd{C-u C-x C-e} to evaluate the
! @code{(print-elements-recursively animals)} expression so that the
! results are printed in the buffer; otherwise the Lisp interpreter will
! try to squeeze the results into the one line of the echo area.
  
  Also, place your cursor immediately after the last closing parenthesis
  of the @code{print-elements-recursively} function, before the comment.
  Otherwise, the Lisp interpreter will try to evaluate the comment.
  
- If you are using Emacs 21 or later, you can evaluate this expression
- directly in Info.
- 
  @findex print-elements-recursively
  @smallexample
  @group
--- 10546,10561 ----
  of numbers can be written recursively.  Here is the code, including
  an expression to set the value of the variable @code{animals} to a list.
  
! In Emacs, you can evaluate these expressions directly in Info.  Use
! @kbd{C-u C-x C-e} to evaluate the @code{(print-elements-recursively
! animals)} expression so that the results are printed in the buffer;
! otherwise the Lisp interpreter will try to squeeze the results into
! the one line of the echo area.
  
  Also, place your cursor immediately after the last closing parenthesis
  of the @code{print-elements-recursively} function, before the comment.
  Otherwise, the Lisp interpreter will try to evaluate the comment.
  
  @findex print-elements-recursively
  @smallexample
  @group
***************
*** 10690,10700 ****
  (defun print-elements-recursively (list)
    "Print each element of LIST on a line of its own.
  Uses recursion."
!   (if list                              ; @r{do-again-test}
!       (progn
!         (print (car list))              ; @r{body}
!         (print-elements-recursively     ; @r{recursive call}
!          (cdr list)))))                 ; @r{next-step-expression}
  
  (print-elements-recursively animals)
  @end group
--- 10564,10573 ----
  (defun print-elements-recursively (list)
    "Print each element of LIST on a line of its own.
  Uses recursion."
!   (when list                            ; @r{do-again-test}
!     (print (car list))                  ; @r{body}
!     (print-elements-recursively         ; @r{recursive call}
!      (cdr list)))))                     ; @r{next-step-expression}
  
  (print-elements-recursively animals)
  @end group
***************
*** 10716,10722 ****
  assemblies a second robot and tells it what to do; the second robot is
  a different individual from the first, but is the same model.
  
! When the second evaluation occurs, the @code{if} expression is
  evaluated and if true, prints the first element of the list it
  receives as its argument (which is the second element of the original
  list).  Then the function `calls itself' with the @sc{cdr} of the list
--- 10589,10595 ----
  assemblies a second robot and tells it what to do; the second robot is
  a different individual from the first, but is the same model.
  
! When the second evaluation occurs, the @code{when} expression is
  evaluated and if true, prints the first element of the list it
  receives as its argument (which is the second element of the original
  list).  Then the function `calls itself' with the @sc{cdr} of the list
***************
*** 10733,10742 ****
  works on a shorter list.
  
  Eventually, the function invokes itself on an empty list.  It creates
! a new instance whose argument is @code{nil}.  The conditional expression
! tests the value of @code{list}.  Since the value of @code{list} is
! @code{nil}, the @code{if} expression tests false so the then-part is
! not evaluated.  The function as a whole then returns @code{nil}.
  
  @need 1200
  When you evaluate @code{(print-elements-recursively animals)} in the
--- 10606,10616 ----
  works on a shorter list.
  
  Eventually, the function invokes itself on an empty list.  It creates
! a new instance whose argument is @code{nil}.  The conditional
! expression tests the value of @code{list}.  Since the value of
! @code{list} is @code{nil}, the @code{when} expression tests false so
! the then-part is not evaluated.  The function as a whole then returns
! @code{nil}.
  
  @need 1200
  When you evaluate @code{(print-elements-recursively animals)} in the
***************
*** 11114,11124 ****
  (defun print-elements-recursively (list)
    "Print each element of LIST on a line of its own.
  Uses recursion."
!   (if list                              ; @r{do-again-test}
!       (progn
!         (print (car list))              ; @r{body}
!         (print-elements-recursively     ; @r{recursive call}
!          (cdr list)))))                 ; @r{next-step-expression}
  
  (print-elements-recursively animals)
  @end group
--- 10988,10997 ----
  (defun print-elements-recursively (list)
    "Print each element of LIST on a line of its own.
  Uses recursion."
!   (when list                            ; @r{do-again-test}
!     (print (car list))                  ; @r{body}
!     (print-elements-recursively         ; @r{recursive call}
!      (cdr list))))                      ; @r{next-step-expression}
  
  (print-elements-recursively animals)
  @end group
***************
*** 12631,12643 ****
  your sources!  Without them, you are like a person who tries to drive
  a car with his eyes shut!)
  
! @c !!! again, 21.0.100 tags table location in this paragraph
  Or -- a good habit to get into -- you can type @kbd{M-.}
  (@code{find-tag}) and the name of the function when prompted for it.
  This will take you directly to the source.  If the @code{find-tag}
  function first asks you for the name of a @file{TAGS} table, give it
  the name of the @file{TAGS} file such as
! @file{/usr/local/share/emacs/21.0.100/lisp/TAGS}.  (The exact path to your
  @file{TAGS} file depends on how your copy of Emacs was installed.)
  
  You can also create your own @file{TAGS} file for directories that
--- 12504,12516 ----
  your sources!  Without them, you are like a person who tries to drive
  a car with his eyes shut!)
  
! @c !!! again, 22.1 tags table location in this paragraph
  Or -- a good habit to get into -- you can type @kbd{M-.}
  (@code{find-tag}) and the name of the function when prompted for it.
  This will take you directly to the source.  If the @code{find-tag}
  function first asks you for the name of a @file{TAGS} table, give it
  the name of the @file{TAGS} file such as
! @file{/usr/local/share/emacs/22.1/lisp/TAGS}.  (The exact path to your
  @file{TAGS} file depends on how your copy of Emacs was installed.)
  
  You can also create your own @file{TAGS} file for directories that
***************
*** 14345,14352 ****
  definition and constructs a lengths' list containing the information.
  
  Emacs kills the buffer after working through it.  This is to save
! space inside of Emacs.  My version of Emacs 19 contained over 300
! source files of interest; Emacs 21 contains over 800 source files.
  Another function will apply @code{lengths-list-file} to each of the
  files.
  
--- 14218,14224 ----
  definition and constructs a lengths' list containing the information.
  
  Emacs kills the buffer after working through it.  This is to save
! space inside of Emacs; Emacs 21 contained over 800 source files.
  Another function will apply @code{lengths-list-file} to each of the
  files.
  
***************
*** 14358,14378 ****
  place your cursor after the following expression and type @kbd{C-x
  C-e} (@code{eval-last-sexp}).
  
! @c !!! 21.0.100 lisp sources location here
  @smallexample
  (lengths-list-file
!  "/usr/local/share/emacs/21.0.100/lisp/emacs-lisp/debug.el")
  @end smallexample
  
- @c was: (lengths-list-file "../lisp/debug.el")
- @c !!!  as of 21, Info file is in
- @c /usr/share/info/emacs-lisp-intro.info.gz
- @c but debug.el is in  /usr/local/share/emacs/21.0.100/lisp/emacs-lisp/debug.el
- 
  @noindent
  (You may need to change the pathname of the file; the one here worked
! with GNU Emacs version 21.0.100.  To change the expression, copy it to
! the @file{*scratch*} buffer and edit it.
  
  @need 1200
  @noindent
--- 14230,14245 ----
  place your cursor after the following expression and type @kbd{C-x
  C-e} (@code{eval-last-sexp}).
  
! @c !!! 22.1 lisp sources location here
  @smallexample
  (lengths-list-file
!  "/usr/local/share/emacs/22.1/lisp/emacs-lisp/debug.el")
  @end smallexample
  
  @noindent
  (You may need to change the pathname of the file; the one here worked
! with GNU Emacs version 22.1.  To change the expression, copy it to
! the @file{*scratch*} buffer and edit it.)
  
  @need 1200
  @noindent
***************
*** 14395,14411 ****
  (77 95 85 87 131 89 50 25 44 44 68 35 64 45 17 34 167 457)
  @end smallexample
  
- @need 1500
- (Using my old machine, the version 19 lengths' list for @file{debug.el}
- took seven seconds to produce and looked like this:
- 
- @smallexample
- (75 41 80 62 20 45 44 68 45 12 34 235)
- @end smallexample
- 
- (The newer version of  @file{debug.el} contains more defuns than the
- earlier one; and my new machine is much faster than the old one.)
- 
  Note that the length of the last definition in the file is first in
  the list.
  
--- 14262,14267 ----
***************
*** 14499,14509 ****
  name to the absolute, long, path name form of the directory in which
  the function is called.
  
! @c !!! 21.0.100 lisp sources location here
  @need 1500
  Thus, if @code{expand-file-name} is called on @code{debug.el} when
  Emacs is visiting the
! @file{/usr/local/share/emacs/21.0.100/lisp/emacs-lisp/} directory,
  
  @smallexample
  debug.el
--- 14355,14365 ----
  name to the absolute, long, path name form of the directory in which
  the function is called.
  
! @c !!! 22.1 lisp sources location here
  @need 1500
  Thus, if @code{expand-file-name} is called on @code{debug.el} when
  Emacs is visiting the
! @file{/usr/local/share/emacs/22.1/lisp/emacs-lisp/} directory,
  
  @smallexample
  debug.el
***************
*** 14513,14521 ****
  @noindent
  becomes
  
! @c !!! 21.0.100 lisp sources location here
  @smallexample
! /usr/local/share/emacs/21.0.100/lisp/emacs-lisp/debug.el
  @end smallexample
  
  The only other new element of this function definition is the as yet
--- 14369,14377 ----
  @noindent
  becomes
  
! @c !!! 22.1 lisp sources location here
  @smallexample
! /usr/local/share/emacs/22.1/lisp/emacs-lisp/debug.el
  @end smallexample
  
  The only other new element of this function definition is the as yet
***************
*** 14779,14787 ****
  
  @smallexample
  @group
! ("../lisp/macros.el"
!  "../lisp/mail/rmail.el"
!  "../lisp/makesum.el")
  @end group
  @end smallexample
  
--- 14635,14643 ----
  
  @smallexample
  @group
! ("@dots{}/lisp/macros.el"
!  "@dots{}/lisp/mail/rmail.el"
!  "@dots{}/lisp/makesum.el")
  @end group
  @end smallexample
  
***************
*** 14909,14915 ****
    ;; Although the function will be used non-interactively,
    ;; it will be easier to test if we make it interactive.
    ;; The directory will have a name such as
!   ;;  "/usr/local/share/emacs/21.0.100/lisp/"
    (interactive "DDirectory name: ")
  @end group
  @group
--- 14765,14771 ----
    ;; Although the function will be used non-interactively,
    ;; it will be easier to test if we make it interactive.
    ;; The directory will have a name such as
!   ;;  "/usr/local/share/emacs/22.1/lisp/"
    (interactive "DDirectory name: ")
  @end group
  @group
***************
*** 15892,15898 ****
  
  The recursive function is a little more difficult.  It has four parts:
  the `do-again-test', the printing code, the recursive call, and the
! `next-step-expression'.  The `do-again-test' is an @code{if}
  expression that determines whether the @code{numbers-list} contains
  any remaining elements; if it does, the function prints one column of
  the graph using the printing code and calls itself again.  The
--- 15748,15754 ----
  
  The recursive function is a little more difficult.  It has four parts:
  the `do-again-test', the printing code, the recursive call, and the
! `next-step-expression'.  The `do-again-test' is an @code{when}
  expression that determines whether the @code{numbers-list} contains
  any remaining elements; if it does, the function prints one column of
  the graph using the printing code and calls itself again.  The
***************
*** 15909,15926 ****
  @end group
  
  @group
!   (if numbers-list
!       (progn
!         (setq from-position (point))
!         (insert-rectangle
!          (column-of-graph height (car numbers-list)))
  @end group
  @group
!         (goto-char from-position)
!         (forward-char symbol-width)
!         (sit-for 0)     ; @r{Draw graph column by column.}
!         (recursive-graph-body-print-internal
!          (cdr numbers-list) height symbol-width))))
  @end group
  @end smallexample
  
--- 15765,15781 ----
  @end group
  
  @group
!   (when numbers-list
!     (setq from-position (point))
!     (insert-rectangle
!      (column-of-graph height (car numbers-list)))
  @end group
  @group
!     (goto-char from-position)
!     (forward-char symbol-width)
!     (sit-for 0)     ; @r{Draw graph column by column.}
!     (recursive-graph-body-print-internal
!      (cdr numbers-list) height symbol-width)))
  @end group
  @end smallexample
  
***************
*** 15994,16000 ****
  * Loading Files::               Load (i.e., evaluate) files automatically.
  * Autoload::                    Make functions available.
  * Simple Extension::            Define a function; bind it to a key.
! * X11 Colors::                  Colors in version 19 in X.
  * Miscellaneous::
  * Mode Line::                   How to customize your mode line.
  @end menu
--- 15849,15855 ----
  * Loading Files::               Load (i.e., evaluate) files automatically.
  * Autoload::                    Make functions available.
  * Simple Extension::            Define a function; bind it to a key.
! * X11 Colors::                  Setting colors to use in X.
  * Miscellaneous::
  * Mode Line::                   How to customize your mode line.
  @end menu
***************
*** 16916,16991 ****
  @cindex Conditional 'twixt two versions of Emacs
  @cindex Version of Emacs, choosing
  @cindex Emacs version, choosing
! If you run two versions of GNU Emacs, such as versions 20 and 21, and
  use one @file{.emacs} file, you can select which code to evaluate with
! the following conditional:
  
  @smallexample
  @group
! (cond
!  ((string-equal (number-to-string 20) (substring (emacs-version) 10 12))
!   ;; evaluate version 20 code
    ( @dots{} ))
-  ((string-equal (number-to-string 21) (substring (emacs-version) 10 12))
-   ;; evaluate version 21 code
-   ( @dots{} )))
  @end group
  @end smallexample
  
! For example, in contrast to version 20, version 21 blinks its cursor
! by default.  I hate such blinking, as well as some other features in
! version 21, so I placed the following in my @file{.emacs}
! file@footnote{When I start instances of Emacs that do not load my
! @file{.emacs} file or any site file, I also turn off blinking:
! 
! @smallexample
! emacs -q --no-site-file -eval '(blink-cursor-mode nil)'
! @end smallexample
! }:
  
  @smallexample
  @group
! (if (string-equal "21" (substring (emacs-version) 10 12))
!     (progn
!       (blink-cursor-mode 0)
!       ;; Insert newline when you press `C-n' (next-line)
!       ;; at the end of the buffer
!       (setq next-line-add-newlines t)
  @end group
  @group
!       ;; Turn on image viewing
!       (auto-image-file-mode t)
  @end group
  @group
!       ;; Turn on menu bar (this bar has text)
!       ;; (Use numeric argument to turn on)
!       (menu-bar-mode 1)
  @end group
  @group
!       ;; Turn off tool bar (this bar has icons)
!       ;; (Use numeric argument to turn on)
!       (tool-bar-mode nil)
  @end group
  @group
!       ;; Turn off tooltip mode for tool bar
!       ;; (This mode causes icon explanations to pop up)
!       ;; (Use numeric argument to turn on)
!       (tooltip-mode nil)
!       ;; If tooltips turned on, make tips appear promptly
!       (setq tooltip-delay 0.1)  ; default is one second
!        ))
  @end group
  @end smallexample
  
- @noindent
- (You will note that instead of typing @code{(number-to-string 21)}, I
- decided to save typing and wrote `21' as a string, @code{"21"}, rather
- than convert it from an integer to a string.  In this instance, this
- expression is better than the longer, but more general
- @code{(number-to-string 21)}.  However, if you do not know ahead of
- time what type of information will be returned, then the
- @code{number-to-string} function will be needed.)
- 
  @node X11 Colors, Miscellaneous, Simple Extension, Emacs Initialization
  @section X11 Colors
  
--- 16771,16825 ----
  @cindex Conditional 'twixt two versions of Emacs
  @cindex Version of Emacs, choosing
  @cindex Emacs version, choosing
! If you run multiple versions of GNU Emacs, such as versions 20 and 21, and
  use one @file{.emacs} file, you can select which code to evaluate with
! a conditional like the following:
  
  @smallexample
  @group
! (if (< emacs-major-version 21)
!     ;; code for versions 20 and before
!     ( @dots{} )
!   ;; code for versions 21 and newer
    ( @dots{} ))
  @end group
  @end smallexample
  
! For example, starting in version 21, the cursor blinks by default.  I
! don't like that feature, but I do like viewing image files as images,
! which is also new in 21 but disabled by default.  To obtain just the
! features I like, I placed the following in my @file{.emacs} file:
  
  @smallexample
  @group
! (when (>= emacs-major-version 21)
!   (blink-cursor-mode 0)
!   ;; Insert newline when you press `C-n' (next-line)
!   ;; at the end of the buffer
!   (setq next-line-add-newlines t)
  @end group
  @group
!   ;; Turn on image viewing
!   (auto-image-file-mode 1)
  @end group
  @group
!   ;; Turn on menu bar (this bar has text)
!   (menu-bar-mode 1)
  @end group
  @group
!   ;; Turn off tool bar (this bar has icons)
!   (tool-bar-mode 0)
  @end group
  @group
!   ;; Turn off tooltip mode for tool bar
!   ;; (This mode causes icon explanations to pop up)
!   (tooltip-mode 0)
!   ;; If tooltips turned on, make tips appear promptly
!   (setq tooltip-delay 0.1)  ; default is one second
!    ))
  @end group
  @end smallexample
  
  @node X11 Colors, Miscellaneous, Simple Extension, Emacs Initialization
  @section X11 Colors
  
***************
*** 17344,17356 ****
  characters; this length works well in a typical 80 column wide
  window.)
  
! @code{:eval} is a new feature in GNU Emacs version 21.  It says to
! evaluate the following form and use the result as a string to display.
! In this case, the expression displays the first component of the full
! system name.  The end of the first component is a @samp{.} (`period'),
! so I use the @code{string-match} function to tell me the length of the
! first component.  The substring from the zeroth character to that
! length is the name of the machine.
  
  @need 1250
  This is the expression:
--- 17178,17189 ----
  characters; this length works well in a typical 80 column wide
  window.)
  
! @code{:eval} says to evaluate the following form and use the result as
! a string to display.  In this case, the expression displays the first
! component of the full system name.  The end of the first component is
! a @samp{.} (`period'), so I use the @code{string-match} function to
! tell me the length of the first component.  The substring from the
! zeroth character to that length is the name of the machine.
  
  @need 1250
  This is the expression:
***************
*** 17479,17502 ****
  tell you what you need to know to correct the definition.  The
  function @code{1=} is `void'.
  
- @need 800
- In GNU Emacs 20 and before, you will see:
- 
- @smallexample
- Symbol's function definition is void:@: 1=
- @end smallexample
- 
- @noindent
- which has the same meaning as the @file{*Backtrace*} buffer line in
- version 21.
- 
  However, suppose you are not quite certain what is going on?
  You can read the complete backtrace.
  
- In this case, you need to run GNU Emacs 21, which automatically starts
- the debugger that puts you in the @file{*Backtrace*} buffer; or else,
- you need to start the debugger manually as described below.
- 
  Read the @file{*Backtrace*} buffer from the bottom up; it tells you
  what Emacs did that led to the error.  Emacs made an interactive call
  to @kbd{C-x C-e} (@code{eval-last-sexp}), which led to the evaluation
--- 17312,17320 ----
***************
*** 17535,17551 ****
  @section @code{debug-on-entry}
  @findex debug-on-entry
  
! GNU Emacs 21 starts the debugger automatically when your function has
! an error.  GNU Emacs version 20 and before did not; it simply
! presented you with an error message.  You had to start the debugger
! manually.
! 
! You can start the debugger manually for all versions of Emacs; the
! advantage is that the debugger runs even if you do not have a bug in
! your code.  Sometimes your code will be free of bugs!
  
! You can enter the debugger when you call the function by calling
! @code{debug-on-entry}.
  
  @need 1250
  @noindent
--- 17353,17365 ----
  @section @code{debug-on-entry}
  @findex debug-on-entry
  
! Emacs starts the debugger automatically when your function encounters
! an error.  You can ask for Emacs to start the debugger at other times;
! this can help you understand the behavior of your code whether it
! fails or not.
  
! You can arrange to enter the debugger when you call the function by
! calling @code{debug-on-entry}.
  
  @need 1250
  @noindent
***************
*** 17564,17572 ****
  @end smallexample
  
  @noindent
! All versions of Emacs will create a @file{*Backtrace*} buffer and tell
! you that it is beginning to evaluate the @code{triangle-bugged}
! function:
  
  @smallexample
  @group
--- 17378,17385 ----
  @end smallexample
  
  @noindent
! Emacs will create a @file{*Backtrace*} buffer and tell you that it is
! beginning to evaluate the @code{triangle-bugged} function:
  
  @smallexample
  @group
