aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/lispintro/ChangeLog7
-rw-r--r--doc/lispintro/emacs-lisp-intro.texi52
2 files changed, 35 insertions, 24 deletions
diff --git a/doc/lispintro/ChangeLog b/doc/lispintro/ChangeLog
index 46709e2d888..0d6df0d5433 100644
--- a/doc/lispintro/ChangeLog
+++ b/doc/lispintro/ChangeLog
@@ -1,3 +1,10 @@
12012-05-04 Glenn Morris <rgm@gnu.org>
2
3 * emacs-lisp-intro.texi (Making Errors): Don't mention Emacs 20.
4 (Void Function, Wrong Type of Argument, Recursion with list)
5 (Simple Extension): Assume a non-ancient Emacs.
6 (Void Variable, Switching Buffers): Improve page breaks.
7
12012-05-03 Glenn Morris <rgm@gnu.org> 82012-05-03 Glenn Morris <rgm@gnu.org>
2 9
3 * emacs-lisp-intro.texi: Update GNU Press contact details. 10 * emacs-lisp-intro.texi: Update GNU Press contact details.
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi
index 81a0edd7aba..9446333db2a 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -1426,6 +1426,7 @@ C-e}:
1426(this is an unquoted list) 1426(this is an unquoted list)
1427@end smallexample 1427@end smallexample
1428 1428
1429@ignore
1429@noindent 1430@noindent
1430What you see depends on which version of Emacs you are running. GNU 1431What you see depends on which version of Emacs you are running. GNU
1431Emacs version 22 provides more information than version 20 and before. 1432Emacs version 22 provides more information than version 20 and before.
@@ -1436,6 +1437,10 @@ earlier, version 20 result.
1436@noindent 1437@noindent
1437In GNU Emacs version 22, a @file{*Backtrace*} window will open up and 1438In GNU Emacs version 22, a @file{*Backtrace*} window will open up and
1438you will see the following in it: 1439you will see the following in it:
1440@end ignore
1441
1442A @file{*Backtrace*} window will open up and you should see the
1443following in it:
1439 1444
1440@smallexample 1445@smallexample
1441@group 1446@group
@@ -1514,19 +1519,24 @@ evaluating @code{(+ 2 2)}, we can infer that the symbol @code{+} must
1514have a set of instructions for the computer to obey and those 1519have a set of instructions for the computer to obey and those
1515instructions must be to add the numbers that follow the @code{+}. 1520instructions must be to add the numbers that follow the @code{+}.
1516 1521
1517@need 1250 1522It is possible to prevent Emacs entering the debugger in cases like
1518In GNU Emacs version 20, and in earlier versions, you will see only 1523this. We do not explain how to do that here, but we will mention what
1519one line of error message; it will appear in the echo area and look 1524the result looks like, because you may encounter a similar situation
1520like this: 1525if there is a bug in some Emacs code that you are using. In such
1526cases, you will see only one line of error message; it will appear in
1527the echo area and look like this:
1521 1528
1522@smallexample 1529@smallexample
1523Symbol's function definition is void:@: this 1530Symbol's function definition is void:@: this
1524@end smallexample 1531@end smallexample
1525 1532
1526@noindent 1533@noindent
1534@ignore
1527(Also, your terminal may beep at you---some do, some don't; and others 1535(Also, your terminal may beep at you---some do, some don't; and others
1528blink. This is just a device to get your attention.) The message goes 1536blink. This is just a device to get your attention.)
1529away as soon as you type another key, even just to move the cursor. 1537@end ignore
1538The message goes away as soon as you type a key, even just to
1539move the cursor.
1530 1540
1531We know the meaning of the word @samp{Symbol}. It refers to the first 1541We know the meaning of the word @samp{Symbol}. It refers to the first
1532atom of the list, the word @samp{this}. The word @samp{function} 1542atom of the list, the word @samp{this}. The word @samp{function}
@@ -1862,8 +1872,7 @@ Try evaluating this:
1862 1872
1863@need 1250 1873@need 1250
1864@noindent 1874@noindent
1865In GNU Emacs version 22, you will create a @file{*Backtrace*} buffer 1875You will create a @file{*Backtrace*} buffer that says:
1866that says:
1867 1876
1868@smallexample 1877@smallexample
1869@group 1878@group
@@ -1929,7 +1938,7 @@ Debugger entered--Lisp error: (void-variable +)
1929@end smallexample 1938@end smallexample
1930 1939
1931@noindent 1940@noindent
1932(As with the other times we entered the debugger, you can quit by 1941(Again, you can quit the debugger by
1933typing @kbd{q} in the @file{*Backtrace*} buffer.) 1942typing @kbd{q} in the @file{*Backtrace*} buffer.)
1934 1943
1935This backtrace is different from the very first error message we saw, 1944This backtrace is different from the very first error message we saw,
@@ -1943,7 +1952,7 @@ interpreter to evaluate the @code{+} and look for the value of the
1943variable instead of the function definition. We did this by placing the 1952variable instead of the function definition. We did this by placing the
1944cursor right after the symbol rather than after the parenthesis of the 1953cursor right after the symbol rather than after the parenthesis of the
1945enclosing list as we did before. As a consequence, the Lisp interpreter 1954enclosing list as we did before. As a consequence, the Lisp interpreter
1946evaluated the preceding s-expression, which in this case was the 1955evaluated the preceding s-expression, which in this case was
1947@code{+} by itself. 1956@code{+} by itself.
1948 1957
1949Since @code{+} does not have a value bound to it, just the function 1958Since @code{+} does not have a value bound to it, just the function
@@ -2183,8 +2192,7 @@ is that @code{+} has tried to add the 2 to the value returned by
2183could not carry out its addition. 2192could not carry out its addition.
2184 2193
2185@need 1250 2194@need 1250
2186In GNU Emacs version 22, you will create and enter a 2195You will create and enter a @file{*Backtrace*} buffer that says:
2187@file{*Backtrace*} buffer that says:
2188 2196
2189@noindent 2197@noindent
2190@smallexample 2198@smallexample
@@ -2912,7 +2920,7 @@ rather, to save typing, you probably only typed @kbd{RET} if the
2912default buffer was @file{*scratch*}, or if it was different, then you 2920default buffer was @file{*scratch*}, or if it was different, then you
2913typed just part of the name, such as @code{*sc}, pressed your 2921typed just part of the name, such as @code{*sc}, pressed your
2914@kbd{TAB} key to cause it to expand to the full name, and then typed 2922@kbd{TAB} key to cause it to expand to the full name, and then typed
2915your @kbd{RET} key.} when prompted in the minibuffer for the name of 2923@kbd{RET}.} when prompted in the minibuffer for the name of
2916the buffer to which you wanted to switch. The keystrokes, @kbd{C-x 2924the buffer to which you wanted to switch. The keystrokes, @kbd{C-x
2917b}, cause the Lisp interpreter to evaluate the interactive function 2925b}, cause the Lisp interpreter to evaluate the interactive function
2918@code{switch-to-buffer}. As we said before, this is how Emacs works: 2926@code{switch-to-buffer}. As we said before, this is how Emacs works:
@@ -2922,10 +2930,7 @@ different keystrokes call or run different functions. For example,
2922 2930
2923By writing @code{switch-to-buffer} in an expression, and giving it a 2931By writing @code{switch-to-buffer} in an expression, and giving it a
2924buffer to switch to, we can switch buffers just the way @kbd{C-x b} 2932buffer to switch to, we can switch buffers just the way @kbd{C-x b}
2925does. 2933does:
2926
2927@need 1000
2928Here is the Lisp expression:
2929 2934
2930@smallexample 2935@smallexample
2931(switch-to-buffer (other-buffer)) 2936(switch-to-buffer (other-buffer))
@@ -7722,6 +7727,7 @@ retrieved. @xref{Yanking, , Yanking Text Back}.
7722@section @code{zap-to-char} 7727@section @code{zap-to-char}
7723@findex zap-to-char 7728@findex zap-to-char
7724 7729
7730@c FIXME remove obsolete stuff
7725The @code{zap-to-char} function changed little between GNU Emacs 7731The @code{zap-to-char} function changed little between GNU Emacs
7726version 19 and GNU Emacs version 22. However, @code{zap-to-char} 7732version 19 and GNU Emacs version 22. However, @code{zap-to-char}
7727calls another function, @code{kill-region}, which enjoyed a major 7733calls another function, @code{kill-region}, which enjoyed a major
@@ -11508,9 +11514,10 @@ The example of a @code{while} loop that printed the elements of a list
11508of numbers can be written recursively. Here is the code, including 11514of numbers can be written recursively. Here is the code, including
11509an expression to set the value of the variable @code{animals} to a list. 11515an expression to set the value of the variable @code{animals} to a list.
11510 11516
11511If you are using GNU Emacs 20 or before, this example must be copied 11517If you are reading this in Info in Emacs, you can evaluate this
11512to the @file{*scratch*} buffer and each expression must be evaluated 11518expression directly in Info. Otherwise, you must copy the example
11513there. Use @kbd{C-u C-x C-e} to evaluate the 11519to the @file{*scratch*} buffer and evaluate each expression there.
11520Use @kbd{C-u C-x C-e} to evaluate the
11514@code{(print-elements-recursively animals)} expression so that the 11521@code{(print-elements-recursively animals)} expression so that the
11515results are printed in the buffer; otherwise the Lisp interpreter will 11522results are printed in the buffer; otherwise the Lisp interpreter will
11516try to squeeze the results into the one line of the echo area. 11523try to squeeze the results into the one line of the echo area.
@@ -11519,9 +11526,6 @@ Also, place your cursor immediately after the last closing parenthesis
11519of the @code{print-elements-recursively} function, before the comment. 11526of the @code{print-elements-recursively} function, before the comment.
11520Otherwise, the Lisp interpreter will try to evaluate the comment. 11527Otherwise, the Lisp interpreter will try to evaluate the comment.
11521 11528
11522If you are using a more recent version of Emacs, you can evaluate this
11523expression directly in Info.
11524
11525@findex print-elements-recursively 11529@findex print-elements-recursively
11526@smallexample 11530@smallexample
11527@group 11531@group
@@ -17949,7 +17953,7 @@ the following conditional:
17949@end group 17953@end group
17950@end smallexample 17954@end smallexample
17951 17955
17952For example, in contrast to version 20, more recent versions blink 17956For example, recent versions blink
17953their cursors by default. I hate such blinking, as well as other 17957their cursors by default. I hate such blinking, as well as other
17954features, so I placed the following in my @file{.emacs} 17958features, so I placed the following in my @file{.emacs}
17955file@footnote{When I start instances of Emacs that do not load my 17959file@footnote{When I start instances of Emacs that do not load my