diff options
| author | Robert J. Chassell | 2002-06-06 16:17:38 +0000 |
|---|---|---|
| committer | Robert J. Chassell | 2002-06-06 16:17:38 +0000 |
| commit | b15dd613150d3ec3eaac395c31b6ef9a8c42f761 (patch) | |
| tree | 9200938ccdb9e336fa219670a5b997d0332fe9ea | |
| parent | 5ec3b9b837db4bd21219721f60d95bb8e524b545 (diff) | |
| download | emacs-b15dd613150d3ec3eaac395c31b6ef9a8c42f761.tar.gz emacs-b15dd613150d3ec3eaac395c31b6ef9a8c42f761.zip | |
Fix typos, clarify language.
| -rw-r--r-- | lispintro/emacs-lisp-intro.texi | 46 |
1 files changed, 27 insertions, 19 deletions
diff --git a/lispintro/emacs-lisp-intro.texi b/lispintro/emacs-lisp-intro.texi index 744069caffd..34d9044ca36 100644 --- a/lispintro/emacs-lisp-intro.texi +++ b/lispintro/emacs-lisp-intro.texi | |||
| @@ -21,8 +21,8 @@ | |||
| 21 | 21 | ||
| 22 | @comment %**end of header | 22 | @comment %**end of header |
| 23 | 23 | ||
| 24 | @set edition-number 2.05 | 24 | @set edition-number 2.06 |
| 25 | @set update-date 2002 Jan 5 | 25 | @set update-date 2002 Jun 6 |
| 26 | 26 | ||
| 27 | @ignore | 27 | @ignore |
| 28 | ## Summary of shell commands to create various output formats: | 28 | ## Summary of shell commands to create various output formats: |
| @@ -6696,8 +6696,16 @@ After evaluating this list, you will see | |||
| 6696 | @end smallexample | 6696 | @end smallexample |
| 6697 | 6697 | ||
| 6698 | @noindent | 6698 | @noindent |
| 6699 | appear in the echo area. @code{cons} puts a new element at the | 6699 | appear in the echo area. @code{cons} causes the creation of a new |
| 6700 | beginning of a list; it attaches or pushes elements onto the list. | 6700 | list in which the element is followed by the elements of the original |
| 6701 | list. | ||
| 6702 | |||
| 6703 | We often say that `@code{cons} puts a new element at the beginning of | ||
| 6704 | a list; it attaches or pushes elements onto the list', but this | ||
| 6705 | phrasing can be misleading, since @code{cons} does not change an | ||
| 6706 | existing list, but creates a new one. | ||
| 6707 | |||
| 6708 | Like @code{car} and @code{cdr}, @code{cons} is non-destructive. | ||
| 6701 | 6709 | ||
| 6702 | @menu | 6710 | @menu |
| 6703 | * Build a list:: | 6711 | * Build a list:: |
| @@ -7191,7 +7199,8 @@ look like this: | |||
| 7191 | 7199 | ||
| 7192 | @need 1200 | 7200 | @need 1200 |
| 7193 | @noindent | 7201 | @noindent |
| 7194 | The function @code{cons} can be used to add a piece of text to the list, | 7202 | The function @code{cons} can be used to to create a new list from a |
| 7203 | piece of text (an `atom', to use the jargon) and an existing list, | ||
| 7195 | like this: | 7204 | like this: |
| 7196 | 7205 | ||
| 7197 | @smallexample | 7206 | @smallexample |
| @@ -7777,8 +7786,7 @@ expression which will in turn compute the value. In this case, the | |||
| 7777 | macros, see @ref{Macros, , Macros, elisp, The GNU Emacs Lisp Reference | 7786 | macros, see @ref{Macros, , Macros, elisp, The GNU Emacs Lisp Reference |
| 7778 | Manual}. The C programming language also provides macros. These are | 7787 | Manual}. The C programming language also provides macros. These are |
| 7779 | different, but also useful. We will briefly look at C macros in | 7788 | different, but also useful. We will briefly look at C macros in |
| 7780 | @ref{Digression into C, , @code{delete-and-extract-region}: | 7789 | @ref{Digression into C}. |
| 7781 | Digressing into C}. | ||
| 7782 | 7790 | ||
| 7783 | @need 1200 | 7791 | @need 1200 |
| 7784 | If the string has content, then another conditional expression is | 7792 | If the string has content, then another conditional expression is |
| @@ -7827,7 +7835,7 @@ the kill ring as the latest item, and sets the | |||
| 7827 | 7835 | ||
| 7828 | @node Digression into C, defvar, kill-region, Cutting & Storing Text | 7836 | @node Digression into C, defvar, kill-region, Cutting & Storing Text |
| 7829 | @comment node-name, next, previous, up | 7837 | @comment node-name, next, previous, up |
| 7830 | @section @code{delete-and-extract-region}: Digressing into C | 7838 | @section Digression into C |
| 7831 | @findex delete-and-extract-region | 7839 | @findex delete-and-extract-region |
| 7832 | @cindex C, a digression into | 7840 | @cindex C, a digression into |
| 7833 | @cindex Digression into C | 7841 | @cindex Digression into C |
| @@ -9798,7 +9806,7 @@ expression, @code{(print-elements-of-list animals)}, by typing | |||
| 9798 | @code{eval-last-sexp}. This will cause the result of the evaluation | 9806 | @code{eval-last-sexp}. This will cause the result of the evaluation |
| 9799 | to be printed in the @file{*scratch*} buffer instead of being printed | 9807 | to be printed in the @file{*scratch*} buffer instead of being printed |
| 9800 | in the echo area. (Otherwise you will see something like this in your | 9808 | in the echo area. (Otherwise you will see something like this in your |
| 9801 | echo area: @code{^Jgiraffe^J^Jgazelle^J^Jlion^J^Jtiger^Jnil}, in which | 9809 | echo area: @code{^Jgazelle^J^Jgiraffe^J^Jlion^J^Jtiger^Jnil}, in which |
| 9802 | each @samp{^J} stands for a `newline'.) | 9810 | each @samp{^J} stands for a `newline'.) |
| 9803 | 9811 | ||
| 9804 | @need 1500 | 9812 | @need 1500 |
| @@ -9827,10 +9835,10 @@ this: | |||
| 9827 | 9835 | ||
| 9828 | @smallexample | 9836 | @smallexample |
| 9829 | @group | 9837 | @group |
| 9830 | giraffe | ||
| 9831 | |||
| 9832 | gazelle | 9838 | gazelle |
| 9833 | 9839 | ||
| 9840 | giraffe | ||
| 9841 | |||
| 9834 | lion | 9842 | lion |
| 9835 | 9843 | ||
| 9836 | tiger | 9844 | tiger |
| @@ -10539,9 +10547,9 @@ up the number of pebbles in a triangle. | |||
| 10539 | A recursive function contains code that tells the Lisp interpreter to | 10547 | A recursive function contains code that tells the Lisp interpreter to |
| 10540 | call a program that runs exactly like itself, but with slightly | 10548 | call a program that runs exactly like itself, but with slightly |
| 10541 | different arguments. The code runs exactly the same because it has | 10549 | different arguments. The code runs exactly the same because it has |
| 10542 | the same name. However, even though it has the same name, it is not | 10550 | the same name. However, even though the program has the same name, it |
| 10543 | the same thread of execution. It is different. In the jargon, it is | 10551 | is not the same entity. It is different. In the jargon, it is a |
| 10544 | a different `instance'. | 10552 | different `instance'. |
| 10545 | 10553 | ||
| 10546 | Eventually, if the program is written correctly, the `slightly | 10554 | Eventually, if the program is written correctly, the `slightly |
| 10547 | different arguments' will become sufficiently different from the first | 10555 | different arguments' will become sufficiently different from the first |
| @@ -10745,10 +10753,10 @@ When you evaluate @code{(print-elements-recursively animals)} in the | |||
| 10745 | 10753 | ||
| 10746 | @smallexample | 10754 | @smallexample |
| 10747 | @group | 10755 | @group |
| 10748 | giraffe | ||
| 10749 | |||
| 10750 | gazelle | 10756 | gazelle |
| 10751 | 10757 | ||
| 10758 | giraffe | ||
| 10759 | |||
| 10752 | lion | 10760 | lion |
| 10753 | 10761 | ||
| 10754 | tiger | 10762 | tiger |
| @@ -11296,7 +11304,7 @@ the number 7 to the value returned by a second instance of | |||
| 11296 | argument of 6. That is to say, the first calculation is: | 11304 | argument of 6. That is to say, the first calculation is: |
| 11297 | 11305 | ||
| 11298 | @smallexample | 11306 | @smallexample |
| 11299 | (+ 7 (triangle-recursively 6) | 11307 | (+ 7 (triangle-recursively 6)) |
| 11300 | @end smallexample | 11308 | @end smallexample |
| 11301 | 11309 | ||
| 11302 | @noindent | 11310 | @noindent |
| @@ -11318,14 +11326,14 @@ metaphor, it asks yet another robot to help it. | |||
| 11318 | Now the total is: | 11326 | Now the total is: |
| 11319 | 11327 | ||
| 11320 | @smallexample | 11328 | @smallexample |
| 11321 | (+ 7 6 (triangle-recursively 5) | 11329 | (+ 7 6 (triangle-recursively 5)) |
| 11322 | @end smallexample | 11330 | @end smallexample |
| 11323 | 11331 | ||
| 11324 | @need 800 | 11332 | @need 800 |
| 11325 | And what happens next? | 11333 | And what happens next? |
| 11326 | 11334 | ||
| 11327 | @smallexample | 11335 | @smallexample |
| 11328 | (+ 7 6 5 (triangle-recursively 4) | 11336 | (+ 7 6 5 (triangle-recursively 4)) |
| 11329 | @end smallexample | 11337 | @end smallexample |
| 11330 | 11338 | ||
| 11331 | Each time @code{triangle-recursively} is called, except for the last | 11339 | Each time @code{triangle-recursively} is called, except for the last |