diff options
| author | Eli Zaretskii | 2016-01-30 17:27:45 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2016-01-30 17:27:45 +0200 |
| commit | 4bb72337657e2caee3414ed706fafe30b69df463 (patch) | |
| tree | 62000e42e860cedd5a691a26f9a5b46c266ba6c4 | |
| parent | 7b14da444e6ad0eae1eb6c0dde870a84257d6283 (diff) | |
| download | emacs-4bb72337657e2caee3414ed706fafe30b69df463.tar.gz emacs-4bb72337657e2caee3414ed706fafe30b69df463.zip | |
Fix typos in Introduction to Emacs Lisp manual
* doc/lispintro/emacs-lisp-intro.texi (Emacs Initialization)
(kill-new function, Digression into C)
(Complete forward-sentence, Divide and Conquer, Find a File)
(lengths-list-many-files, Columns of a graph, defcustom)
(recursive-count-words): Fix typos. Reported by Daniel Bastos
<dbastos@toledo.com>.
| -rw-r--r-- | doc/lispintro/emacs-lisp-intro.texi | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/doc/lispintro/emacs-lisp-intro.texi b/doc/lispintro/emacs-lisp-intro.texi index 36e60c23005..6c4f305d86d 100644 --- a/doc/lispintro/emacs-lisp-intro.texi +++ b/doc/lispintro/emacs-lisp-intro.texi | |||
| @@ -8681,10 +8681,9 @@ The critical lines are these: | |||
| 8681 | @end group | 8681 | @end group |
| 8682 | @group | 8682 | @group |
| 8683 | ;; @r{else} | 8683 | ;; @r{else} |
| 8684 | (push string kill-ring) | 8684 | (push string kill-ring) |
| 8685 | @end group | 8685 | @end group |
| 8686 | @group | 8686 | @group |
| 8687 | (setq kill-ring (cons string kill-ring)) | ||
| 8688 | (if (> (length kill-ring) kill-ring-max) | 8687 | (if (> (length kill-ring) kill-ring-max) |
| 8689 | ;; @r{avoid overly long kill ring} | 8688 | ;; @r{avoid overly long kill ring} |
| 8690 | (setcdr (nthcdr (1- kill-ring-max) kill-ring) nil))) | 8689 | (setcdr (nthcdr (1- kill-ring-max) kill-ring) nil))) |
| @@ -9075,7 +9074,7 @@ arguments. | |||
| 9075 | @item | 9074 | @item |
| 9076 | The sixth part is nearly like the argument that follows the | 9075 | The sixth part is nearly like the argument that follows the |
| 9077 | @code{interactive} declaration in a function written in Lisp: a letter | 9076 | @code{interactive} declaration in a function written in Lisp: a letter |
| 9078 | followed, perhaps, by a prompt. The only difference from the Lisp is | 9077 | followed, perhaps, by a prompt. The only difference from Lisp is |
| 9079 | when the macro is called with no arguments. Then you write a @code{0} | 9078 | when the macro is called with no arguments. Then you write a @code{0} |
| 9080 | (which is a null string), as in this macro. | 9079 | (which is a null string), as in this macro. |
| 9081 | 9080 | ||
| @@ -9115,7 +9114,7 @@ then return an empty string. | |||
| 9115 | The @code{del_range_1} function actually deletes the text. It is a | 9114 | The @code{del_range_1} function actually deletes the text. It is a |
| 9116 | complex function we will not look into. It updates the buffer and | 9115 | complex function we will not look into. It updates the buffer and |
| 9117 | does other things. However, it is worth looking at the two arguments | 9116 | does other things. However, it is worth looking at the two arguments |
| 9118 | passed to @code{del_range}. These are @w{@code{XINT (start)}} and | 9117 | passed to @code{del_range_1}. These are @w{@code{XINT (start)}} and |
| 9119 | @w{@code{XINT (end)}}. | 9118 | @w{@code{XINT (end)}}. |
| 9120 | 9119 | ||
| 9121 | As far as the C language is concerned, @code{start} and @code{end} are | 9120 | As far as the C language is concerned, @code{start} and @code{end} are |
| @@ -11644,7 +11643,7 @@ Else, act on the beginning of the list (the @sc{car} of the list) | |||
| 11644 | @end itemize | 11643 | @end itemize |
| 11645 | 11644 | ||
| 11646 | @need 1500 | 11645 | @need 1500 |
| 11647 | Here is example: | 11646 | Here is an example: |
| 11648 | 11647 | ||
| 11649 | @smallexample | 11648 | @smallexample |
| 11650 | @group | 11649 | @group |
| @@ -12538,7 +12537,7 @@ value of @code{arg} to 1, in the case when @code{arg} is bound to | |||
| 12538 | @code{nil}. | 12537 | @code{nil}. |
| 12539 | 12538 | ||
| 12540 | Next is a @code{let}. That specifies the values of two local | 12539 | Next is a @code{let}. That specifies the values of two local |
| 12541 | variables, @code{point} and @code{sentence-end}. The local value of | 12540 | variables, @code{opoint} and @code{sentence-end}. The local value of |
| 12542 | point, from before the search, is used in the | 12541 | point, from before the search, is used in the |
| 12543 | @code{constrain-to-field} function which handles forms and | 12542 | @code{constrain-to-field} function which handles forms and |
| 12544 | equivalents. The @code{sentence-end} variable is set by the | 12543 | equivalents. The @code{sentence-end} variable is set by the |
| @@ -14184,7 +14183,7 @@ the expression that moves point forward, word by word. | |||
| 14184 | 14183 | ||
| 14185 | The third part of a recursive function is the recursive call. | 14184 | The third part of a recursive function is the recursive call. |
| 14186 | 14185 | ||
| 14187 | Somewhere, also, we also need a part that does the work of the | 14186 | Somewhere, we also need a part that does the work of the |
| 14188 | function, a part that does the counting. A vital part! | 14187 | function, a part that does the counting. A vital part! |
| 14189 | 14188 | ||
| 14190 | @need 1250 | 14189 | @need 1250 |
| @@ -14482,12 +14481,12 @@ First, write a function to count the words in one definition. This | |||
| 14482 | includes the problem of handling symbols as well as words. | 14481 | includes the problem of handling symbols as well as words. |
| 14483 | 14482 | ||
| 14484 | @item | 14483 | @item |
| 14485 | Second, write a function to list the numbers of words in each function | 14484 | Second, write a function to list the number of words in each function |
| 14486 | in a file. This function can use the @code{count-words-in-defun} | 14485 | in a file. This function can use the @code{count-words-in-defun} |
| 14487 | function. | 14486 | function. |
| 14488 | 14487 | ||
| 14489 | @item | 14488 | @item |
| 14490 | Third, write a function to list the numbers of words in each function | 14489 | Third, write a function to list the number of words in each function |
| 14491 | in each of several files. This entails automatically finding the | 14490 | in each of several files. This entails automatically finding the |
| 14492 | various files, switching to them, and counting the words in the | 14491 | various files, switching to them, and counting the words in the |
| 14493 | definitions within them. | 14492 | definitions within them. |
| @@ -14952,7 +14951,7 @@ contains two functions, @code{find-file-noselect} and | |||
| 14952 | According to its documentation as shown by @kbd{C-h f} (the | 14951 | According to its documentation as shown by @kbd{C-h f} (the |
| 14953 | @code{describe-function} command), the @code{find-file-noselect} | 14952 | @code{describe-function} command), the @code{find-file-noselect} |
| 14954 | function reads the named file into a buffer and returns the buffer. | 14953 | function reads the named file into a buffer and returns the buffer. |
| 14955 | (Its most recent version includes an optional wildcards argument, | 14954 | (Its most recent version includes an optional @var{wildcards} argument, |
| 14956 | too, as well as another to read a file literally and an other you | 14955 | too, as well as another to read a file literally and an other you |
| 14957 | suppress warning messages. These optional arguments are irrelevant.) | 14956 | suppress warning messages. These optional arguments are irrelevant.) |
| 14958 | 14957 | ||
| @@ -15139,7 +15138,7 @@ either a @code{while} loop or recursion. | |||
| 15139 | @end ifnottex | 15138 | @end ifnottex |
| 15140 | 15139 | ||
| 15141 | The design using a @code{while} loop is routine. The argument passed | 15140 | The design using a @code{while} loop is routine. The argument passed |
| 15142 | the function is a list of files. As we saw earlier (@pxref{Loop | 15141 | to the function is a list of files. As we saw earlier (@pxref{Loop |
| 15143 | Example}), you can write a @code{while} loop so that the body of the | 15142 | Example}), you can write a @code{while} loop so that the body of the |
| 15144 | loop is evaluated if such a list contains elements, but to exit the | 15143 | loop is evaluated if such a list contains elements, but to exit the |
| 15145 | loop if the list is empty. For this design to work, the body of the | 15144 | loop if the list is empty. For this design to work, the body of the |
| @@ -16106,7 +16105,7 @@ columns. Very likely, the name of the function will contain either | |||
| 16106 | the word ``print'' or the word ``insert'' or the word ``column''. | 16105 | the word ``print'' or the word ``insert'' or the word ``column''. |
| 16107 | Therefore, we can simply type @kbd{M-x apropos RET | 16106 | Therefore, we can simply type @kbd{M-x apropos RET |
| 16108 | print\|insert\|column RET} and look at the result. On my system, this | 16107 | print\|insert\|column RET} and look at the result. On my system, this |
| 16109 | command once too takes quite some time, and then produced a list of 79 | 16108 | command once took quite some time, and then produced a list of 79 |
| 16110 | functions and variables. Now it does not take much time at all and | 16109 | functions and variables. Now it does not take much time at all and |
| 16111 | produces a list of 211 functions and variables. Scanning down the | 16110 | produces a list of 211 functions and variables. Scanning down the |
| 16112 | list, the only function that looks as if it might do the job is | 16111 | list, the only function that looks as if it might do the job is |
| @@ -16183,7 +16182,7 @@ The number of asterisks in the column is the number specified by the | |||
| 16183 | current element of the @code{numbers-list}. We need to construct a | 16182 | current element of the @code{numbers-list}. We need to construct a |
| 16184 | list of asterisks of the right length for each call to | 16183 | list of asterisks of the right length for each call to |
| 16185 | @code{insert-rectangle}. If this list consists solely of the requisite | 16184 | @code{insert-rectangle}. If this list consists solely of the requisite |
| 16186 | number of asterisks, then we will have position point the right number | 16185 | number of asterisks, then we will have to position point the right number |
| 16187 | of lines above the base for the graph to print correctly. This could | 16186 | of lines above the base for the graph to print correctly. This could |
| 16188 | be difficult. | 16187 | be difficult. |
| 16189 | 16188 | ||
| @@ -16348,7 +16347,7 @@ As written, @code{column-of-graph} contains a major flaw: the symbols | |||
| 16348 | used for the blank and for the marked entries in the column are | 16347 | used for the blank and for the marked entries in the column are |
| 16349 | hard-coded as a space and asterisk. This is fine for a prototype, | 16348 | hard-coded as a space and asterisk. This is fine for a prototype, |
| 16350 | but you, or another user, may wish to use other symbols. For example, | 16349 | but you, or another user, may wish to use other symbols. For example, |
| 16351 | in testing the graph function, you many want to use a period in place | 16350 | in testing the graph function, you may want to use a period in place |
| 16352 | of the space, to make sure the point is being repositioned properly | 16351 | of the space, to make sure the point is being repositioned properly |
| 16353 | each time the @code{insert-rectangle} function is called; or you might | 16352 | each time the @code{insert-rectangle} function is called; or you might |
| 16354 | want to substitute a @samp{+} sign or other symbol for the asterisk. | 16353 | want to substitute a @samp{+} sign or other symbol for the asterisk. |
| @@ -16711,7 +16710,7 @@ Write a line graph version of the graph printing functions. | |||
| 16711 | 16710 | ||
| 16712 | ``You don't have to like Emacs to like it''---this seemingly | 16711 | ``You don't have to like Emacs to like it''---this seemingly |
| 16713 | paradoxical statement is the secret of GNU Emacs. The plain, out-of-the-box | 16712 | paradoxical statement is the secret of GNU Emacs. The plain, out-of-the-box |
| 16714 | Emacs is a generic tool. Most people who use it, customize | 16713 | Emacs is a generic tool. Most people who use it customize |
| 16715 | it to suit themselves. | 16714 | it to suit themselves. |
| 16716 | 16715 | ||
| 16717 | GNU Emacs is mostly written in Emacs Lisp; this means that by writing | 16716 | GNU Emacs is mostly written in Emacs Lisp; this means that by writing |
| @@ -16907,7 +16906,7 @@ M-x customize | |||
| 16907 | @end smallexample | 16906 | @end smallexample |
| 16908 | 16907 | ||
| 16909 | @noindent | 16908 | @noindent |
| 16910 | and find that the group for editing files of data is called ``data''. | 16909 | and find that the group for editing files of text is called ``Text''. |
| 16911 | Enter that group. Text Mode Hook is the first member. You can click | 16910 | Enter that group. Text Mode Hook is the first member. You can click |
| 16912 | on its various options, such as @code{turn-on-auto-fill}, to set the | 16911 | on its various options, such as @code{turn-on-auto-fill}, to set the |
| 16913 | values. After you click on the button to | 16912 | values. After you click on the button to |