diff options
| author | Robert J. Chassell | 2006-10-31 16:41:49 +0000 |
|---|---|---|
| committer | Robert J. Chassell | 2006-10-31 16:41:49 +0000 |
| commit | 61879b3a05a78edf98700cedc88e108afd3d3975 (patch) | |
| tree | eee652d797f21e539e036bc43fe33ad455b26bbd | |
| parent | 411b80a566ce95fe19f40d296de1c89549bd4c7a (diff) | |
| download | emacs-61879b3a05a78edf98700cedc88e108afd3d3975.tar.gz emacs-61879b3a05a78edf98700cedc88e108afd3d3975.zip | |
Removed INSTALL MANIFEST since those files are now irrelevant.
| -rw-r--r-- | lispintro/INSTALL | 56 | ||||
| -rw-r--r-- | lispintro/MANIFEST | 30 | ||||
| -rw-r--r-- | lispintro/README | 13 | ||||
| -rw-r--r-- | lispintro/emacs-lisp-intro.texi | 337 |
4 files changed, 64 insertions, 372 deletions
diff --git a/lispintro/INSTALL b/lispintro/INSTALL deleted file mode 100644 index 6a53152b1e3..00000000000 --- a/lispintro/INSTALL +++ /dev/null | |||
| @@ -1,56 +0,0 @@ | |||
| 1 | Basic Installation for An Introduction to Programming in Emacs Lisp version 2 | ||
| 2 | ================== | ||
| 3 | |||
| 4 | # To see the table of contents of the emacs-lisp-intro-2.00.tar.gz | ||
| 5 | # file, execute the following at your shell prompt: | ||
| 6 | |||
| 7 | tar -tzvf emacs-lisp-intro-2.00.tar.gz | ||
| 8 | |||
| 9 | # To uncompress and untar the file, execute the following: | ||
| 10 | |||
| 11 | tar -xzvf emacs-lisp-intro-2.00.tar.gz | ||
| 12 | |||
| 13 | # The file will untar into a subdirectory called emacs-lisp-intro-2.00 | ||
| 14 | # That directory will contain the Texinfo source for the book, the | ||
| 15 | # Info files and various other files. | ||
| 16 | |||
| 17 | cd emacs-lisp-intro-2.00 | ||
| 18 | |||
| 19 | # To create a DVI file that can be printed directly or converted | ||
| 20 | # to PostScript or PDF and then printed, execute the following: | ||
| 21 | |||
| 22 | ./configure | ||
| 23 | make dvi | ||
| 24 | |||
| 25 | # To create an HTML file, execute the following | ||
| 26 | # (presumably you have already executed the `./configure' command | ||
| 27 | # before running `make dvi'; if not execute `./configure' now); | ||
| 28 | # this will place HTML files into a emacs-lisp-intro/ subdirectory: | ||
| 29 | |||
| 30 | makeinfo --html --verbose emacs-lisp-intro.texi | ||
| 31 | |||
| 32 | # To create a single, large HTML file in the current directory, | ||
| 33 | # use the --no-split option, like this: | ||
| 34 | |||
| 35 | makeinfo --html --no-split --verbose emacs-lisp-intro.texi | ||
| 36 | |||
| 37 | # At the time of writing, `makeinfo' version 4.0b creates HTML | ||
| 38 | # files with %20 in addresses instead of a space. Some | ||
| 39 | # browsers have difficulty following such references. In | ||
| 40 | # GNU Emacs, you can replace the occurrences of %20 with a | ||
| 41 | # command such as | ||
| 42 | # (replace-string "%20" " ") | ||
| 43 | |||
| 44 | # To create a single, large Info file in the current directory | ||
| 45 | # instead of the usual 16 smaller Info files, and also, to avoid | ||
| 46 | # indenting paragraphs, execute: | ||
| 47 | |||
| 48 | makeinfo --no-split --paragraph-indent=0 --verbose emacs-lisp-intro.texi | ||
| 49 | |||
| 50 | # To create a single, large Plain text file in the current | ||
| 51 | # directory, execute: | ||
| 52 | |||
| 53 | makeinfo --fill-column=70 --no-split --paragraph-indent=0 \ | ||
| 54 | --verbose --no-headers --output=emacs-lisp-intro.txt emacs-lisp-intro.texi | ||
| 55 | |||
| 56 | ### | ||
diff --git a/lispintro/MANIFEST b/lispintro/MANIFEST deleted file mode 100644 index 6a54a9a101c..00000000000 --- a/lispintro/MANIFEST +++ /dev/null | |||
| @@ -1,30 +0,0 @@ | |||
| 1 | `emacs-lisp-intro-2.00.tar' contains: | ||
| 2 | |||
| 3 | size filename | ||
| 4 | |||
| 5 | 2102 INSTALL | ||
| 6 | 1482 MANIFEST | ||
| 7 | 10295 Makefile | ||
| 8 | 358 Makefile.am | ||
| 9 | 10215 Makefile.in | ||
| 10 | 5642 README | ||
| 11 | 3542 aclocal.m4 | ||
| 12 | 7129 drawers.eps | ||
| 13 | 36057 configure | ||
| 14 | 142 configure.in | ||
| 15 | 12136 cons-1.eps | ||
| 16 | 12523 cons-2.eps | ||
| 17 | 12420 cons-2a.eps | ||
| 18 | 12984 cons-3.eps | ||
| 19 | 13866 cons-4.eps | ||
| 20 | 12986 cons-5.eps | ||
| 21 | 772149 emacs-lisp-intro.texi | ||
| 22 | 5584 install-sh | ||
| 23 | 10252 lambda-1.eps | ||
| 24 | 10278 lambda-2.eps | ||
| 25 | 10275 lambda-3.eps | ||
| 26 | 4650 missing | ||
| 27 | 732 mkinstalldirs | ||
| 28 | 207383 texinfo.tex | ||
| 29 | |||
| 30 | ### | ||
diff --git a/lispintro/README b/lispintro/README index e322fc86c7f..76cf71af156 100644 --- a/lispintro/README +++ b/lispintro/README | |||
| @@ -1,16 +1,17 @@ | |||
| 1 | This directory contains the source of the "Introduction to programming | 1 | This directory contains the source of the "Introduction to Programming |
| 2 | in Emacs Lisp" written by Robert J. Chassell, bob@gnu.org. This | 2 | in Emacs Lisp" written by Robert J. Chassell, bob@gnu.org. This |
| 3 | manual is an elementary introduction to programming in Emacs Lisp for | 3 | manual is an elementary introduction to programming in Emacs Lisp for |
| 4 | people who are not programmers, and who are not necessarily interested | 4 | people who are not programmers, and who are not necessarily interested |
| 5 | in programming, but who do want to customize or extend their computing | 5 | in programming, but who do want to customize or extend their computing |
| 6 | environment. | 6 | environment. |
| 7 | 7 | ||
| 8 | This second edition of 2001 Nov 20 updates the previous editions to | 8 | This third edition of 2006 Oct 31 updates the previous editions to GNU |
| 9 | GNU Emacs 21. | 9 | Emacs 22. |
| 10 | 10 | ||
| 11 | The Texinfo source file `emacs-lisp-intro.texi', formats without | 11 | The Texinfo source file `emacs-lisp-intro.texi', formats without |
| 12 | error using TeX version 3.14159, `kpathsea' version 3.3.1, | 12 | reported error using `pdfeTeXk', Version 3.141592-1.21a-2.2 (Web2C |
| 13 | `texinfo.tex' version 2001-05-24.08, and `makeinfo' version 4.0b. | 13 | 7.5.4) and texinfo.tex version 2006-08-26.17 started by `texi2dvi' |
| 14 | version 4.8, and with `makeinfo' version 4.8. | ||
| 14 | 15 | ||
| 15 | Also, this tar file contains the following optional Encapsulated Post | 16 | Also, this tar file contains the following optional Encapsulated Post |
| 16 | Script figures. | 17 | Script figures. |
| @@ -56,5 +57,5 @@ This will prevent TeX from attempting to load the last few .eps files. | |||
| 56 | You will find additional instructions on formatting in the beginning | 57 | You will find additional instructions on formatting in the beginning |
| 57 | of the Texinfo file 'emacs-lisp-intro.texi'. Best Wishes! | 58 | of the Texinfo file 'emacs-lisp-intro.texi'. Best Wishes! |
| 58 | 59 | ||
| 59 | 2001 Nov 20 | 60 | 2006 Oct 31 |
| 60 | Robert J. Chassell, bob@gnu.org | 61 | Robert J. Chassell, bob@gnu.org |
diff --git a/lispintro/emacs-lisp-intro.texi b/lispintro/emacs-lisp-intro.texi index 0318b2b2c79..6d1f9bf88fe 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 2.15 | 27 | @set edition-number 3.00 |
| 28 | @set update-date 2006 Oct 30 | 28 | @set update-date 2006 Oct 31 |
| 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: |
| @@ -34,15 +34,16 @@ | |||
| 34 | ## pushd /u/intro/ | 34 | ## pushd /u/intro/ |
| 35 | 35 | ||
| 36 | ## Info output | 36 | ## Info output |
| 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 | 39 | ||
| 39 | ## ;; (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 "/u/intro/emacs-lisp-intro.info")) |
| 40 | 41 | ||
| 41 | ## DVI output | 42 | ## DVI output |
| 42 | texi2dvi /u/intro/emacs-lisp-intro.texi | 43 | texi2dvi emacs-lisp-intro.texi |
| 43 | 44 | ||
| 44 | ## View DVI output; see below also | 45 | ## View DVI output; see below also |
| 45 | # xdvi -margins 24pt -topmargin 4pt -offsets 24pt -geometry 760x1140 -s 5 -useTeXpages -mousemode 1 /u/intro/emacs-lisp-intro.dvi & | 46 | # xdvi -margins 24pt -topmargin 4pt -offsets 24pt -geometry 760x1140 -s 5 -useTeXpages -mousemode 1 emacs-lisp-intro.dvi & |
| 46 | 47 | ||
| 47 | ## HTML output | 48 | ## HTML output |
| 48 | makeinfo --html --no-split --verbose emacs-lisp-intro.texi | 49 | makeinfo --html --no-split --verbose emacs-lisp-intro.texi |
| @@ -72,12 +73,7 @@ | |||
| 72 | ## View Info output with standalone reader | 73 | ## View Info output with standalone reader |
| 73 | info emacs-lisp-intro.info | 74 | info emacs-lisp-intro.info |
| 74 | 75 | ||
| 75 | ## popd | 76 | ## popd |
| 76 | |||
| 77 | Need to explain defcustom see (elisp)Customization (elisp)Variable Definitions | ||
| 78 | defsubst | ||
| 79 | defconst | ||
| 80 | |||
| 81 | 77 | ||
| 82 | 78 | ||
| 83 | # as user `root' | 79 | # as user `root' |
| @@ -97,7 +93,6 @@ Need to explain defcustom see (elisp)Customization (elisp)Variable Definitions | |||
| 97 | @c Your site may require editing changes to print PostScript; in this | 93 | @c Your site may require editing changes to print PostScript; in this |
| 98 | @c case, search for `print-postscript-figures' and make appropriate changes. | 94 | @c case, search for `print-postscript-figures' and make appropriate changes. |
| 99 | 95 | ||
| 100 | |||
| 101 | @c ================ How to Create an Info file ================ | 96 | @c ================ How to Create an Info file ================ |
| 102 | 97 | ||
| 103 | @c If you have `makeinfo' installed, run the following command | 98 | @c If you have `makeinfo' installed, run the following command |
| @@ -265,7 +260,7 @@ Free Software Foundation raise funds for GNU development.'' | |||
| 265 | @sp 2 | 260 | @sp 2 |
| 266 | @center @titlefont{Programming in Emacs Lisp} | 261 | @center @titlefont{Programming in Emacs Lisp} |
| 267 | @sp 2 | 262 | @sp 2 |
| 268 | @center Revised Second Edition | 263 | @center Revised Third Edition |
| 269 | @sp 4 | 264 | @sp 4 |
| 270 | @center by Robert J. Chassell | 265 | @center by Robert J. Chassell |
| 271 | 266 | ||
| @@ -372,7 +367,7 @@ Lisp Lists | |||
| 372 | 367 | ||
| 373 | * Numbers Lists:: List have numbers, other lists, in them. | 368 | * Numbers Lists:: List have numbers, other lists, in them. |
| 374 | * Lisp Atoms:: Elemental entities. | 369 | * Lisp Atoms:: Elemental entities. |
| 375 | * Whitespace in Lists:: Formating lists to be readable. | 370 | * Whitespace in Lists:: Formatting lists to be readable. |
| 376 | * Typing Lists:: How GNU Emacs helps you type lists. | 371 | * Typing Lists:: How GNU Emacs helps you type lists. |
| 377 | 372 | ||
| 378 | The Lisp Interpreter | 373 | The Lisp Interpreter |
| @@ -1747,7 +1742,7 @@ Another way to think about this is to imagine a symbol as being a chest | |||
| 1747 | of drawers. The function definition is put in one drawer, the value in | 1742 | of drawers. The function definition is put in one drawer, the value in |
| 1748 | another, and so on. What is put in the drawer holding the value can be | 1743 | another, and so on. What is put in the drawer holding the value can be |
| 1749 | changed without affecting the contents of the drawer holding the | 1744 | changed without affecting the contents of the drawer holding the |
| 1750 | function definition, and vice-versa. | 1745 | function definition, and vice-verse. |
| 1751 | 1746 | ||
| 1752 | @menu | 1747 | @menu |
| 1753 | * fill-column Example:: | 1748 | * fill-column Example:: |
| @@ -2712,7 +2707,7 @@ functions; without the parentheses, the interpreter would attempt to | |||
| 2712 | evaluate the symbols as variables. @xref{Variables}.) | 2707 | evaluate the symbols as variables. @xref{Variables}.) |
| 2713 | 2708 | ||
| 2714 | In spite of the distinction between files and buffers, you will often | 2709 | In spite of the distinction between files and buffers, you will often |
| 2715 | find that people refer to a file when they mean a buffer and vice-versa. | 2710 | find that people refer to a file when they mean a buffer and vice-verse. |
| 2716 | Indeed, most people say, ``I am editing a file,'' rather than saying, | 2711 | Indeed, most people say, ``I am editing a file,'' rather than saying, |
| 2717 | ``I am editing a buffer which I will soon save to a file.'' It is | 2712 | ``I am editing a buffer which I will soon save to a file.'' It is |
| 2718 | almost always clear from context what people mean. When dealing with | 2713 | almost always clear from context what people mean. When dealing with |
| @@ -3277,7 +3272,6 @@ Emacs. To reload code automatically whenever you start Emacs, see | |||
| 3277 | @unnumberedsubsec The effect of installation | 3272 | @unnumberedsubsec The effect of installation |
| 3278 | @end ifnottex | 3273 | @end ifnottex |
| 3279 | 3274 | ||
| 3280 | |||
| 3281 | You can see the effect of installing @code{multiply-by-seven} by | 3275 | You can see the effect of installing @code{multiply-by-seven} by |
| 3282 | evaluating the following sample. Place the cursor after the following | 3276 | evaluating the following sample. Place the cursor after the following |
| 3283 | expression and type @kbd{C-x C-e}. The number 21 will appear in the | 3277 | expression and type @kbd{C-x C-e}. The number 21 will appear in the |
| @@ -5610,7 +5604,7 @@ the buffer you are in (and you have not seen the computer shift its | |||
| 5610 | attention, so you don't know that that buffer is now called | 5604 | attention, so you don't know that that buffer is now called |
| 5611 | @code{oldbuf}). | 5605 | @code{oldbuf}). |
| 5612 | 5606 | ||
| 5613 | Incidently, this is what is meant by `replacement'. To replace text, | 5607 | Incidentally, this is what is meant by `replacement'. To replace text, |
| 5614 | Emacs erases the previous text and then inserts new text. | 5608 | Emacs erases the previous text and then inserts new text. |
| 5615 | 5609 | ||
| 5616 | @need 1250 | 5610 | @need 1250 |
| @@ -5850,7 +5844,7 @@ so the true-or-false-test looks like this: | |||
| 5850 | @noindent | 5844 | @noindent |
| 5851 | @code{not} is a function that returns true if its argument is false | 5845 | @code{not} is a function that returns true if its argument is false |
| 5852 | and false if its argument is true. So if @code{(bufferp buffer)} | 5846 | and false if its argument is true. So if @code{(bufferp buffer)} |
| 5853 | returns true, the @code{not} expression returns false and vice-versa: | 5847 | returns true, the @code{not} expression returns false and vice-verse: |
| 5854 | what is ``not true'' is false and what is ``not false'' is true. | 5848 | what is ``not true'' is false and what is ``not false'' is true. |
| 5855 | 5849 | ||
| 5856 | Using this test, the @code{if} expression works as follows: when the | 5850 | Using this test, the @code{if} expression works as follows: when the |
| @@ -7433,7 +7427,7 @@ If you are reading this in Info inside of GNU Emacs, you can evaluate | |||
| 7433 | this expression in the usual fashion, by positioning the cursor after | 7427 | this expression in the usual fashion, by positioning the cursor after |
| 7434 | the expression and typing @kbd{C-x C-e}. (I'm doing this right here | 7428 | the expression and typing @kbd{C-x C-e}. (I'm doing this right here |
| 7435 | as I write this. This is one of the advantages of having the | 7429 | as I write this. This is one of the advantages of having the |
| 7436 | interpreter built into the computing environment. Incidently, when | 7430 | interpreter built into the computing environment. Incidentally, when |
| 7437 | there is nothing on the line after the final parentheses, such as a | 7431 | there is nothing on the line after the final parentheses, such as a |
| 7438 | comment, point can be on the next line. Thus, if your cursor is in | 7432 | comment, point can be on the next line. Thus, if your cursor is in |
| 7439 | the first column of the next line, you do not need to move it. | 7433 | the first column of the next line, you do not need to move it. |
| @@ -7773,7 +7767,7 @@ are of the right type, and give the user a prompt. | |||
| 7773 | 7767 | ||
| 7774 | In a read-only buffer, the @code{zap-to-char} function copies the text | 7768 | In a read-only buffer, the @code{zap-to-char} function copies the text |
| 7775 | to the kill ring, but does not remove it. The echo area displays a | 7769 | to the kill ring, but does not remove it. The echo area displays a |
| 7776 | message saying that the buffer is read-ly. Also, the terminal may | 7770 | message saying that the buffer is read-only. Also, the terminal may |
| 7777 | beep or blink at you. | 7771 | beep or blink at you. |
| 7778 | 7772 | ||
| 7779 | Let us continue with the interactive specification. | 7773 | Let us continue with the interactive specification. |
| @@ -7836,7 +7830,6 @@ character as a string.) If the search is backwards, | |||
| 7836 | the target. Also, @code{search-forward} returns @code{t} for true. | 7830 | the target. Also, @code{search-forward} returns @code{t} for true. |
| 7837 | (Moving point is therefore a `side effect'.) | 7831 | (Moving point is therefore a `side effect'.) |
| 7838 | 7832 | ||
| 7839 | |||
| 7840 | @need 1250 | 7833 | @need 1250 |
| 7841 | In @code{zap-to-char}, the @code{search-forward} function looks like this: | 7834 | In @code{zap-to-char}, the @code{search-forward} function looks like this: |
| 7842 | 7835 | ||
| @@ -8027,64 +8020,6 @@ text. See `insert-for-yank'." | |||
| 8027 | (barf-if-buffer-read-only) | 8020 | (barf-if-buffer-read-only) |
| 8028 | ;; If the buffer isn't read-only, the text is. | 8021 | ;; If the buffer isn't read-only, the text is. |
| 8029 | (signal 'text-read-only (list (current-buffer))))))) | 8022 | (signal 'text-read-only (list (current-buffer))))))) |
| 8030 | |||
| 8031 | |||
| 8032 | kfstorm 18-Jan-03): (defun kill-region (beg end &optional yank-handler) | ||
| 8033 | rms 11-Mar-06): "Kill (\"cut\") text between point and mark. | ||
| 8034 | rms 11-Mar-06): This deletes the text from the buffer and saves it in the kill ring. | ||
| 8035 | jimb 21-Dec-91): The command \\[yank] can retrieve it from there. | ||
| 8036 | eliz 16-Feb-01): \(If you want to kill and then yank immediately, use \\[kill-ring-save].) | ||
| 8037 | eliz 16-Feb-01): | ||
| 8038 | eliz 16-Feb-01): If you want to append the killed region to the last killed text, | ||
| 8039 | eliz 16-Feb-01): use \\[append-next-kill] before \\[kill-region]. | ||
| 8040 | eliz 16-Feb-01): | ||
| 8041 | jimb 01-Feb-93): If the buffer is read-only, Emacs will beep and refrain from deleting | ||
| 8042 | jimb 01-Feb-93): the text, but put the text in the kill ring anyway. This means that | ||
| 8043 | jimb 01-Feb-93): you can use the killing commands to copy text from a read-only buffer. | ||
| 8044 | jimb 21-Dec-91): | ||
| 8045 | jimb 21-Dec-91): This is the primitive for programs to kill text (as opposed to deleting it). | ||
| 8046 | lektu 07-Jun-04): Supply two arguments, character positions indicating the stretch of text | ||
| 8047 | jimb 21-Dec-91): to be killed. | ||
| 8048 | jimb 21-Dec-91): Any command that calls this function is a \"kill command\". | ||
| 8049 | jimb 21-Dec-91): If the previous command was also a kill command, | ||
| 8050 | jimb 21-Dec-91): the text killed this time appends to the text killed last time | ||
| 8051 | kfstorm 18-Jan-03): to make one entry in the kill ring. | ||
| 8052 | kfstorm 18-Jan-03): | ||
| 8053 | uid68472 18-Feb-04): In Lisp code, optional third arg YANK-HANDLER, if non-nil, | ||
| 8054 | uid68472 18-Feb-04): specifies the yank-handler text property to be set on the killed | ||
| 8055 | uid68472 18-Feb-04): text. See `insert-for-yank'." | ||
| 8056 | rms 21-May-06): ;; Pass point first, then mark, because the order matters | ||
| 8057 | rms 21-May-06): ;; when calling kill-append. | ||
| 8058 | rms 21-May-06): (interactive (list (point) (mark))) | ||
| 8059 | rms 04-Sep-06): (unless (and beg end) | ||
| 8060 | rms 04-Sep-06): (error "The mark is not set now, so there is no region")) | ||
| 8061 | kwzh 19-Nov-97): (condition-case nil | ||
| 8062 | rms 29-Mar-05): (let ((string (filter-buffer-substring beg end t))) | ||
| 8063 | monnier 07-Dec-99): (when string ;STRING is nil if BEG = END | ||
| 8064 | monnier 07-Dec-99): ;; Add that string to the kill ring, one way or another. | ||
| 8065 | monnier 07-Dec-99): (if (eq last-command 'kill-region) | ||
| 8066 | kfstorm 18-Jan-03): (kill-append string (< end beg) yank-handler) | ||
| 8067 | kfstorm 18-Jan-03): (kill-new string nil yank-handler))) | ||
| 8068 | kai 28-May-03): (when (or string (eq last-command 'kill-region)) | ||
| 8069 | uid68472 18-Feb-04): (setq this-command 'kill-region)) | ||
| 8070 | uid68472 18-Feb-04): nil) | ||
| 8071 | kwzh 19-Nov-97): ((buffer-read-only text-read-only) | ||
| 8072 | kwzh 19-Nov-97): ;; The code above failed because the buffer, or some of the characters | ||
| 8073 | kwzh 19-Nov-97): ;; in the region, are read-only. | ||
| 8074 | kwzh 19-Nov-97): ;; We should beep, in case the user just isn't aware of this. | ||
| 8075 | kwzh 19-Nov-97): ;; However, there's no harm in putting | ||
| 8076 | kwzh 19-Nov-97): ;; the region's text in the kill ring, anyway. | ||
| 8077 | kwzh 19-Nov-97): (copy-region-as-kill beg end) | ||
| 8078 | rms 19-May-98): ;; Set this-command now, so it will be set even if we get an error. | ||
| 8079 | rms 19-May-98): (setq this-command 'kill-region) | ||
| 8080 | rms 19-May-98): ;; This should barf, if appropriate, and give us the correct error. | ||
| 8081 | kwzh 19-Nov-97): (if kill-read-only-ok | ||
| 8082 | uid68472 18-Feb-04): (progn (message "Read only text copied to kill ring") nil) | ||
| 8083 | kwzh 19-Nov-97): ;; Signal an error if the buffer is read-only. | ||
| 8084 | kwzh 19-Nov-97): (barf-if-buffer-read-only) | ||
| 8085 | kwzh 19-Nov-97): ;; If the buffer isn't read-only, the text is. | ||
| 8086 | kwzh 19-Nov-97): (signal 'text-read-only (list (current-buffer))))))) | ||
| 8087 | |||
| 8088 | @end ignore | 8023 | @end ignore |
| 8089 | 8024 | ||
| 8090 | The Emacs 22 version of that function uses @code{condition-case} and | 8025 | The Emacs 22 version of that function uses @code{condition-case} and |
| @@ -8198,7 +8133,7 @@ The command \\[yank] can retrieve it from there. @dots{} " | |||
| 8198 | @group | 8133 | @group |
| 8199 | ;; The first part of the third argument is the following: | 8134 | ;; The first part of the third argument is the following: |
| 8200 | ((buffer-read-only text-read-only) ;; the if-part | 8135 | ((buffer-read-only text-read-only) ;; the if-part |
| 8201 | ;; then @dots{} | 8136 | ;; @dots{} the then-part |
| 8202 | (copy-region-as-kill beg end) | 8137 | (copy-region-as-kill beg end) |
| 8203 | @end group | 8138 | @end group |
| 8204 | @group | 8139 | @group |
| @@ -8364,7 +8299,6 @@ In brief, in the @code{kill-region} function, the code | |||
| 8364 | @end group | 8299 | @end group |
| 8365 | @end smallexample | 8300 | @end smallexample |
| 8366 | 8301 | ||
| 8367 | |||
| 8368 | @ignore | 8302 | @ignore |
| 8369 | 2006 Oct 24 | 8303 | 2006 Oct 24 |
| 8370 | In Emacs 22, | 8304 | In Emacs 22, |
| @@ -8936,7 +8870,6 @@ The @code{push} line of the else-part sets the new value of the kill | |||
| 8936 | ring to what results from adding the string being killed to the old | 8870 | ring to what results from adding the string being killed to the old |
| 8937 | kill ring. | 8871 | kill ring. |
| 8938 | 8872 | ||
| 8939 | |||
| 8940 | We can see how this works with an example. | 8873 | We can see how this works with an example. |
| 8941 | 8874 | ||
| 8942 | @need 800 | 8875 | @need 800 |
| @@ -9150,7 +9083,6 @@ commands. However, before discussing the yank commands, it is better | |||
| 9150 | to learn how lists are implemented in a computer. This will make | 9083 | to learn how lists are implemented in a computer. This will make |
| 9151 | clear such mysteries as the use of the term `pointer'. | 9084 | clear such mysteries as the use of the term `pointer'. |
| 9152 | 9085 | ||
| 9153 | |||
| 9154 | @ignore | 9086 | @ignore |
| 9155 | @c is this true in Emacs 22? Does not seems to be | 9087 | @c is this true in Emacs 22? Does not seems to be |
| 9156 | 9088 | ||
| @@ -10037,7 +9969,7 @@ In an earlier section, I suggested that you might imagine a symbol as | |||
| 10037 | being a chest of drawers. The function definition is put in one | 9969 | being a chest of drawers. The function definition is put in one |
| 10038 | drawer, the value in another, and so on. What is put in the drawer | 9970 | drawer, the value in another, and so on. What is put in the drawer |
| 10039 | holding the value can be changed without affecting the contents of the | 9971 | holding the value can be changed without affecting the contents of the |
| 10040 | drawer holding the function definition, and vice-versa. | 9972 | drawer holding the function definition, and vice-verse. |
| 10041 | 9973 | ||
| 10042 | Actually, what is put in each drawer is the address of the value or | 9974 | Actually, what is put in each drawer is the address of the value or |
| 10043 | function definition. It is as if you found an old chest in the attic, | 9975 | function definition. It is as if you found an old chest in the attic, |
| @@ -10313,7 +10245,6 @@ on the other hand, serves to indicate---that is, to `point to'---that part | |||
| 10313 | of the kill ring of which the first element (the @sc{car}) will be | 10245 | of the kill ring of which the first element (the @sc{car}) will be |
| 10314 | inserted. | 10246 | inserted. |
| 10315 | 10247 | ||
| 10316 | |||
| 10317 | @ignore | 10248 | @ignore |
| 10318 | In GNU Emacs 22, the @code{kill-new} function calls | 10249 | In GNU Emacs 22, the @code{kill-new} function calls |
| 10319 | 10250 | ||
| @@ -12537,7 +12468,7 @@ that a sentence may end without a period, such as text in Thai.) | |||
| 12537 | (Note that here the @key{TAB}, two spaces, and @key{RET} are shown | 12468 | (Note that here the @key{TAB}, two spaces, and @key{RET} are shown |
| 12538 | literally in the pattern.) | 12469 | literally in the pattern.) |
| 12539 | 12470 | ||
| 12540 | This regular expression can be decyphered as follows: | 12471 | This regular expression can be deciphered as follows: |
| 12541 | 12472 | ||
| 12542 | @table @code | 12473 | @table @code |
| 12543 | @item [.?!] | 12474 | @item [.?!] |
| @@ -13330,7 +13261,6 @@ forward one paragraph. | |||
| 13330 | (looking-at fill-prefix-regexp)) | 13261 | (looking-at fill-prefix-regexp)) |
| 13331 | (forward-line 1)) | 13262 | (forward-line 1)) |
| 13332 | 13263 | ||
| 13333 | |||
| 13334 | (while (and (re-search-forward sp-parstart nil 1) | 13264 | (while (and (re-search-forward sp-parstart nil 1) |
| 13335 | (progn (setq start (match-beginning 0)) | 13265 | (progn (setq start (match-beginning 0)) |
| 13336 | (goto-char start) | 13266 | (goto-char start) |
| @@ -15331,20 +15261,6 @@ C-e} (@code{eval-last-sexp}). | |||
| 15331 | "/usr/local/share/emacs/22.0.100/lisp/emacs-lisp/debug.el") | 15261 | "/usr/local/share/emacs/22.0.100/lisp/emacs-lisp/debug.el") |
| 15332 | @end smallexample | 15262 | @end smallexample |
| 15333 | 15263 | ||
| 15334 | @c was: (lengths-list-file "../lisp/debug.el") | ||
| 15335 | @ignore | ||
| 15336 | 2006 Oct 29 | ||
| 15337 | For Bob, as root, | ||
| 15338 | gunzip /usr/local/share/emacs/22.0.50/lisp/emacs-lisp/debug.el.gz | ||
| 15339 | In GNU Emacs 22, in *info* eval | ||
| 15340 | count-words-in-defun | ||
| 15341 | in The `count-words-in-defun' Function | ||
| 15342 | count-words-in-defun | ||
| 15343 | in `lengths-list-file' in Detail | ||
| 15344 | then eval | ||
| 15345 | (lengths-list-file "/usr/local/share/emacs/22.0.50/lisp/emacs-lisp/debug.el") | ||
| 15346 | @end ignore | ||
| 15347 | |||
| 15348 | @noindent | 15264 | @noindent |
| 15349 | (You may need to change the pathname of the file; the one here is for | 15265 | (You may need to change the pathname of the file; the one here is for |
| 15350 | GNU Emacs version 22.0.100. To change the expression, copy it to | 15266 | GNU Emacs version 22.0.100. To change the expression, copy it to |
| @@ -15365,7 +15281,7 @@ Then evaluate the @code{lengths-list-file} expression.) | |||
| 15365 | 15281 | ||
| 15366 | @need 1200 | 15282 | @need 1200 |
| 15367 | The lengths' list for @file{debug.el} takes less than a second to | 15283 | The lengths' list for @file{debug.el} takes less than a second to |
| 15368 | produce and looks like this in GNY Emacs 22: | 15284 | produce and looks like this in GNU Emacs 22: |
| 15369 | 15285 | ||
| 15370 | @smallexample | 15286 | @smallexample |
| 15371 | (83 113 105 144 289 22 30 97 48 89 25 52 52 88 28 29 77 49 43 290 232 587) | 15287 | (83 113 105 144 289 22 30 97 48 89 25 52 52 88 28 29 77 49 43 290 232 587) |
| @@ -15475,14 +15391,6 @@ These considerations lead us directly to the function itself: | |||
| 15475 | name to the absolute, long, path name form of the directory in which | 15391 | name to the absolute, long, path name form of the directory in which |
| 15476 | the function is called. | 15392 | the function is called. |
| 15477 | 15393 | ||
| 15478 | @ignore | ||
| 15479 | 2006 Oct 29 | ||
| 15480 | For Bob, as root, | ||
| 15481 | gunzip /usr/local/share/emacs/22.0.50/lisp/emacs-lisp/debug.el.gz | ||
| 15482 | In GNU Emacs 22, eval | ||
| 15483 | (expand-file-name "/usr/local/share/emacs/22.0.50/lisp/emacs-lisp/debug.el") | ||
| 15484 | @end ignore | ||
| 15485 | |||
| 15486 | @c !!! 22.0.100 lisp sources location here | 15394 | @c !!! 22.0.100 lisp sources location here |
| 15487 | @need 1500 | 15395 | @need 1500 |
| 15488 | Thus, if @code{expand-file-name} is called on @code{debug.el} when | 15396 | Thus, if @code{expand-file-name} is called on @code{debug.el} when |
| @@ -15591,14 +15499,6 @@ The results are shown after the @samp{@result{}}. (These results are | |||
| 15591 | for files from Emacs Version 22.0.100; files from other versions of | 15499 | for files from Emacs Version 22.0.100; files from other versions of |
| 15592 | Emacs may produce different results.) | 15500 | Emacs may produce different results.) |
| 15593 | 15501 | ||
| 15594 | @ignore | ||
| 15595 | 2006 Oct 29 | ||
| 15596 | For Bob, as root, | ||
| 15597 | gunzip /usr/local/share/emacs/22.0.50/lisp/macros.el.gz | ||
| 15598 | In GNU Emacs 22, eval | ||
| 15599 | (lengths-list-file "/usr/local/share/emacs/22.0.50/lisp/macros.el") | ||
| 15600 | @end ignore | ||
| 15601 | |||
| 15602 | @c !!! 22.0.100 lisp sources location here | 15502 | @c !!! 22.0.100 lisp sources location here |
| 15603 | @smallexample | 15503 | @smallexample |
| 15604 | @group | 15504 | @group |
| @@ -15608,43 +15508,16 @@ In GNU Emacs 22, eval | |||
| 15608 | @result{} (283 263 480 90) | 15508 | @result{} (283 263 480 90) |
| 15609 | @end group | 15509 | @end group |
| 15610 | 15510 | ||
| 15611 | @ignore | ||
| 15612 | 2006 Oct 29 | ||
| 15613 | For Bob, as root, | ||
| 15614 | gunzip /usr/local/share/emacs/22.0.50/lisp/mail/mailalias.el.gz | ||
| 15615 | In GNU Emacs 22, eval | ||
| 15616 | (lengths-list-file "/usr/local/share/emacs/22.0.50/lisp/mail/mailalias.el") | ||
| 15617 | @end ignore | ||
| 15618 | |||
| 15619 | @group | 15511 | @group |
| 15620 | (lengths-list-file "./lisp/mail/mailalias.el") | 15512 | (lengths-list-file "./lisp/mail/mailalias.el") |
| 15621 | @result{} (38 32 29 95 178 180 321 218 324) | 15513 | @result{} (38 32 29 95 178 180 321 218 324) |
| 15622 | @end group | 15514 | @end group |
| 15623 | 15515 | ||
| 15624 | @ignore | ||
| 15625 | 2006 Oct 29 | ||
| 15626 | For Bob, as root, | ||
| 15627 | gunzip /usr/local/share/emacs/22.0.50/lisp/makesum.el | ||
| 15628 | In GNU Emacs 22, eval | ||
| 15629 | (lengths-list-file "/usr/local/share/emacs/22.0.50/lisp/makesum.el") | ||
| 15630 | @end ignore | ||
| 15631 | |||
| 15632 | @group | 15516 | @group |
| 15633 | (lengths-list-file "./lisp/makesum.el") | 15517 | (lengths-list-file "./lisp/makesum.el") |
| 15634 | @result{} (85 181) | 15518 | @result{} (85 181) |
| 15635 | @end group | 15519 | @end group |
| 15636 | 15520 | ||
| 15637 | @ignore | ||
| 15638 | 2006 Oct 29 | ||
| 15639 | In GNU Emacs 22, eval | ||
| 15640 | (progn | ||
| 15641 | (cd "/usr/local/share/emacs/22.0.50/") | ||
| 15642 | (recursive-lengths-list-many-files | ||
| 15643 | '("./lisp/macros.el" | ||
| 15644 | "./lisp/mail/mailalias.el" | ||
| 15645 | "./lisp/makesum.el"))) | ||
| 15646 | @end ignore | ||
| 15647 | |||
| 15648 | @group | 15521 | @group |
| 15649 | (recursive-lengths-list-many-files | 15522 | (recursive-lengths-list-many-files |
| 15650 | '("./lisp/macros.el" | 15523 | '("./lisp/macros.el" |
| @@ -15826,13 +15699,6 @@ say, a file with the special attributes of a directory. The second | |||
| 15826 | element of the list is @code{t} for a directory, a string | 15699 | element of the list is @code{t} for a directory, a string |
| 15827 | for symbolic link (the string is the name linked to), or @code{nil}. | 15700 | for symbolic link (the string is the name linked to), or @code{nil}. |
| 15828 | 15701 | ||
| 15829 | @ignore | ||
| 15830 | (directory-files-and-attributes "/usr/local/src/emacs") --> | ||
| 15831 | (... ("lisp" t 21 1000 100 (17733 259) (17732 36064) (17732 36064) 12288 | ||
| 15832 | "drwxr-xr-x" nil 2971606 773)) | ||
| 15833 | @end ignore | ||
| 15834 | |||
| 15835 | |||
| 15836 | For example, the first @samp{.el} file in the @file{lisp/} directory | 15702 | For example, the first @samp{.el} file in the @file{lisp/} directory |
| 15837 | is @file{abbrev.el}. Its name is | 15703 | is @file{abbrev.el}. Its name is |
| 15838 | @file{/usr/local/share/emacs/22.0.100/lisp/abbrev.el} and it is not a | 15704 | @file{/usr/local/share/emacs/22.0.100/lisp/abbrev.el} and it is not a |
| @@ -15842,12 +15708,6 @@ directory or a symbolic link. | |||
| 15842 | This is how @code{directory-files-and-attributes} lists that file and | 15708 | This is how @code{directory-files-and-attributes} lists that file and |
| 15843 | its attributes: | 15709 | its attributes: |
| 15844 | 15710 | ||
| 15845 | @ignore | ||
| 15846 | (directory-files-and-attributes "/usr/local/src/emacs/lisp") --> | ||
| 15847 | (... ("abbrev.el" nil 1 1000 100 (17733 259) (17491 28834) (17596 62124) | ||
| 15848 | 13157 "-rw-r--r--" nil 2971624 773) ...) | ||
| 15849 | @end ignore | ||
| 15850 | |||
| 15851 | @smallexample | 15711 | @smallexample |
| 15852 | @group | 15712 | @group |
| 15853 | ("abbrev.el" | 15713 | ("abbrev.el" |
| @@ -17312,6 +17172,13 @@ initialization file, which is usually called @file{.emacs}. | |||
| 17312 | I myself use @code{customize} for hardly anything. Mostly, I write | 17172 | I myself use @code{customize} for hardly anything. Mostly, I write |
| 17313 | expressions myself. | 17173 | expressions myself. |
| 17314 | 17174 | ||
| 17175 | @findex defsubst | ||
| 17176 | @findex defconst | ||
| 17177 | Incidentally, @code{defsubst} defines an inline function. The syntax | ||
| 17178 | is just like that of @code{defun}. @code{defconst} defines a symbol | ||
| 17179 | as a constant. The intent is that neither programs nor users should | ||
| 17180 | ever change a value set by @code{defconst} | ||
| 17181 | |||
| 17315 | @node Beginning a .emacs File, Text and Auto-fill, defcustom, Emacs Initialization | 17182 | @node Beginning a .emacs File, Text and Auto-fill, defcustom, Emacs Initialization |
| 17316 | @section Beginning a @file{.emacs} File | 17183 | @section Beginning a @file{.emacs} File |
| 17317 | @cindex @file{.emacs} file, beginning of | 17184 | @cindex @file{.emacs} file, beginning of |
| @@ -17621,7 +17488,7 @@ control key and the @kbd{c} key at the same time'. The @code{w} means | |||
| 17621 | `press the @kbd{w} key'. The keybinding is surrounded by double | 17488 | `press the @kbd{w} key'. The keybinding is surrounded by double |
| 17622 | quotation marks. In documentation, you would write this as @kbd{C-c | 17489 | quotation marks. In documentation, you would write this as @kbd{C-c |
| 17623 | w}. (If you were binding a @key{META} key, such as @kbd{M-c}, rather | 17490 | w}. (If you were binding a @key{META} key, such as @kbd{M-c}, rather |
| 17624 | than a @key{CTL} key, you would write @code{\M-c}. @xref{Init | 17491 | than a @key{CTRL} key, you would write @code{\M-c}. @xref{Init |
| 17625 | Rebinding, , Rebinding Keys in Your Init File, emacs, The GNU Emacs | 17492 | Rebinding, , Rebinding Keys in Your Init File, emacs, The GNU Emacs |
| 17626 | Manual}, for details.) | 17493 | Manual}, for details.) |
| 17627 | 17494 | ||
| @@ -18188,8 +18055,8 @@ this: | |||
| 18188 | @end smallexample | 18055 | @end smallexample |
| 18189 | 18056 | ||
| 18190 | @item | 18057 | @item |
| 18191 | Convert @kbd{@key{CTL}-h} into @key{DEL} and @key{DEL} | 18058 | Convert @kbd{@key{CTRL}-h} into @key{DEL} and @key{DEL} |
| 18192 | into @kbd{@key{CTL}-h}.@* | 18059 | into @kbd{@key{CTRL}-h}.@* |
| 18193 | (Some older keyboards needed this, although I have not seen the | 18060 | (Some older keyboards needed this, although I have not seen the |
| 18194 | problem recently.) | 18061 | problem recently.) |
| 18195 | 18062 | ||
| @@ -18268,7 +18135,7 @@ If you want to write with Chinese `GB' characters, set this instead: | |||
| 18268 | @cindex Bindings, key, fixing unpleasant | 18135 | @cindex Bindings, key, fixing unpleasant |
| 18269 | 18136 | ||
| 18270 | Some systems bind keys unpleasantly. Sometimes, for example, the | 18137 | Some systems bind keys unpleasantly. Sometimes, for example, the |
| 18271 | @key{CTL} key appears in an awkward spot rather than at the far left | 18138 | @key{CTRL} key appears in an awkward spot rather than at the far left |
| 18272 | of the home row. | 18139 | of the home row. |
| 18273 | 18140 | ||
| 18274 | Usually, when people fix these sorts of keybindings, they do not | 18141 | Usually, when people fix these sorts of keybindings, they do not |
| @@ -18643,7 +18510,7 @@ presented you with an error message. You had to start the debugger | |||
| 18643 | manually. | 18510 | manually. |
| 18644 | @end ignore | 18511 | @end ignore |
| 18645 | 18512 | ||
| 18646 | Incidently, you can start the debugger manually for all versions of | 18513 | Incidentally, you can start the debugger manually for all versions of |
| 18647 | Emacs; the advantage is that the debugger runs even if you do not have | 18514 | Emacs; the advantage is that the debugger runs even if you do not have |
| 18648 | a bug in your code. Sometimes your code will be free of bugs! | 18515 | a bug in your code. Sometimes your code will be free of bugs! |
| 18649 | 18516 | ||
| @@ -18966,7 +18833,7 @@ completes without problems. | |||
| 18966 | @item | 18833 | @item |
| 18967 | While running Edebug, type @kbd{?} to see a list of all the Edebug commands. | 18834 | While running Edebug, type @kbd{?} to see a list of all the Edebug commands. |
| 18968 | (The @code{global-edebug-prefix} is usually @kbd{C-x X}, i.e.@: | 18835 | (The @code{global-edebug-prefix} is usually @kbd{C-x X}, i.e.@: |
| 18969 | @kbd{@key{CTL}-x} followed by an upper case @kbd{X}; use this prefix | 18836 | @kbd{@key{CTRL}-x} followed by an upper case @kbd{X}; use this prefix |
| 18970 | for commands made outside of the Edebug debugging buffer.) | 18837 | for commands made outside of the Edebug debugging buffer.) |
| 18971 | 18838 | ||
| 18972 | @item | 18839 | @item |
| @@ -19205,105 +19072,6 @@ five six seven | |||
| 19205 | You can substitute the other regular expressions shown above in the | 19072 | You can substitute the other regular expressions shown above in the |
| 19206 | function definition and try each of them on this list. | 19073 | function definition and try each of them on this list. |
| 19207 | 19074 | ||
| 19208 | @c done til here 2006 Oct 29 | ||
| 19209 | |||
| 19210 | @ignore | ||
| 19211 | |||
| 19212 | |||
| 19213 | |||
| 19214 | @end ignore | ||
| 19215 | |||
| 19216 | |||
| 19217 | @ignore | ||
| 19218 | as of GNU Emacs 22, this no longer seems to be the case | ||
| 19219 | with yank yank-pop | ||
| 19220 | |||
| 19221 | guts of rotate-yank-pointer moved to current-kill | ||
| 19222 | in simple.el | ||
| 19223 | |||
| 19224 | (defun current-kill (n &optional do-not-move) | ||
| 19225 | "Rotate the yanking point by N places, and then return that kill. | ||
| 19226 | |||
| 19227 | critical part is: | ||
| 19228 | |||
| 19229 | (let ((ARGth-kill-element | ||
| 19230 | (nthcdr (mod (- n (length kill-ring-yank-pointer)) | ||
| 19231 | (length kill-ring)) | ||
| 19232 | kill-ring))) | ||
| 19233 | (or do-not-move | ||
| 19234 | (setq kill-ring-yank-pointer ARGth-kill-element)) | ||
| 19235 | (car ARGth-kill-element)) | ||
| 19236 | |||
| 19237 | |||
| 19238 | |||
| 19239 | (mod X Y) | ||
| 19240 | Return X modulo Y. | ||
| 19241 | |||
| 19242 | (% X Y) | ||
| 19243 | Return remainder of X divided by Y. | ||
| 19244 | |||
| 19245 | (mod 12 3) 0 (#o0, #x0, ?\C-@) | ||
| 19246 | (mod 4 3) 1 | ||
| 19247 | (mod 13 3) 1 | ||
| 19248 | |||
| 19249 | (% 12 3) 0 | ||
| 19250 | (% 4 3) 1 | ||
| 19251 | (% 13 3) 1 | ||
| 19252 | |||
| 19253 | mod returns the value of DIVIDEND modulo DIVISOR; in | ||
| 19254 | other words, the remainder after division of DIVIDEND by DIVISOR, | ||
| 19255 | but with the same sign as DIVISOR. The arguments must be numbers | ||
| 19256 | or markers. | ||
| 19257 | |||
| 19258 | Unlike `%', `mod' returns a well-defined result for negative | ||
| 19259 | arguments. It also permits floating point arguments; it rounds the | ||
| 19260 | quotient downward (towards minus infinity) to an integer, and uses | ||
| 19261 | that quotient to compute the remainder. | ||
| 19262 | |||
| 19263 | % returns the integer remainder after division of | ||
| 19264 | DIVIDEND by DIVISOR. The arguments must be integers or markers. | ||
| 19265 | |||
| 19266 | For negative arguments, the remainder is in principle | ||
| 19267 | machine-dependent since the quotient is; but in practice, all | ||
| 19268 | known machines behave alike. | ||
| 19269 | |||
| 19270 | |||
| 19271 | |||
| 19272 | rotate-yank-pointer has | ||
| 19273 | |||
| 19274 | reformatted: | ||
| 19275 | (let ((length (length kill-ring))) | ||
| 19276 | ... | ||
| 19277 | (setq kill-ring-yank-pointer | ||
| 19278 | (nthcdr (% (+ arg | ||
| 19279 | (- length (length kill-ring-yank-pointer))) | ||
| 19280 | length) | ||
| 19281 | kill-ring))))) | ||
| 19282 | |||
| 19283 | originally | ||
| 19284 | (setq kill-ring-yank-pointer | ||
| 19285 | (nthcdr (% (+ arg | ||
| 19286 | (- length | ||
| 19287 | (length | ||
| 19288 | kill-ring-yank-pointer))) | ||
| 19289 | length) | ||
| 19290 | kill-ring))))) | ||
| 19291 | |||
| 19292 | |||
| 19293 | |||
| 19294 | |||
| 19295 | |||
| 19296 | |||
| 19297 | /usr/local/src/emacs/lisp/ChangeLog.3 | ||
| 19298 | 1992-05-21 Jim Blandy (jimb@pogo.cs.oberlin.edu) | ||
| 19299 | simple.el | ||
| 19300 | (yank-pop): Use current-kill, rather than assuming that | ||
| 19301 | kill-ring-yank-pointer points to the text you should use. | ||
| 19302 | (yank): Use current-kill, instead of calling rotate-yank-pointer | ||
| 19303 | and then fetching through the kill-ring-yank-pointer. | ||
| 19304 | |||
| 19305 | @end ignore | ||
| 19306 | |||
| 19307 | @node Kill Ring, Full Graph, the-the, Top | 19075 | @node Kill Ring, Full Graph, the-the, Top |
| 19308 | @appendix Handling the Kill Ring | 19076 | @appendix Handling the Kill Ring |
| 19309 | @cindex Kill ring handling | 19077 | @cindex Kill ring handling |
| @@ -19339,10 +19107,18 @@ it with @kbd{M-w}. | |||
| 19339 | (In a read-only buffer, such as the @file{*info*} buffer, the kill | 19107 | (In a read-only buffer, such as the @file{*info*} buffer, the kill |
| 19340 | command, @kbd{C-k} (@code{kill-line}), will not remove the text, | 19108 | command, @kbd{C-k} (@code{kill-line}), will not remove the text, |
| 19341 | merely copy it to the kill ring. However, your machine may beep at | 19109 | merely copy it to the kill ring. However, your machine may beep at |
| 19342 | you. Alternatively, for silence, you may copy the region of each line | 19110 | you. (@code{kill-line} calls @code{kill-region}.) Alternatively, for |
| 19343 | with the @kbd{M-w} (@code{kill-ring-save}) command. You must mark | 19111 | silence, you may copy the region of each line with the @kbd{M-w} |
| 19344 | each line for this command to succeed, but it does not matter at which | 19112 | (@code{kill-ring-save}) command. You must mark each line for this |
| 19345 | end you put point or mark.) | 19113 | command to succeed, but it does not matter at which end you put point |
| 19114 | or mark.) | ||
| 19115 | |||
| 19116 | @ignore | ||
| 19117 | @c texi2dvi fails when the name of the section is within ifnottex ... | ||
| 19118 | For a discussion of how @code{condition-case} deals with error, see | ||
| 19119 | @ref{Complete kill-region, , The Complete @code{kill-region} | ||
| 19120 | Definition}. | ||
| 19121 | @end ignore | ||
| 19346 | 19122 | ||
| 19347 | @need 1250 | 19123 | @need 1250 |
| 19348 | @noindent | 19124 | @noindent |
| @@ -19494,7 +19270,7 @@ within the bounds of this function. This variable is called | |||
| 19494 | is not for copying within this instance of GNU Emacs. Most window | 19270 | is not for copying within this instance of GNU Emacs. Most window |
| 19495 | systems provide a facility for interprogram pasting. Sadly, that | 19271 | systems provide a facility for interprogram pasting. Sadly, that |
| 19496 | facility usually provides only for the lasted element. Most windowing | 19272 | facility usually provides only for the lasted element. Most windowing |
| 19497 | systems have not adopted a ring of many possiblities, even though | 19273 | systems have not adopted a ring of many possibilities, even though |
| 19498 | Emacs has provided it for decades. | 19274 | Emacs has provided it for decades. |
| 19499 | 19275 | ||
| 19500 | The @code{if} expression has two parts, one if there exists | 19276 | The @code{if} expression has two parts, one if there exists |
| @@ -19562,7 +19338,6 @@ current value of @code{kill-ring-yank-pointer} is set to point to the | |||
| 19562 | list, the first element of which is returned even if the | 19338 | list, the first element of which is returned even if the |
| 19563 | @code{do-not-move} argument is true. | 19339 | @code{do-not-move} argument is true. |
| 19564 | 19340 | ||
| 19565 | |||
| 19566 | @menu | 19341 | @menu |
| 19567 | * Digression concerning error:: | 19342 | * Digression concerning error:: |
| 19568 | * Determining the Element :: | 19343 | * Determining the Element :: |
| @@ -19673,7 +19448,7 @@ That is fine. | |||
| 19673 | @end smallexample | 19448 | @end smallexample |
| 19674 | 19449 | ||
| 19675 | We can guess what the @code{-} function does. It is like @code{+} but | 19450 | We can guess what the @code{-} function does. It is like @code{+} but |
| 19676 | substracts instead of adds; the @code{-} function subtracts its second | 19451 | subtracts instead of adds; the @code{-} function subtracts its second |
| 19677 | argument from its first. Also, we already know what the @code{length} | 19452 | argument from its first. Also, we already know what the @code{length} |
| 19678 | function does (@pxref{length}). It returns the length of a list. | 19453 | function does (@pxref{length}). It returns the length of a list. |
| 19679 | 19454 | ||
| @@ -19713,14 +19488,19 @@ element. | |||
| 19713 | 19488 | ||
| 19714 | @cindex @samp{global variable} defined | 19489 | @cindex @samp{global variable} defined |
| 19715 | @cindex @samp{variable, global}, defined | 19490 | @cindex @samp{variable, global}, defined |
| 19716 | Incidently, both @code{kill-ring} and @code{kill-ring-yank-pointer} | 19491 | Incidentally, both @code{kill-ring} and @code{kill-ring-yank-pointer} |
| 19717 | are @dfn{global variables}. That means that any expression in Emacs | 19492 | are @dfn{global variables}. That means that any expression in Emacs |
| 19718 | Lisp can access them. They are not like the local variables set by | 19493 | Lisp can access them. They are not like the local variables set by |
| 19719 | @code{let} (@pxref{Prevent confusion}) or like the symbols in an | 19494 | @code{let} or like the symbols in an argument list. |
| 19720 | argument list (@pxref{defun, , The @code{defun} Special Form}). Local | 19495 | Local variables can only be accessed |
| 19721 | variables can only be accessed within the @code{let} that defines them | 19496 | within the @code{let} that defines them or the function that specifies |
| 19722 | or the function that specifies them in an argument list (and within | 19497 | them in an argument list (and within expressions called by them). |
| 19723 | expressions called by them). | 19498 | |
| 19499 | @ignore | ||
| 19500 | @c texi2dvi fails when the name of the section is within ifnottex ... | ||
| 19501 | (@xref{Prevent confusion, , @code{let} Prevents Confusion}, and | ||
| 19502 | @ref{defun, , The @code{defun} Special Form}.) | ||
| 19503 | @end ignore | ||
| 19724 | 19504 | ||
| 19725 | @node yank, yank-pop, current-kill, Kill Ring | 19505 | @node yank, yank-pop, current-kill, Kill Ring |
| 19726 | @comment node-name, next, previous, up | 19506 | @comment node-name, next, previous, up |
| @@ -19802,8 +19582,6 @@ the default is the function.) | |||
| 19802 | 19582 | ||
| 19803 | The last part of the function tells what to do when it succeeds. | 19583 | The last part of the function tells what to do when it succeeds. |
| 19804 | 19584 | ||
| 19805 | |||
| 19806 | |||
| 19807 | @node yank-pop, ring file, yank, Kill Ring | 19585 | @node yank-pop, ring file, yank, Kill Ring |
| 19808 | @comment node-name, next, previous, up | 19586 | @comment node-name, next, previous, up |
| 19809 | @appendixsec @code{yank-pop} | 19587 | @appendixsec @code{yank-pop} |
| @@ -22322,7 +22100,6 @@ Note: The Free Software Foundation maintains a page on its Web site | |||
| 22322 | that lists free books available from other publishers:@* | 22100 | that lists free books available from other publishers:@* |
| 22323 | @uref{http://www.gnu.org/doc/other-free-books.html} | 22101 | @uref{http://www.gnu.org/doc/other-free-books.html} |
| 22324 | 22102 | ||
| 22325 | |||
| 22326 | @node GNU Free Documentation License, Index, Free Software and Free Manuals, Top | 22103 | @node GNU Free Documentation License, Index, Free Software and Free Manuals, Top |
| 22327 | @appendix GNU Free Documentation License | 22104 | @appendix GNU Free Documentation License |
| 22328 | 22105 | ||