diff options
| author | Robert J. Chassell | 2006-11-06 15:09:06 +0000 |
|---|---|---|
| committer | Robert J. Chassell | 2006-11-06 15:09:06 +0000 |
| commit | 866560603a795dbf93f7ab65d993171fd319f606 (patch) | |
| tree | d3660699b121e8289864485f8a352d129876426d | |
| parent | b03d27bdc16d871cd12e612818a5b1bfab6be13d (diff) | |
| download | emacs-866560603a795dbf93f7ab65d993171fd319f606.tar.gz emacs-866560603a795dbf93f7ab65d993171fd319f606.zip | |
Finish minor changes seen from DVI output.
Replace 22.1.100 with 22.1.1.
(current-kill): Mention functions that directly or indirectly call
`kill-new', which sets `kill-ring-yank-pointer'.
(Understanding current-kill): Change `lasted' to `last'. Remove
extraneous parenthesis. Reword item about returning `car' of list.
(yank): Remove mention of `rotate-yank-pointer'.
(Y Axis Element): Add comment regarding replacement of blank space.
(print-Y-axis Penultimate): Explain that `print-graph' will pass
`height-of-top-line' so `print-Y-axis' does not have a bug.
| -rw-r--r-- | lispintro/ChangeLog | 21 | ||||
| -rw-r--r-- | lispintro/emacs-lisp-intro.texi | 159 |
2 files changed, 98 insertions, 82 deletions
diff --git a/lispintro/ChangeLog b/lispintro/ChangeLog index 249ae0d3037..62501c7d635 100644 --- a/lispintro/ChangeLog +++ b/lispintro/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2006-11-06 Robert J. Chassell <bob@rattlesnake.com> | ||
| 2 | |||
| 3 | * emacs-lisp-intro.texi: Finish minor changes seen from DVI output. | ||
| 4 | Replace 22.1.100 with 22.1.1. | ||
| 5 | (current-kill): Mention functions that directly or indirectly call | ||
| 6 | `kill-new', which sets `kill-ring-yank-pointer'. | ||
| 7 | (Understanding current-kill): Change `lasted' to `last'. Remove | ||
| 8 | extraneous parenthesis. Reword item about returning `car' of list. | ||
| 9 | (yank): Remove mention of `rotate-yank-pointer'. | ||
| 10 | (Y Axis Element): Add comment regarding replacement of blank space. | ||
| 11 | (print-Y-axis Penultimate): Explain that `print-graph' will pass | ||
| 12 | `height-of-top-line' so `print-Y-axis' does not have a bug. | ||
| 13 | |||
| 1 | 2006-11-05 Robert J. Chassell <bob@rattlesnake.com> | 14 | 2006-11-05 Robert J. Chassell <bob@rattlesnake.com> |
| 2 | 15 | ||
| 3 | * emacs-lisp-intro.texi: Yet more minor changes: | 16 | * emacs-lisp-intro.texi: Yet more minor changes: |
| @@ -17,7 +30,7 @@ | |||
| 17 | (Miscellaneous): Add filename option, `-H', to `grep' example | 30 | (Miscellaneous): Add filename option, `-H', to `grep' example |
| 18 | (debug, debug-on-entry): Replace `GNU Emacs 22' with `a recent | 31 | (debug, debug-on-entry): Replace `GNU Emacs 22' with `a recent |
| 19 | GNU Emacs'. | 32 | GNU Emacs'. |
| 20 | (edebug): More properly state where to place point for 'M-x | 33 | (edebug): More properly state where to place point for 'M-x |
| 21 | edebug-defun'. | 34 | edebug-defun'. |
| 22 | 35 | ||
| 23 | * emacs-lisp-intro.texi: More minor changes. | 36 | * emacs-lisp-intro.texi: More minor changes. |
| @@ -115,11 +128,11 @@ | |||
| 115 | 2006-08-21 Robert J. Chassell <bob@rattlesnake.com> | 128 | 2006-08-21 Robert J. Chassell <bob@rattlesnake.com> |
| 116 | 129 | ||
| 117 | * emacs-lisp-intro.texi: deleted in directory copy of texinfo.tex | 130 | * emacs-lisp-intro.texi: deleted in directory copy of texinfo.tex |
| 118 | and pointed towards ../man/texinfo.tex so only one file | 131 | and pointed towards ../man/texinfo.tex so only one file |
| 119 | needs updating. Added comment of what to do when building on own. | 132 | needs updating. Added comment of what to do when building on own. |
| 120 | 133 | ||
| 121 | * texinfo.tex: changed to version 2006-02-13.16 | 134 | * texinfo.tex: changed to version 2006-02-13.16 |
| 122 | to enable a DVI build using the more recent versions of TeX. | 135 | to enable a DVI build using the more recent versions of TeX. |
| 123 | 136 | ||
| 124 | 2006-05-25 David Kastrup <dak@gnu.org> | 137 | 2006-05-25 David Kastrup <dak@gnu.org> |
| 125 | 138 | ||
diff --git a/lispintro/emacs-lisp-intro.texi b/lispintro/emacs-lisp-intro.texi index 1ea17f14704..13590c7288c 100644 --- a/lispintro/emacs-lisp-intro.texi +++ b/lispintro/emacs-lisp-intro.texi | |||
| @@ -24,8 +24,8 @@ | |||
| 24 | 24 | ||
| 25 | @comment %**end of header | 25 | @comment %**end of header |
| 26 | 26 | ||
| 27 | @set edition-number 3.05 | 27 | @set edition-number 3.06 |
| 28 | @set update-date 5 November 2006 | 28 | @set update-date 6 November 2006 |
| 29 | 29 | ||
| 30 | @ignore | 30 | @ignore |
| 31 | ## Summary of shell commands to create various output formats: | 31 | ## Summary of shell commands to create various output formats: |
| @@ -37,7 +37,7 @@ | |||
| 37 | # makeinfo --no-split --paragraph-indent=0 --verbose emacs-lisp-intro.texi | 37 | # makeinfo --no-split --paragraph-indent=0 --verbose emacs-lisp-intro.texi |
| 38 | makeinfo --paragraph-indent=0 --verbose emacs-lisp-intro.texi | 38 | makeinfo --paragraph-indent=0 --verbose emacs-lisp-intro.texi |
| 39 | 39 | ||
| 40 | ## ;; (progn (when (bufferp (get-buffer "*info*")) (kill-buffer "*info*")) (info "/u/intro/emacs-lisp-intro.info")) | 40 | ## ;; (progn (when (bufferp (get-buffer "*info*")) (kill-buffer "*info*")) (info "../info/eintr")) |
| 41 | 41 | ||
| 42 | ## DVI output | 42 | ## DVI output |
| 43 | texi2dvi emacs-lisp-intro.texi | 43 | texi2dvi emacs-lisp-intro.texi |
| @@ -4705,7 +4705,7 @@ screen. To switch back to your current buffer, type @kbd{C-x b | |||
| 4705 | @key{RET}}. (On some keyboards, the @key{META} key is labelled | 4705 | @key{RET}}. (On some keyboards, the @key{META} key is labelled |
| 4706 | @key{ALT}.) | 4706 | @key{ALT}.) |
| 4707 | 4707 | ||
| 4708 | @c !!! 22.1.100 tags table location in this paragraph | 4708 | @c !!! 22.1.1 tags table location in this paragraph |
| 4709 | @cindex TAGS table, specifying | 4709 | @cindex TAGS table, specifying |
| 4710 | @findex find-tags | 4710 | @findex find-tags |
| 4711 | Depending on how the initial default values of your copy of Emacs are | 4711 | Depending on how the initial default values of your copy of Emacs are |
| @@ -4715,7 +4715,7 @@ interested in Emacs sources, the tags table you will most likely want, | |||
| 4715 | if it has already been created for you, will be in a subdirectory of | 4715 | if it has already been created for you, will be in a subdirectory of |
| 4716 | the @file{/usr/local/share/emacs/} directory; thus you would use the | 4716 | the @file{/usr/local/share/emacs/} directory; thus you would use the |
| 4717 | @code{M-x visit-tags-table} command and specify a pathname such as | 4717 | @code{M-x visit-tags-table} command and specify a pathname such as |
| 4718 | @file{/usr/local/share/emacs/22.1.100/lisp/TAGS}. If the tags table | 4718 | @file{/usr/local/share/emacs/22.1.1/lisp/TAGS}. If the tags table |
| 4719 | has not already been created, you will have to create it yourself. It | 4719 | has not already been created, you will have to create it yourself. It |
| 4720 | will in a file such as @file{/usr/local/src/emacs/src/TAGS}. | 4720 | will in a file such as @file{/usr/local/src/emacs/src/TAGS}. |
| 4721 | 4721 | ||
| @@ -10095,7 +10095,6 @@ What does the @code{more-flowers} list now contain? | |||
| 10095 | @comment node-name, next, previous, up | 10095 | @comment node-name, next, previous, up |
| 10096 | @chapter Yanking Text Back | 10096 | @chapter Yanking Text Back |
| 10097 | @findex yank | 10097 | @findex yank |
| 10098 | @findex rotate-yank-pointer | ||
| 10099 | @cindex Text retrieval | 10098 | @cindex Text retrieval |
| 10100 | @cindex Retrieving text | 10099 | @cindex Retrieving text |
| 10101 | @cindex Pasting text | 10100 | @cindex Pasting text |
| @@ -10166,8 +10165,7 @@ like @code{insert}. We will stick with plain @code{insert} since it | |||
| 10166 | is easier to understand.) | 10165 | is easier to understand.) |
| 10167 | 10166 | ||
| 10168 | To begin to understand how @code{yank} and @code{yank-pop} work, it is | 10167 | To begin to understand how @code{yank} and @code{yank-pop} work, it is |
| 10169 | first necessary to look at the @code{kill-ring-yank-pointer} variable | 10168 | first necessary to look at the @code{kill-ring-yank-pointer} variable. |
| 10170 | and the @code{rotate-yank-pointer} function. | ||
| 10171 | 10169 | ||
| 10172 | @node kill-ring-yank-pointer, yank nthcdr Exercises, Kill Ring Overview, Yanking | 10170 | @node kill-ring-yank-pointer, yank nthcdr Exercises, Kill Ring Overview, Yanking |
| 10173 | @comment node-name, next, previous, up | 10171 | @comment node-name, next, previous, up |
| @@ -15278,15 +15276,15 @@ You can try this function by installing it in the usual fashion. Then | |||
| 15278 | place your cursor after the following expression and type @kbd{C-x | 15276 | place your cursor after the following expression and type @kbd{C-x |
| 15279 | C-e} (@code{eval-last-sexp}). | 15277 | C-e} (@code{eval-last-sexp}). |
| 15280 | 15278 | ||
| 15281 | @c !!! 22.1.100 lisp sources location here | 15279 | @c !!! 22.1.1 lisp sources location here |
| 15282 | @smallexample | 15280 | @smallexample |
| 15283 | (lengths-list-file | 15281 | (lengths-list-file |
| 15284 | "/usr/local/share/emacs/22.1.100/lisp/emacs-lisp/debug.el") | 15282 | "/usr/local/share/emacs/22.1.1/lisp/emacs-lisp/debug.el") |
| 15285 | @end smallexample | 15283 | @end smallexample |
| 15286 | 15284 | ||
| 15287 | @noindent | 15285 | @noindent |
| 15288 | (You may need to change the pathname of the file; the one here is for | 15286 | (You may need to change the pathname of the file; the one here is for |
| 15289 | GNU Emacs version 22.1.100. To change the expression, copy it to | 15287 | GNU Emacs version 22.1.1. To change the expression, copy it to |
| 15290 | the @file{*scratch*} buffer and edit it. | 15288 | the @file{*scratch*} buffer and edit it. |
| 15291 | 15289 | ||
| 15292 | @need 1200 | 15290 | @need 1200 |
| @@ -15414,11 +15412,11 @@ These considerations lead us directly to the function itself: | |||
| 15414 | name to the absolute, long, path name form. The function employs the | 15412 | name to the absolute, long, path name form. The function employs the |
| 15415 | name of the directory in which the function is called. | 15413 | name of the directory in which the function is called. |
| 15416 | 15414 | ||
| 15417 | @c !!! 22.1.100 lisp sources location here | 15415 | @c !!! 22.1.1 lisp sources location here |
| 15418 | @need 1500 | 15416 | @need 1500 |
| 15419 | Thus, if @code{expand-file-name} is called on @code{debug.el} when | 15417 | Thus, if @code{expand-file-name} is called on @code{debug.el} when |
| 15420 | Emacs is visiting the | 15418 | Emacs is visiting the |
| 15421 | @file{/usr/local/share/emacs/22.1.100/lisp/emacs-lisp/} directory, | 15419 | @file{/usr/local/share/emacs/22.1.1/lisp/emacs-lisp/} directory, |
| 15422 | 15420 | ||
| 15423 | @smallexample | 15421 | @smallexample |
| 15424 | debug.el | 15422 | debug.el |
| @@ -15428,9 +15426,9 @@ debug.el | |||
| 15428 | @noindent | 15426 | @noindent |
| 15429 | becomes | 15427 | becomes |
| 15430 | 15428 | ||
| 15431 | @c !!! 22.1.100 lisp sources location here | 15429 | @c !!! 22.1.1 lisp sources location here |
| 15432 | @smallexample | 15430 | @smallexample |
| 15433 | /usr/local/share/emacs/22.1.100/lisp/emacs-lisp/debug.el | 15431 | /usr/local/share/emacs/22.1.1/lisp/emacs-lisp/debug.el |
| 15434 | @end smallexample | 15432 | @end smallexample |
| 15435 | 15433 | ||
| 15436 | The only other new element of this function definition is the as yet | 15434 | The only other new element of this function definition is the as yet |
| @@ -15519,13 +15517,13 @@ in their customary places. To change the expressions, copy them to | |||
| 15519 | the @file{*scratch*} buffer, edit them, and then evaluate them. | 15517 | the @file{*scratch*} buffer, edit them, and then evaluate them. |
| 15520 | 15518 | ||
| 15521 | The results are shown after the @samp{@result{}}. (These results are | 15519 | The results are shown after the @samp{@result{}}. (These results are |
| 15522 | for files from Emacs Version 22.1.100; files from other versions of | 15520 | for files from Emacs Version 22.1.1; files from other versions of |
| 15523 | Emacs may produce different results.) | 15521 | Emacs may produce different results.) |
| 15524 | 15522 | ||
| 15525 | @c !!! 22.1.100 lisp sources location here | 15523 | @c !!! 22.1.1 lisp sources location here |
| 15526 | @smallexample | 15524 | @smallexample |
| 15527 | @group | 15525 | @group |
| 15528 | (cd "/usr/local/share/emacs/22.1.100/") | 15526 | (cd "/usr/local/share/emacs/22.1.1/") |
| 15529 | 15527 | ||
| 15530 | (lengths-list-file "./lisp/macros.el") | 15528 | (lengths-list-file "./lisp/macros.el") |
| 15531 | @result{} (283 263 480 90) | 15529 | @result{} (283 263 480 90) |
| @@ -15724,7 +15722,7 @@ for symbolic link (the string is the name linked to), or @code{nil}. | |||
| 15724 | 15722 | ||
| 15725 | For example, the first @samp{.el} file in the @file{lisp/} directory | 15723 | For example, the first @samp{.el} file in the @file{lisp/} directory |
| 15726 | is @file{abbrev.el}. Its name is | 15724 | is @file{abbrev.el}. Its name is |
| 15727 | @file{/usr/local/share/emacs/22.1.100/lisp/abbrev.el} and it is not a | 15725 | @file{/usr/local/share/emacs/22.1.1/lisp/abbrev.el} and it is not a |
| 15728 | directory or a symbolic link. | 15726 | directory or a symbolic link. |
| 15729 | 15727 | ||
| 15730 | @need 1000 | 15728 | @need 1000 |
| @@ -15824,11 +15822,11 @@ using @code{append} as the combiner. | |||
| 15824 | (directory-files "/usr/local/src/emacs/lisp/" t "\\.el$") | 15822 | (directory-files "/usr/local/src/emacs/lisp/" t "\\.el$") |
| 15825 | (shell-command "find /usr/local/src/emacs/lisp/ -name '*.el'") | 15823 | (shell-command "find /usr/local/src/emacs/lisp/ -name '*.el'") |
| 15826 | 15824 | ||
| 15827 | (directory-files "/usr/local/share/emacs/22.1.100/lisp/" t "\\.el$") | 15825 | (directory-files "/usr/local/share/emacs/22.1.1/lisp/" t "\\.el$") |
| 15828 | (shell-command "find /usr/local/share/emacs/22.1.100/lisp/ -name '*.el'") | 15826 | (shell-command "find /usr/local/share/emacs/22.1.1/lisp/ -name '*.el'") |
| 15829 | @end ignore | 15827 | @end ignore |
| 15830 | 15828 | ||
| 15831 | @c /usr/local/share/emacs/22.1.100/lisp/ | 15829 | @c /usr/local/share/emacs/22.1.1/lisp/ |
| 15832 | 15830 | ||
| 15833 | @need 800 | 15831 | @need 800 |
| 15834 | Here is the function: | 15832 | Here is the function: |
| @@ -15840,7 +15838,7 @@ Here is the function: | |||
| 15840 | ;; Although the function will be used non-interactively, | 15838 | ;; Although the function will be used non-interactively, |
| 15841 | ;; it will be easier to test if we make it interactive. | 15839 | ;; it will be easier to test if we make it interactive. |
| 15842 | ;; The directory will have a name such as | 15840 | ;; The directory will have a name such as |
| 15843 | ;; "/usr/local/share/emacs/22.1.100/lisp/" | 15841 | ;; "/usr/local/share/emacs/22.1.1/lisp/" |
| 15844 | (interactive "DDirectory name: ") | 15842 | (interactive "DDirectory name: ") |
| 15845 | @end group | 15843 | @end group |
| 15846 | @group | 15844 | @group |
| @@ -15885,7 +15883,7 @@ Here is the function: | |||
| 15885 | @end smallexample | 15883 | @end smallexample |
| 15886 | 15884 | ||
| 15887 | @c (files-in-below-directory "/usr/local/src/emacs/lisp/") | 15885 | @c (files-in-below-directory "/usr/local/src/emacs/lisp/") |
| 15888 | @c (files-in-below-directory "/usr/local/share/emacs/22.1.100/lisp/") | 15886 | @c (files-in-below-directory "/usr/local/share/emacs/22.1.1/lisp/") |
| 15889 | 15887 | ||
| 15890 | The @code{files-in-below-directory} @code{directory-files} function | 15888 | The @code{files-in-below-directory} @code{directory-files} function |
| 15891 | takes one argument, the name of a directory. | 15889 | takes one argument, the name of a directory. |
| @@ -15895,11 +15893,11 @@ Thus, on my system, | |||
| 15895 | 15893 | ||
| 15896 | @c (length (files-in-below-directory "/usr/local/src/emacs/lisp/")) | 15894 | @c (length (files-in-below-directory "/usr/local/src/emacs/lisp/")) |
| 15897 | 15895 | ||
| 15898 | @c !!! 22.1.100 lisp sources location here | 15896 | @c !!! 22.1.1 lisp sources location here |
| 15899 | @smallexample | 15897 | @smallexample |
| 15900 | @group | 15898 | @group |
| 15901 | (length | 15899 | (length |
| 15902 | (files-in-below-directory "/usr/local/share/emacs/22.1.100/lisp/")) | 15900 | (files-in-below-directory "/usr/local/share/emacs/22.1.1/lisp/")) |
| 15903 | @end group | 15901 | @end group |
| 15904 | @end smallexample | 15902 | @end smallexample |
| 15905 | 15903 | ||
| @@ -15914,7 +15912,7 @@ like this: | |||
| 15914 | @smallexample | 15912 | @smallexample |
| 15915 | @group | 15913 | @group |
| 15916 | (sort | 15914 | (sort |
| 15917 | (files-in-below-directory "/usr/local/share/emacs/22.1.100/lisp/") | 15915 | (files-in-below-directory "/usr/local/share/emacs/22.1.1/lisp/") |
| 15918 | 'string-lessp) | 15916 | 'string-lessp) |
| 15919 | @end group | 15917 | @end group |
| 15920 | @end smallexample | 15918 | @end smallexample |
| @@ -19116,18 +19114,10 @@ it with @kbd{M-w}. | |||
| 19116 | (In a read-only buffer, such as the @file{*info*} buffer, the kill | 19114 | (In a read-only buffer, such as the @file{*info*} buffer, the kill |
| 19117 | command, @kbd{C-k} (@code{kill-line}), will not remove the text, | 19115 | command, @kbd{C-k} (@code{kill-line}), will not remove the text, |
| 19118 | merely copy it to the kill ring. However, your machine may beep at | 19116 | merely copy it to the kill ring. However, your machine may beep at |
| 19119 | you. (@code{kill-line} calls @code{kill-region}.) Alternatively, for | 19117 | you. Alternatively, for silence, you may copy the region of each line |
| 19120 | silence, you may copy the region of each line with the @kbd{M-w} | 19118 | with the @kbd{M-w} (@code{kill-ring-save}) command. You must mark |
| 19121 | (@code{kill-ring-save}) command. You must mark each line for this | 19119 | each line for this command to succeed, but it does not matter at which |
| 19122 | command to succeed, but it does not matter at which end you put point | 19120 | end you put point or mark.) |
| 19123 | or mark.) | ||
| 19124 | |||
| 19125 | @ignore | ||
| 19126 | @c texi2dvi fails when the name of the section is within ifnottex ... | ||
| 19127 | For a discussion of how @code{condition-case} deals with error, see | ||
| 19128 | @ref{Complete kill-region, , The Complete @code{kill-region} | ||
| 19129 | Definition}. | ||
| 19130 | @end ignore | ||
| 19131 | 19121 | ||
| 19132 | @need 1250 | 19122 | @need 1250 |
| 19133 | @noindent | 19123 | @noindent |
| @@ -19188,7 +19178,10 @@ To return to the old value for the length of the kill ring, evaluate: | |||
| 19188 | The @code{current-kill} function changes the element in the kill ring | 19178 | The @code{current-kill} function changes the element in the kill ring |
| 19189 | to which @code{kill-ring-yank-pointer} points. (Also, the | 19179 | to which @code{kill-ring-yank-pointer} points. (Also, the |
| 19190 | @code{kill-new} function sets @code{kill-ring-yank-pointer} to point | 19180 | @code{kill-new} function sets @code{kill-ring-yank-pointer} to point |
| 19191 | to the latest element of the the kill ring.) | 19181 | to the latest element of the the kill ring. The @code{kill-new} |
| 19182 | function is used directly or indirectly by @code{kill-append}, | ||
| 19183 | @code{copy-region-as-kill}, @code{kill-ring-save}, @code{kill-line}, | ||
| 19184 | and @code{kill-region}.) | ||
| 19192 | 19185 | ||
| 19193 | @need 1500 | 19186 | @need 1500 |
| 19194 | The @code{current-kill} function is used by @code{yank} and by | 19187 | The @code{current-kill} function is used by @code{yank} and by |
| @@ -19231,11 +19224,11 @@ yanking point; just return the Nth kill forward." | |||
| 19231 | @end group | 19224 | @end group |
| 19232 | @end smallexample | 19225 | @end smallexample |
| 19233 | 19226 | ||
| 19234 | In addition, the @code{kill-new} function sets | 19227 | Remember also that the @code{kill-new} function sets |
| 19235 | @code{kill-ring-yank-pointer} to the latest element of the the kill | 19228 | @code{kill-ring-yank-pointer} to the latest element of the the kill |
| 19236 | ring. And indirectly so does @code{kill-append}, since it calls | 19229 | ring, which means that all the functions that call it set the value |
| 19237 | @code{kill-new}. In addition, @code{kill-region} and @code{kill-line} | 19230 | indirectly: @code{kill-append}, @code{copy-region-as-kill}, |
| 19238 | call the @code{kill-new} function. | 19231 | @code{kill-ring-save}, @code{kill-line}, and @code{kill-region}. |
| 19239 | 19232 | ||
| 19240 | @need 1500 | 19233 | @need 1500 |
| 19241 | Here is the line in @code{kill-new}, which is explained in | 19234 | Here is the line in @code{kill-new}, which is explained in |
| @@ -19278,7 +19271,7 @@ within the bounds of this function. This variable is called | |||
| 19278 | @code{interprogram-paste} and is for copying to another program. It | 19271 | @code{interprogram-paste} and is for copying to another program. It |
| 19279 | is not for copying within this instance of GNU Emacs. Most window | 19272 | is not for copying within this instance of GNU Emacs. Most window |
| 19280 | systems provide a facility for interprogram pasting. Sadly, that | 19273 | systems provide a facility for interprogram pasting. Sadly, that |
| 19281 | facility usually provides only for the lasted element. Most windowing | 19274 | facility usually provides only for the last element. Most windowing |
| 19282 | systems have not adopted a ring of many possibilities, even though | 19275 | systems have not adopted a ring of many possibilities, even though |
| 19283 | Emacs has provided it for decades. | 19276 | Emacs has provided it for decades. |
| 19284 | 19277 | ||
| @@ -19288,7 +19281,7 @@ The @code{if} expression has two parts, one if there exists | |||
| 19288 | @need 2000 | 19281 | @need 2000 |
| 19289 | Let us consider the `if not' or else-part of the @code{current-kill} | 19282 | Let us consider the `if not' or else-part of the @code{current-kill} |
| 19290 | function. (The then-part uses the the @code{kill-new} function, which | 19283 | function. (The then-part uses the the @code{kill-new} function, which |
| 19291 | we have already described. (@xref{kill-new function, , The | 19284 | we have already described. @xref{kill-new function, , The |
| 19292 | @code{kill-new} function}.) | 19285 | @code{kill-new} function}.) |
| 19293 | 19286 | ||
| 19294 | @smallexample | 19287 | @smallexample |
| @@ -19309,7 +19302,8 @@ The code first checks whether the kill ring has content; otherwise it | |||
| 19309 | signals an error. | 19302 | signals an error. |
| 19310 | 19303 | ||
| 19311 | @need 1000 | 19304 | @need 1000 |
| 19312 | Note that the @code{or} expression is very similar to writing | 19305 | Note that the @code{or} expression is very similar to testing length |
| 19306 | with an @code{if}: | ||
| 19313 | 19307 | ||
| 19314 | @findex zerop | 19308 | @findex zerop |
| 19315 | @findex error | 19309 | @findex error |
| @@ -19332,7 +19326,7 @@ true if the value it is testing is zero. When @code{zerop} tests | |||
| 19332 | true, the then-part of the @code{if} is evaluated. The then-part is a | 19326 | true, the then-part of the @code{if} is evaluated. The then-part is a |
| 19333 | list starting with the function @code{error}, which is a function that | 19327 | list starting with the function @code{error}, which is a function that |
| 19334 | is similar to the @code{message} function | 19328 | is similar to the @code{message} function |
| 19335 | (@pxref{message, , The @code{message} Function}), in that | 19329 | (@pxref{message, , The @code{message} Function}) in that |
| 19336 | it prints a one-line message in the echo area. However, in addition | 19330 | it prints a one-line message in the echo area. However, in addition |
| 19337 | to printing a message, @code{error} also stops evaluation of the | 19331 | to printing a message, @code{error} also stops evaluation of the |
| 19338 | function within which it is embedded. This means that the rest of the | 19332 | function within which it is embedded. This means that the rest of the |
| @@ -19344,8 +19338,8 @@ rotates and on where @code{kill-ring-yank-pointer} points. | |||
| 19344 | 19338 | ||
| 19345 | Next, either the optional @code{do-not-move} argument is true or the | 19339 | Next, either the optional @code{do-not-move} argument is true or the |
| 19346 | current value of @code{kill-ring-yank-pointer} is set to point to the | 19340 | current value of @code{kill-ring-yank-pointer} is set to point to the |
| 19347 | list, the first element of which is returned even if the | 19341 | list. Finally, another expression returns the first element of the |
| 19348 | @code{do-not-move} argument is true. | 19342 | list even if the @code{do-not-move} argument is true. |
| 19349 | 19343 | ||
| 19350 | @menu | 19344 | @menu |
| 19351 | * Digression concerning error:: | 19345 | * Digression concerning error:: |
| @@ -19472,7 +19466,8 @@ following: | |||
| 19472 | @smallexample | 19466 | @smallexample |
| 19473 | @group | 19467 | @group |
| 19474 | ;; kill-ring-yank-pointer @r{and} kill-ring @r{have a length of four} | 19468 | ;; kill-ring-yank-pointer @r{and} kill-ring @r{have a length of four} |
| 19475 | (nthcdr (mod (- 0 4) 4) ; (mod -4 4) @result{} 0 | 19469 | ;; @r{and} (mod (- 0 4) 4) @result{} 0 |
| 19470 | (nthcdr (mod (- 0 4) 4) | ||
| 19476 | '("fourth line of text" | 19471 | '("fourth line of text" |
| 19477 | "third line" | 19472 | "third line" |
| 19478 | "second piece of text" | 19473 | "second piece of text" |
| @@ -19517,8 +19512,12 @@ them in an argument list (and within expressions called by them). | |||
| 19517 | @findex yank | 19512 | @findex yank |
| 19518 | 19513 | ||
| 19519 | After learning about @code{current-kill}, the code for the | 19514 | After learning about @code{current-kill}, the code for the |
| 19520 | @code{yank} function is almost easy. It has only one tricky part, which is | 19515 | @code{yank} function is almost easy. |
| 19521 | the computation of the argument to be passed to @code{rotate-yank-pointer}. | 19516 | |
| 19517 | The @code{yank} function does not use the | ||
| 19518 | @code{kill-ring-yank-pointer} variable directly. It calls | ||
| 19519 | @code{insert-for-yank} which calls @code{current-kill} which sets the | ||
| 19520 | @code{kill-ring-yank-pointer} variable. | ||
| 19522 | 19521 | ||
| 19523 | @need 1250 | 19522 | @need 1250 |
| 19524 | The code looks like this: | 19523 | The code looks like this: |
| @@ -19573,21 +19572,23 @@ The key expression is @code{insert-for-yank}, which inserts the string | |||
| 19573 | returned by @code{current-kill}, but removes some text properties from | 19572 | returned by @code{current-kill}, but removes some text properties from |
| 19574 | it. | 19573 | it. |
| 19575 | 19574 | ||
| 19576 | However, before getting to that expression, the function set the value | 19575 | However, before getting to that expression, the function sets the value |
| 19577 | of @code{yank-window-start} to the position returned by the | 19576 | of @code{yank-window-start} to the position returned by the |
| 19578 | @code{(window-start)} expression, the position at which the display | 19577 | @code{(window-start)} expression, the position at which the display |
| 19579 | currently starts. It also set @code{this-command} and pushed the | 19578 | currently starts. The @code{yank} function also sets |
| 19580 | mark. | 19579 | @code{this-command} and pushes the mark. |
| 19581 | 19580 | ||
| 19582 | After it yanks the appropriate element, if the optional argument is a | 19581 | After it yanks the appropriate element, if the optional argument is a |
| 19583 | @sc{cons} rather than a number or nothing, put point at beginning of | 19582 | @sc{cons} rather than a number or nothing, it puts point at beginning |
| 19584 | the yanked text and mark at its end. (The @code{prog1} function is | 19583 | of the yanked text and mark at its end. |
| 19585 | like @code{progn} but returns the value of its first argument rather | 19584 | |
| 19586 | than the value of its last argument. Its first argument is forced to | 19585 | (The @code{prog1} function is like @code{progn} but returns the value |
| 19587 | return the buffer's mark as an integer. You can see the documentation | 19586 | of its first argument rather than the value of its last argument. Its |
| 19588 | for these functions by placing point over them in this buffer and then | 19587 | first argument is forced to return the buffer's mark as an integer. |
| 19589 | typing @kbd{C-h f} (@code{describe-function}) followed by a @kbd{RET}; | 19588 | You can see the documentation for these functions by placing point |
| 19590 | the default is the function.) | 19589 | over them in this buffer and then typing @kbd{C-h f} |
| 19590 | (@code{describe-function}) followed by a @kbd{RET}; the default is the | ||
| 19591 | function.) | ||
| 19591 | 19592 | ||
| 19592 | The last part of the function tells what to do when it succeeds. | 19593 | The last part of the function tells what to do when it succeeds. |
| 19593 | 19594 | ||
| @@ -19597,8 +19598,8 @@ The last part of the function tells what to do when it succeeds. | |||
| 19597 | @findex yank-pop | 19598 | @findex yank-pop |
| 19598 | 19599 | ||
| 19599 | After understanding @code{yank} and @code{current-kill}, you know how | 19600 | After understanding @code{yank} and @code{current-kill}, you know how |
| 19600 | to approach the @code{yank-pop} function Leaving out the documentation | 19601 | to approach the @code{yank-pop} function. Leaving out the |
| 19601 | to save space, it looks like this: | 19602 | documentation to save space, it looks like this: |
| 19602 | 19603 | ||
| 19603 | @c GNU Emacs 22 | 19604 | @c GNU Emacs 22 |
| 19604 | @smallexample | 19605 | @smallexample |
| @@ -19645,8 +19646,9 @@ to save space, it looks like this: | |||
| 19645 | The function is interactive with a small @samp{p} so the prefix | 19646 | The function is interactive with a small @samp{p} so the prefix |
| 19646 | argument is processed and passed to the function. The command can | 19647 | argument is processed and passed to the function. The command can |
| 19647 | only be used after a previous yank; otherwise an error message is | 19648 | only be used after a previous yank; otherwise an error message is |
| 19648 | sent. This check uses the variable @code{last-command} which is | 19649 | sent. This check uses the variable @code{last-command} which is set |
| 19649 | set by @code{yank} and is discussed elsewhere. (@xref{copy-region-as-kill}.) | 19650 | by @code{yank} and is discussed elsewhere. |
| 19651 | (@xref{copy-region-as-kill}.) | ||
| 19650 | 19652 | ||
| 19651 | The @code{let} clause sets the variable @code{before} to true or false | 19653 | The @code{let} clause sets the variable @code{before} to true or false |
| 19652 | depending whether point is before or after mark and then the region | 19654 | depending whether point is before or after mark and then the region |
| @@ -20138,7 +20140,8 @@ will be and the second is a symbol for the character to insert, in a | |||
| 20138 | special format. The format is a question mark followed by a blank | 20140 | special format. The format is a question mark followed by a blank |
| 20139 | space, like this, @samp{? }. @xref{Character Type, , Character Type, | 20141 | space, like this, @samp{? }. @xref{Character Type, , Character Type, |
| 20140 | elisp, The GNU Emacs Lisp Reference Manual}, for a description of the | 20142 | elisp, The GNU Emacs Lisp Reference Manual}, for a description of the |
| 20141 | syntax for characters. | 20143 | syntax for characters. (Of course, you might want to replace the |
| 20144 | blank space by some other character @dots{} You know what to do.) | ||
| 20142 | 20145 | ||
| 20143 | The @code{number-to-string} function is used in the concatenation | 20146 | The @code{number-to-string} function is used in the concatenation |
| 20144 | expression, to convert the number to a string that is concatenated | 20147 | expression, to convert the number to a string that is concatenated |
| @@ -20261,10 +20264,10 @@ with @kbd{C-y} (@code{yank)}. | |||
| 20261 | Press @key{RET} to evaluate the expression. | 20264 | Press @key{RET} to evaluate the expression. |
| 20262 | @end enumerate | 20265 | @end enumerate |
| 20263 | 20266 | ||
| 20264 | Emacs will print labels vertically, the top one being | 20267 | Emacs will print labels vertically, the top one being @w{@samp{10 -@w{ |
| 20265 | @w{@samp{10 -@w{ }}}. (The @code{print-graph} function | 20268 | }}}. (The @code{print-graph} function will pass the value of |
| 20266 | will pass the value of @code{height-of-top-line}, which | 20269 | @code{height-of-top-line}, which in this case will end up as 15, |
| 20267 | in this case would end up as 15.) | 20270 | thereby getting rid of what might appear as a bug.) |
| 20268 | 20271 | ||
| 20269 | @need 2000 | 20272 | @need 2000 |
| 20270 | @node print-X-axis, Print Whole Graph, print-Y-axis, Full Graph | 20273 | @node print-X-axis, Print Whole Graph, print-Y-axis, Full Graph |
| @@ -20347,11 +20350,11 @@ the tic marks themselves and their spacing: | |||
| 20347 | @noindent | 20350 | @noindent |
| 20348 | (Note that the value of @code{graph-blank} is set by another | 20351 | (Note that the value of @code{graph-blank} is set by another |
| 20349 | @code{defvar}. The @code{boundp} predicate checks whether it has | 20352 | @code{defvar}. The @code{boundp} predicate checks whether it has |
| 20350 | already been set; @code{boundp} returns @code{nil} if it has not. | 20353 | already been set; @code{boundp} returns @code{nil} if it has not. If |
| 20351 | If @code{graph-blank} were unbound and we did not use this conditional | 20354 | @code{graph-blank} were unbound and we did not use this conditional |
| 20352 | construction, in GNU Emacs 21, we would enter the debugger and see an | 20355 | construction, in a recent GNU Emacs, we would enter the debugger and |
| 20353 | error message saying | 20356 | see an error message saying @samp{@w{Debugger entered--Lisp error:} |
| 20354 | @samp{@w{Debugger entered--Lisp error:} @w{(void-variable graph-blank)}}.) | 20357 | @w{(void-variable graph-blank)}}.) |
| 20355 | 20358 | ||
| 20356 | @need 1200 | 20359 | @need 1200 |
| 20357 | Here is the @code{defvar} for @code{X-axis-tic-symbol}: | 20360 | Here is the @code{defvar} for @code{X-axis-tic-symbol}: |