aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert J. Chassell2006-10-31 16:41:49 +0000
committerRobert J. Chassell2006-10-31 16:41:49 +0000
commit61879b3a05a78edf98700cedc88e108afd3d3975 (patch)
treeeee652d797f21e539e036bc43fe33ad455b26bbd
parent411b80a566ce95fe19f40d296de1c89549bd4c7a (diff)
downloademacs-61879b3a05a78edf98700cedc88e108afd3d3975.tar.gz
emacs-61879b3a05a78edf98700cedc88e108afd3d3975.zip
Removed INSTALL MANIFEST since those files are now irrelevant.
-rw-r--r--lispintro/INSTALL56
-rw-r--r--lispintro/MANIFEST30
-rw-r--r--lispintro/README13
-rw-r--r--lispintro/emacs-lisp-intro.texi337
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 @@
1Basic 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 @@
1This directory contains the source of the "Introduction to programming 1This directory contains the source of the "Introduction to Programming
2in Emacs Lisp" written by Robert J. Chassell, bob@gnu.org. This 2in Emacs Lisp" written by Robert J. Chassell, bob@gnu.org. This
3manual is an elementary introduction to programming in Emacs Lisp for 3manual is an elementary introduction to programming in Emacs Lisp for
4people who are not programmers, and who are not necessarily interested 4people who are not programmers, and who are not necessarily interested
5in programming, but who do want to customize or extend their computing 5in programming, but who do want to customize or extend their computing
6environment. 6environment.
7 7
8This second edition of 2001 Nov 20 updates the previous editions to 8This third edition of 2006 Oct 31 updates the previous editions to GNU
9GNU Emacs 21. 9Emacs 22.
10 10
11The Texinfo source file `emacs-lisp-intro.texi', formats without 11The Texinfo source file `emacs-lisp-intro.texi', formats without
12error using TeX version 3.14159, `kpathsea' version 3.3.1, 12reported error using `pdfeTeXk', Version 3.141592-1.21a-2.2 (Web2C
13`texinfo.tex' version 2001-05-24.08, and `makeinfo' version 4.0b. 137.5.4) and texinfo.tex version 2006-08-26.17 started by `texi2dvi'
14version 4.8, and with `makeinfo' version 4.8.
14 15
15Also, this tar file contains the following optional Encapsulated Post 16Also, this tar file contains the following optional Encapsulated Post
16Script figures. 17Script figures.
@@ -56,5 +57,5 @@ This will prevent TeX from attempting to load the last few .eps files.
56You will find additional instructions on formatting in the beginning 57You will find additional instructions on formatting in the beginning
57of the Texinfo file 'emacs-lisp-intro.texi'. Best Wishes! 58of the Texinfo file 'emacs-lisp-intro.texi'. Best Wishes!
58 59
592001 Nov 20 602006 Oct 31
60Robert J. Chassell, bob@gnu.org 61Robert 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
77Need 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
378The Lisp Interpreter 373The Lisp Interpreter
@@ -1747,7 +1742,7 @@ Another way to think about this is to imagine a symbol as being a chest
1747of drawers. The function definition is put in one drawer, the value in 1742of drawers. The function definition is put in one drawer, the value in
1748another, and so on. What is put in the drawer holding the value can be 1743another, and so on. What is put in the drawer holding the value can be
1749changed without affecting the contents of the drawer holding the 1744changed without affecting the contents of the drawer holding the
1750function definition, and vice-versa. 1745function 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
2712evaluate the symbols as variables. @xref{Variables}.) 2707evaluate the symbols as variables. @xref{Variables}.)
2713 2708
2714In spite of the distinction between files and buffers, you will often 2709In spite of the distinction between files and buffers, you will often
2715find that people refer to a file when they mean a buffer and vice-versa. 2710find that people refer to a file when they mean a buffer and vice-verse.
2716Indeed, most people say, ``I am editing a file,'' rather than saying, 2711Indeed, 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
2718almost always clear from context what people mean. When dealing with 2713almost 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
3281You can see the effect of installing @code{multiply-by-seven} by 3275You can see the effect of installing @code{multiply-by-seven} by
3282evaluating the following sample. Place the cursor after the following 3276evaluating the following sample. Place the cursor after the following
3283expression and type @kbd{C-x C-e}. The number 21 will appear in the 3277expression 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
5610attention, so you don't know that that buffer is now called 5604attention, so you don't know that that buffer is now called
5611@code{oldbuf}). 5605@code{oldbuf}).
5612 5606
5613Incidently, this is what is meant by `replacement'. To replace text, 5607Incidentally, this is what is meant by `replacement'. To replace text,
5614Emacs erases the previous text and then inserts new text. 5608Emacs 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
5852and false if its argument is true. So if @code{(bufferp buffer)} 5846and false if its argument is true. So if @code{(bufferp buffer)}
5853returns true, the @code{not} expression returns false and vice-versa: 5847returns true, the @code{not} expression returns false and vice-verse:
5854what is ``not true'' is false and what is ``not false'' is true. 5848what is ``not true'' is false and what is ``not false'' is true.
5855 5849
5856Using this test, the @code{if} expression works as follows: when the 5850Using 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
7433this expression in the usual fashion, by positioning the cursor after 7427this expression in the usual fashion, by positioning the cursor after
7434the expression and typing @kbd{C-x C-e}. (I'm doing this right here 7428the expression and typing @kbd{C-x C-e}. (I'm doing this right here
7435as I write this. This is one of the advantages of having the 7429as I write this. This is one of the advantages of having the
7436interpreter built into the computing environment. Incidently, when 7430interpreter built into the computing environment. Incidentally, when
7437there is nothing on the line after the final parentheses, such as a 7431there is nothing on the line after the final parentheses, such as a
7438comment, point can be on the next line. Thus, if your cursor is in 7432comment, point can be on the next line. Thus, if your cursor is in
7439the first column of the next line, you do not need to move it. 7433the 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
7774In a read-only buffer, the @code{zap-to-char} function copies the text 7768In a read-only buffer, the @code{zap-to-char} function copies the text
7775to the kill ring, but does not remove it. The echo area displays a 7769to the kill ring, but does not remove it. The echo area displays a
7776message saying that the buffer is read-ly. Also, the terminal may 7770message saying that the buffer is read-only. Also, the terminal may
7777beep or blink at you. 7771beep or blink at you.
7778 7772
7779Let us continue with the interactive specification. 7773Let us continue with the interactive specification.
@@ -7836,7 +7830,6 @@ character as a string.) If the search is backwards,
7836the target. Also, @code{search-forward} returns @code{t} for true. 7830the 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
7841In @code{zap-to-char}, the @code{search-forward} function looks like this: 7834In @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
8032kfstorm 18-Jan-03): (defun kill-region (beg end &optional yank-handler)
8033rms 11-Mar-06): "Kill (\"cut\") text between point and mark.
8034rms 11-Mar-06): This deletes the text from the buffer and saves it in the kill ring.
8035jimb 21-Dec-91): The command \\[yank] can retrieve it from there.
8036eliz 16-Feb-01): \(If you want to kill and then yank immediately, use \\[kill-ring-save].)
8037eliz 16-Feb-01):
8038eliz 16-Feb-01): If you want to append the killed region to the last killed text,
8039eliz 16-Feb-01): use \\[append-next-kill] before \\[kill-region].
8040eliz 16-Feb-01):
8041jimb 01-Feb-93): If the buffer is read-only, Emacs will beep and refrain from deleting
8042jimb 01-Feb-93): the text, but put the text in the kill ring anyway. This means that
8043jimb 01-Feb-93): you can use the killing commands to copy text from a read-only buffer.
8044jimb 21-Dec-91):
8045jimb 21-Dec-91): This is the primitive for programs to kill text (as opposed to deleting it).
8046lektu 07-Jun-04): Supply two arguments, character positions indicating the stretch of text
8047jimb 21-Dec-91): to be killed.
8048jimb 21-Dec-91): Any command that calls this function is a \"kill command\".
8049jimb 21-Dec-91): If the previous command was also a kill command,
8050jimb 21-Dec-91): the text killed this time appends to the text killed last time
8051kfstorm 18-Jan-03): to make one entry in the kill ring.
8052kfstorm 18-Jan-03):
8053uid68472 18-Feb-04): In Lisp code, optional third arg YANK-HANDLER, if non-nil,
8054uid68472 18-Feb-04): specifies the yank-handler text property to be set on the killed
8055uid68472 18-Feb-04): text. See `insert-for-yank'."
8056rms 21-May-06): ;; Pass point first, then mark, because the order matters
8057rms 21-May-06): ;; when calling kill-append.
8058rms 21-May-06): (interactive (list (point) (mark)))
8059rms 04-Sep-06): (unless (and beg end)
8060rms 04-Sep-06): (error "The mark is not set now, so there is no region"))
8061kwzh 19-Nov-97): (condition-case nil
8062rms 29-Mar-05): (let ((string (filter-buffer-substring beg end t)))
8063monnier 07-Dec-99): (when string ;STRING is nil if BEG = END
8064monnier 07-Dec-99): ;; Add that string to the kill ring, one way or another.
8065monnier 07-Dec-99): (if (eq last-command 'kill-region)
8066kfstorm 18-Jan-03): (kill-append string (< end beg) yank-handler)
8067kfstorm 18-Jan-03): (kill-new string nil yank-handler)))
8068kai 28-May-03): (when (or string (eq last-command 'kill-region))
8069uid68472 18-Feb-04): (setq this-command 'kill-region))
8070uid68472 18-Feb-04): nil)
8071kwzh 19-Nov-97): ((buffer-read-only text-read-only)
8072kwzh 19-Nov-97): ;; The code above failed because the buffer, or some of the characters
8073kwzh 19-Nov-97): ;; in the region, are read-only.
8074kwzh 19-Nov-97): ;; We should beep, in case the user just isn't aware of this.
8075kwzh 19-Nov-97): ;; However, there's no harm in putting
8076kwzh 19-Nov-97): ;; the region's text in the kill ring, anyway.
8077kwzh 19-Nov-97): (copy-region-as-kill beg end)
8078rms 19-May-98): ;; Set this-command now, so it will be set even if we get an error.
8079rms 19-May-98): (setq this-command 'kill-region)
8080rms 19-May-98): ;; This should barf, if appropriate, and give us the correct error.
8081kwzh 19-Nov-97): (if kill-read-only-ok
8082uid68472 18-Feb-04): (progn (message "Read only text copied to kill ring") nil)
8083kwzh 19-Nov-97): ;; Signal an error if the buffer is read-only.
8084kwzh 19-Nov-97): (barf-if-buffer-read-only)
8085kwzh 19-Nov-97): ;; If the buffer isn't read-only, the text is.
8086kwzh 19-Nov-97): (signal 'text-read-only (list (current-buffer)))))))
8087
8088@end ignore 8023@end ignore
8089 8024
8090The Emacs 22 version of that function uses @code{condition-case} and 8025The 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
83692006 Oct 24 83032006 Oct 24
8370In Emacs 22, 8304In Emacs 22,
@@ -8936,7 +8870,6 @@ The @code{push} line of the else-part sets the new value of the kill
8936ring to what results from adding the string being killed to the old 8870ring to what results from adding the string being killed to the old
8937kill ring. 8871kill ring.
8938 8872
8939
8940We can see how this works with an example. 8873We 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
9150to learn how lists are implemented in a computer. This will make 9083to learn how lists are implemented in a computer. This will make
9151clear such mysteries as the use of the term `pointer'. 9084clear 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
10037being a chest of drawers. The function definition is put in one 9969being a chest of drawers. The function definition is put in one
10038drawer, the value in another, and so on. What is put in the drawer 9970drawer, the value in another, and so on. What is put in the drawer
10039holding the value can be changed without affecting the contents of the 9971holding the value can be changed without affecting the contents of the
10040drawer holding the function definition, and vice-versa. 9972drawer holding the function definition, and vice-verse.
10041 9973
10042Actually, what is put in each drawer is the address of the value or 9974Actually, what is put in each drawer is the address of the value or
10043function definition. It is as if you found an old chest in the attic, 9975function 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
10313of the kill ring of which the first element (the @sc{car}) will be 10245of the kill ring of which the first element (the @sc{car}) will be
10314inserted. 10246inserted.
10315 10247
10316
10317@ignore 10248@ignore
10318In GNU Emacs 22, the @code{kill-new} function calls 10249In 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
12538literally in the pattern.) 12469literally in the pattern.)
12539 12470
12540This regular expression can be decyphered as follows: 12471This 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
153362006 Oct 29
15337For Bob, as root,
15338 gunzip /usr/local/share/emacs/22.0.50/lisp/emacs-lisp/debug.el.gz
15339In GNU Emacs 22, in *info* eval
15340 count-words-in-defun
15341in The `count-words-in-defun' Function
15342 count-words-in-defun
15343in `lengths-list-file' in Detail
15344then 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
15350GNU Emacs version 22.0.100. To change the expression, copy it to 15266GNU 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
15367The lengths' list for @file{debug.el} takes less than a second to 15283The lengths' list for @file{debug.el} takes less than a second to
15368produce and looks like this in GNY Emacs 22: 15284produce 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:
15475name to the absolute, long, path name form of the directory in which 15391name to the absolute, long, path name form of the directory in which
15476the function is called. 15392the function is called.
15477 15393
15478@ignore
154792006 Oct 29
15480For Bob, as root,
15481 gunzip /usr/local/share/emacs/22.0.50/lisp/emacs-lisp/debug.el.gz
15482In 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
15488Thus, if @code{expand-file-name} is called on @code{debug.el} when 15396Thus, 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
15591for files from Emacs Version 22.0.100; files from other versions of 15499for files from Emacs Version 22.0.100; files from other versions of
15592Emacs may produce different results.) 15500Emacs may produce different results.)
15593 15501
15594@ignore
155952006 Oct 29
15596For Bob, as root,
15597 gunzip /usr/local/share/emacs/22.0.50/lisp/macros.el.gz
15598In 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
156122006 Oct 29
15613For Bob, as root,
15614 gunzip /usr/local/share/emacs/22.0.50/lisp/mail/mailalias.el.gz
15615In 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
156252006 Oct 29
15626For Bob, as root,
15627 gunzip /usr/local/share/emacs/22.0.50/lisp/makesum.el
15628In 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
156382006 Oct 29
15639In 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
15826element of the list is @code{t} for a directory, a string 15699element of the list is @code{t} for a directory, a string
15827for symbolic link (the string is the name linked to), or @code{nil}. 15700for 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
15836For example, the first @samp{.el} file in the @file{lisp/} directory 15702For example, the first @samp{.el} file in the @file{lisp/} directory
15837is @file{abbrev.el}. Its name is 15703is @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.
15842This is how @code{directory-files-and-attributes} lists that file and 15708This is how @code{directory-files-and-attributes} lists that file and
15843its attributes: 15709its 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)
1584813157 "-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}.
17312I myself use @code{customize} for hardly anything. Mostly, I write 17172I myself use @code{customize} for hardly anything. Mostly, I write
17313expressions myself. 17173expressions myself.
17314 17174
17175@findex defsubst
17176@findex defconst
17177Incidentally, @code{defsubst} defines an inline function. The syntax
17178is just like that of @code{defun}. @code{defconst} defines a symbol
17179as a constant. The intent is that neither programs nor users should
17180ever 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
17622quotation marks. In documentation, you would write this as @kbd{C-c 17489quotation marks. In documentation, you would write this as @kbd{C-c
17623w}. (If you were binding a @key{META} key, such as @kbd{M-c}, rather 17490w}. (If you were binding a @key{META} key, such as @kbd{M-c}, rather
17624than a @key{CTL} key, you would write @code{\M-c}. @xref{Init 17491than a @key{CTRL} key, you would write @code{\M-c}. @xref{Init
17625Rebinding, , Rebinding Keys in Your Init File, emacs, The GNU Emacs 17492Rebinding, , Rebinding Keys in Your Init File, emacs, The GNU Emacs
17626Manual}, for details.) 17493Manual}, for details.)
17627 17494
@@ -18188,8 +18055,8 @@ this:
18188@end smallexample 18055@end smallexample
18189 18056
18190@item 18057@item
18191Convert @kbd{@key{CTL}-h} into @key{DEL} and @key{DEL} 18058Convert @kbd{@key{CTRL}-h} into @key{DEL} and @key{DEL}
18192into @kbd{@key{CTL}-h}.@* 18059into @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
18194problem recently.) 18061problem 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
18270Some systems bind keys unpleasantly. Sometimes, for example, the 18137Some 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
18272of the home row. 18139of the home row.
18273 18140
18274Usually, when people fix these sorts of keybindings, they do not 18141Usually, 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
18643manually. 18510manually.
18644@end ignore 18511@end ignore
18645 18512
18646Incidently, you can start the debugger manually for all versions of 18513Incidentally, you can start the debugger manually for all versions of
18647Emacs; the advantage is that the debugger runs even if you do not have 18514Emacs; the advantage is that the debugger runs even if you do not have
18648a bug in your code. Sometimes your code will be free of bugs! 18515a 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
18967While running Edebug, type @kbd{?} to see a list of all the Edebug commands. 18834While 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
18970for commands made outside of the Edebug debugging buffer.) 18837for commands made outside of the Edebug debugging buffer.)
18971 18838
18972@item 18839@item
@@ -19205,105 +19072,6 @@ five six seven
19205You can substitute the other regular expressions shown above in the 19072You can substitute the other regular expressions shown above in the
19206function definition and try each of them on this list. 19073function 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
19218as of GNU Emacs 22, this no longer seems to be the case
19219with yank yank-pop
19220
19221guts of rotate-yank-pointer moved to current-kill
19222in 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
19227critical 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
19272rotate-yank-pointer has
19273
19274reformatted:
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
19283originally
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
192981992-05-21 Jim Blandy (jimb@pogo.cs.oberlin.edu)
19299simple.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
19340command, @kbd{C-k} (@code{kill-line}), will not remove the text, 19108command, @kbd{C-k} (@code{kill-line}), will not remove the text,
19341merely copy it to the kill ring. However, your machine may beep at 19109merely copy it to the kill ring. However, your machine may beep at
19342you. Alternatively, for silence, you may copy the region of each line 19110you. (@code{kill-line} calls @code{kill-region}.) Alternatively, for
19343with the @kbd{M-w} (@code{kill-ring-save}) command. You must mark 19111silence, you may copy the region of each line with the @kbd{M-w}
19344each 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
19345end you put point or mark.) 19113command to succeed, but it does not matter at which end you put point
19114or mark.)
19115
19116@ignore
19117@c texi2dvi fails when the name of the section is within ifnottex ...
19118For a discussion of how @code{condition-case} deals with error, see
19119@ref{Complete kill-region, , The Complete @code{kill-region}
19120Definition}.
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
19494is not for copying within this instance of GNU Emacs. Most window 19270is not for copying within this instance of GNU Emacs. Most window
19495systems provide a facility for interprogram pasting. Sadly, that 19271systems provide a facility for interprogram pasting. Sadly, that
19496facility usually provides only for the lasted element. Most windowing 19272facility usually provides only for the lasted element. Most windowing
19497systems have not adopted a ring of many possiblities, even though 19273systems have not adopted a ring of many possibilities, even though
19498Emacs has provided it for decades. 19274Emacs has provided it for decades.
19499 19275
19500The @code{if} expression has two parts, one if there exists 19276The @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
19562list, the first element of which is returned even if the 19338list, 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
19675We can guess what the @code{-} function does. It is like @code{+} but 19450We can guess what the @code{-} function does. It is like @code{+} but
19676substracts instead of adds; the @code{-} function subtracts its second 19451subtracts instead of adds; the @code{-} function subtracts its second
19677argument from its first. Also, we already know what the @code{length} 19452argument from its first. Also, we already know what the @code{length}
19678function does (@pxref{length}). It returns the length of a list. 19453function 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
19716Incidently, both @code{kill-ring} and @code{kill-ring-yank-pointer} 19491Incidentally, both @code{kill-ring} and @code{kill-ring-yank-pointer}
19717are @dfn{global variables}. That means that any expression in Emacs 19492are @dfn{global variables}. That means that any expression in Emacs
19718Lisp can access them. They are not like the local variables set by 19493Lisp 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.
19720argument list (@pxref{defun, , The @code{defun} Special Form}). Local 19495Local variables can only be accessed
19721variables can only be accessed within the @code{let} that defines them 19496within the @code{let} that defines them or the function that specifies
19722or the function that specifies them in an argument list (and within 19497them in an argument list (and within expressions called by them).
19723expressions 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
19803The last part of the function tells what to do when it succeeds. 19583The 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
22322that lists free books available from other publishers:@* 22100that 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