[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lispintro/emacs-lisp-intro.texi,v
From: |
Robert J. Chassell |
Subject: |
[Emacs-diffs] Changes to emacs/lispintro/emacs-lisp-intro.texi,v |
Date: |
Thu, 09 Nov 2006 17:04:49 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Robert J. Chassell <bob> 06/11/09 17:04:48
Index: emacs-lisp-intro.texi
===================================================================
RCS file: /cvsroot/emacs/emacs/lispintro/emacs-lisp-intro.texi,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -b -r1.55 -r1.56
--- emacs-lisp-intro.texi 6 Nov 2006 15:08:45 -0000 1.55
+++ emacs-lisp-intro.texi 9 Nov 2006 17:04:48 -0000 1.56
@@ -24,8 +24,8 @@
@comment %**end of header
address@hidden edition-number 3.06
address@hidden update-date 6 November 2006
address@hidden edition-number 3.07
address@hidden update-date 9 November 2006
@ignore
## Summary of shell commands to create various output formats:
@@ -34,54 +34,66 @@
## pushd /u/intro/
## Info output
- # makeinfo --no-split --paragraph-indent=0 --verbose emacs-lisp-intro.texi
makeinfo --paragraph-indent=0 --verbose emacs-lisp-intro.texi
- ## ;; (progn (when (bufferp (get-buffer "*info*")) (kill-buffer "*info*"))
(info "../info/eintr"))
+ ## ;; (progn (when (bufferp (get-buffer "*info*")) (kill-buffer
"*info*")) (info "/usr/local/src/emacs/info/eintr"))
## DVI output
texi2dvi emacs-lisp-intro.texi
- ## View DVI output; see below also
- # xdvi -margins 24pt -topmargin 4pt -offsets 24pt -geometry 760x1140 -s
5 -useTeXpages -mousemode 1 emacs-lisp-intro.dvi &
+ ## xdvi -margins 24pt -topmargin 4pt -offsets 24pt -geometry 760x1140 -s
5 -useTeXpages -mousemode 1 emacs-lisp-intro.dvi &
## HTML output
makeinfo --html --no-split --verbose emacs-lisp-intro.texi
+ ## galeon emacs-lisp-intro.html
+
## Plain text output
makeinfo --fill-column=70 --no-split --paragraph-indent=0 \
--verbose --no-headers --output=emacs-lisp-intro.txt emacs-lisp-intro.texi
- ## DocBook output
- makeinfo --docbook --no-split --paragraph-indent=0 \
- --verbose emacs-lisp-intro.texi
+ popd
- ## XML output
- makeinfo --xml --no-split --paragraph-indent=0 \
- --verbose emacs-lisp-intro.texi
+# as user `root'
+# insert thumbdrive
+ mtusb # mount -v -t ext3 /dev/sda /mnt
+ cp -v /u/intro/emacs-lisp-intro.texi /mnt/backup/intro/emacs-lisp-intro.texi
+ umtusb # umount -v /mnt
+# remove thumbdrive
- popd
+ ## Other shell commands
- #### (You must be in the same directory as the viewed file.)
+ pushd /usr/local/src/emacs/lispintro/
+ ## pushd /u/intro/
- ## View DVI output
- xdvi emacs-lisp-intro.dvi &
+ ## PDF
+ texi2dvi --pdf emacs-lisp-intro.texi
+ # xpdf emacs-lisp-intro.pdf &
- ## View HTML output
- galeon emacs-lisp-intro.html
+ ## DocBook -- note file extension
+ makeinfo --docbook --no-split --paragraph-indent=0 \
+ --verbose --output=emacs-lisp-intro.docbook emacs-lisp-intro.texi
- ## View Info output with standalone reader
- info emacs-lisp-intro.info
+ ## XML with a Texinfo DTD -- note file extension
+ makeinfo --xml --no-split --paragraph-indent=0 \
+ --verbose --output=emacs-lisp-intro.texinfoxml emacs-lisp-intro.texi
- ## popd
+ ## PostScript (needs DVI)
+ # gv emacs-lisp-intro.ps &
+ # Create DVI if we lack it
+ # texi2dvi emacs-lisp-intro.texi
+ dvips emacs-lisp-intro.dvi -o emacs-lisp-intro.ps
+
+ ## RTF (needs HTML)
+ # Use OpenOffice to view RTF
+ # Create HTML if we lack it
+ # makeinfo --no-split --html emacs-lisp-intro.texi
+ /usr/local/src/html2rtf.pl emacs-lisp-intro.html
+ ## LaTeX (needs RTF)
+ /usr/bin/rtf2latex emacs-lisp-intro.rtf
-# as user `root'
-# insert thumbdrive
- mtusb # mount -v -t ext3 /dev/sda /mnt
- cp -v /u/intro/emacs-lisp-intro.texi /mnt/backup/intro/emacs-lisp-intro.texi
- umtusb # umount -v /mnt
-# remove thumbdrive
+ popd
@end ignore
@@ -381,6 +393,7 @@
Evaluation
+* How the Interpreter Acts:: Returns and Side Effects...
* Evaluating Inner Lists:: Lists within lists...
Variables
@@ -614,9 +627,10 @@
* Loop Example:: A @code{while} loop that uses a list.
* print-elements-of-list:: Uses @code{while}, @code{car}, @code{cdr}.
* Incrementing Loop:: A loop with an incrementing counter.
+* Incrementing Loop Details::
* Decrementing Loop:: A loop with a decrementing counter.
-A Loop with an Incrementing Counter
+Details of an Incrementing Loop
* Incrementing Example:: Counting pebbles in a triangle.
* Inc Example parts:: The parts of the function definition.
@@ -709,6 +723,7 @@
Prepare the Data for Display in a Graph
+* Data for Display in Detail::
* Sorting:: Sorting lists.
* Files List:: Making a list of files.
* Counting function definitions::
@@ -749,6 +764,7 @@
Handling the Kill Ring
+* What the Kill Ring Does::
* current-kill::
* yank:: Paste a copy of a clipped element.
* yank-pop:: Insert element pointed to.
@@ -760,6 +776,7 @@
@code{current-kill} in Outline
+* Body of current-kill::
* Digression concerning error:: How to mislead humans, but not computers.
* Determining the Element::
@@ -773,6 +790,7 @@
The @code{print-Y-axis} Function
+* print-Y-axis in Detail::
* Height of label:: What height for the Y axis?
* Compute a Remainder:: How to compute the remainder of a division.
* Y Axis Element:: Construct a line for the Y axis.
@@ -1626,6 +1644,17 @@
value or amount of; to appraise', according to @cite{Webster's New
Collegiate Dictionary}.
address@hidden
+* How the Interpreter Acts::
+* Evaluating Inner Lists::
address@hidden menu
+
address@hidden How the Interpreter Acts, Evaluating Inner Lists, Evaluation,
Evaluation
address@hidden
address@hidden How the Lisp Interpreter Acts
address@hidden ifnottex
+
address@hidden @samp{returned value} explained
After evaluating an expression, the Lisp interpreter will most likely
@dfn{return} the value that the computer produces by carrying out the
instructions it found in the function definition, or perhaps it will
@@ -1647,11 +1676,7 @@
Lisp interpreter to return a value and perhaps carry out a side effect;
or else produce an error.
address@hidden
-* Evaluating Inner Lists::
address@hidden menu
-
address@hidden Evaluating Inner Lists, , Evaluation, Evaluation
address@hidden Evaluating Inner Lists, , How the Interpreter Acts, Evaluation
@comment node-name, next, previous, up
@subsection Evaluating Inner Lists
@cindex Inner list evaluation
@@ -4501,24 +4526,12 @@
@smallexample
@group
-(if (string-equal
- (number-to-string 22)
- (substring (emacs-version) 10 12))
+(if (= 22 emacs-major-version)
(message "This is version 22 Emacs")
(message "This is not version 22 Emacs"))
@end group
@end smallexample
address@hidden equal
address@hidden eq
-Test whether two objects are the same. @code{equal} uses one meaning
-of the word `same' and @code{eq} uses another: @code{equal} returns
-true if the two objects have a similar structure and contents, such as
-two copies of the same book. On the other hand, @code{eq}, returns
-true if both arguments are actually the same object.
address@hidden equal
address@hidden eq
-
@need 1250
@item <
@itemx >
@@ -4537,6 +4550,18 @@
The @code{=} function tests whether two arguments, both numbers or
markers, are equal.
address@hidden 1250
address@hidden equal
address@hidden eq
+Test whether two objects are the same. @code{equal} uses one meaning
+of the word `same' and @code{eq} uses another: @code{equal} returns
+true if the two objects have a similar structure and contents, such as
+two copies of the same book. On the other hand, @code{eq}, returns
+true if both arguments are actually the same object.
address@hidden equal
address@hidden eq
+
address@hidden 1250
@item string<
@itemx string-lessp
@itemx string=
@@ -5660,7 +5685,7 @@
* if & or::
* Insert or::
* Insert let::
-* New insert-buffer ::
+* New insert-buffer::
@end menu
@node insert-buffer code, insert-buffer interactive, insert-buffer,
insert-buffer
@@ -5934,7 +5959,7 @@
(or (holding-on-to-guest) (find-and-take-arm-of-guest))
@end smallexample
address@hidden Insert let, New insert-buffer , Insert or, insert-buffer
address@hidden Insert let, New insert-buffer, Insert or, insert-buffer
@comment node-name, next, previous, up
@subsection The @code{let} Expression in @code{insert-buffer}
@@ -6033,7 +6058,7 @@
use @code{or}. All these functions are building blocks that we will
find and use again and again.
address@hidden New insert-buffer , , Insert let, insert-buffer
address@hidden New insert-buffer, , Insert let, insert-buffer
@comment node-name, next, previous, up
@subsection New Body for @code{insert-buffer}
@findex insert-buffer, new version body
@@ -6235,14 +6260,14 @@
@end smallexample
The true-or-false-test of this inner @code{if} expression checks the
-size of the buffer. The reason for this is that the old Version 18
-Emacs used numbers that are no bigger than eight million or so
-and in the computation that followed, the programmer feared that Emacs
-might try to use over-large numbers if the buffer were large. The
-term `overflow', mentioned in the comment, means numbers that are over
-large. Version 21 Emacs uses larger numbers, but this code has not
-been touched, if only because people now look at buffers that are far,
-far larger than ever before.
+size of the buffer. The reason for this is that the old version 18
+Emacs used numbers that are no bigger than eight million or so and in
+the computation that followed, the programmer feared that Emacs might
+try to use over-large numbers if the buffer were large. The term
+`overflow', mentioned in the comment, means numbers that are over
+large. More recent versions of Emacs use larger numbers, but this
+code has not been touched, if only because people now look at buffers
+that are far, far larger than ever before.
There are two cases: if the buffer is large and if it is not.
@@ -10396,6 +10421,7 @@
* Loop Example::
* print-elements-of-list::
* Incrementing Loop::
+* Incrementing Loop Details::
* Decrementing Loop::
@end menu
@@ -10617,7 +10643,7 @@
@code{while} loop, and since @code{while} loops always return
@code{nil}, a @code{nil} is printed after the last element of the list.
address@hidden Incrementing Loop, Decrementing Loop, print-elements-of-list,
while
address@hidden Incrementing Loop, Incrementing Loop Details,
print-elements-of-list, while
@comment node-name, next, previous, up
@subsection A Loop with an Incrementing Counter
@@ -10628,15 +10654,21 @@
have a counter---an expression that counts how many times the loop
repeats itself.
-The test can be an expression such as @code{(< count desired-number)}
-which returns @code{t} for true if the value of @code{count} is less
-than the @code{desired-number} of repetitions and @code{nil} for false if
-the value of @code{count} is equal to or is greater than the
address@hidden The expression that increments the count can be
-a simple @code{setq} such as @code{(setq count (1+ count))}, where
address@hidden Incrementing Loop Details, Decrementing Loop, Incrementing Loop,
while
address@hidden
address@hidden Details of an Incrementing Loop
address@hidden ifnottex
+
+The test for a loop with an incrementing counter can be an expression
+such as @code{(< count desired-number)} which returns @code{t} for
+true if the value of @code{count} is less than the
address@hidden of repetitions and @code{nil} for false if the
+value of @code{count} is equal to or is greater than the
address@hidden The expression that increments the count can
+be a simple @code{setq} such as @code{(setq count (1+ count))}, where
@code{1+} is a built-in function in Emacs Lisp that adds 1 to its
-argument. (The expression @address@hidden(1+ count)}} has the same result as
address@hidden@code{(+ count 1)}}, but is easier for a human to read.)
+argument. (The expression @address@hidden(1+ count)}} has the same result
+as @address@hidden(+ count 1)}}, but is easier for a human to read.)
@need 1250
The template for a @code{while} loop controlled by an incrementing
@@ -10661,7 +10693,7 @@
* Inc Example altogether::
@end menu
address@hidden Incrementing Example, Inc Example parts, Incrementing Loop,
Incrementing Loop
address@hidden Incrementing Example, Inc Example parts, Incrementing Loop
Details, Incrementing Loop Details
@unnumberedsubsubsec Example with incrementing counter
Suppose you are playing on the beach and decide to make a triangle of
@@ -10728,7 +10760,7 @@
complex loop the repetitive action might not be so simple, but it will
be simpler than doing everything all at once.
address@hidden Inc Example parts, Inc Example altogether, Incrementing Example,
Incrementing Loop
address@hidden Inc Example parts, Inc Example altogether, Incrementing Example,
Incrementing Loop Details
@unnumberedsubsubsec The parts of the function definition
The preceding analysis gives us the bones of our function definition:
@@ -10822,7 +10854,7 @@
(setq row-number (1+ row-number))
@end smallexample
address@hidden Inc Example altogether, , Inc Example parts, Incrementing Loop
address@hidden Inc Example altogether, , Inc Example parts, Incrementing Loop
Details
@unnumberedsubsubsec Putting the function definition together
We have created the parts for the function definition; now we need to
@@ -10932,7 +10964,7 @@
The sum of the first four numbers is 10 and the sum of the first seven
numbers is 28.
address@hidden Decrementing Loop, , Incrementing Loop, while
address@hidden Decrementing Loop, , Incrementing Loop Details, while
@comment node-name, next, previous, up
@subsection Loop with a Decrementing Counter
@@ -15517,7 +15549,7 @@
the @file{*scratch*} buffer, edit them, and then evaluate them.
The results are shown after the @address@hidden (These results are
-for files from Emacs Version 22.1.1; files from other versions of
+for files from Emacs version 22.1.1; files from other versions of
Emacs may produce different results.)
@c !!! 22.1.1 lisp sources location here
@@ -15569,6 +15601,18 @@
of defuns within each range of lengths, and produce a list of those
numbers.
address@hidden
+* Data for Display in Detail::
+* Sorting::
+* Files List::
+* Counting function definitions::
address@hidden menu
+
address@hidden Data for Display in Detail, Sorting, Prepare the data, Prepare
the data
address@hidden
address@hidden The Data for Display in Detail
address@hidden ifnottex
+
Based on what we have done before, we can readily foresee that it
should not be too hard to write a function that address@hidden' down the
lengths' list, looks at each element, determines which length range it
@@ -15583,13 +15627,7 @@
number, and thereby determine the largest and smallest length range
that we will need.
address@hidden
-* Sorting::
-* Files List::
-* Counting function definitions::
address@hidden menu
-
address@hidden Sorting, Files List, Prepare the data, Prepare the data
address@hidden Sorting, Files List, Data for Display in Detail, Prepare the data
@subsection Sorting Lists
@findex sort
@@ -17764,12 +17802,12 @@
load that function's file with a @code{load} expression in your
@file{.emacs} file.
-In my @file{.emacs} file for Emacs version 22, I load 14 libraries
-that contain functions that would otherwise be autoloaded. (Actually,
-it would have been better to include these files in my `dumped' Emacs,
-but I forgot. @xref{Building Emacs, , Building Emacs, elisp, The GNU
-Emacs Lisp Reference Manual}, and the @file{INSTALL} file for more
-about dumping.)
+In my @file{.emacs} file, I load 14 libraries that contain functions
+that would otherwise be autoloaded. (Actually, it would have been
+better to include these files in my `dumped' Emacs, but I forgot.
address@hidden Emacs, , Building Emacs, elisp, The GNU Emacs Lisp
+Reference Manual}, and the @file{INSTALL} file for more about
+dumping.)
You may also want to include autoloaded expressions in your @file{.emacs}
file. @code{autoload} is a built-in function that takes up to five
@@ -17923,6 +17961,21 @@
@end group
@end smallexample
address@hidden 1250
+Alternatively, since @code{blink-cursor-mode} has existed since Emacs
+version 21 and is likely to continue, you could write
+
address@hidden
address@hidden
+(when (>= emacs-major-version 21)
+ (blink-cursor-mode 0)
address@hidden group
address@hidden smallexample
+
address@hidden
+and add other expressions, too.
+
+
@node X11 Colors, Miscellaneous, Simple Extension, Emacs Initialization
@section X11 Colors
@@ -19093,6 +19146,19 @@
both the @code{yank} and the @code{yank-pop} commands, but first,
consider the workings of the kill ring.
address@hidden
+* What the Kill Ring Does::
+* current-kill::
+* yank::
+* yank-pop::
+* ring file::
address@hidden menu
+
address@hidden What the Kill Ring Does, current-kill, Kill Ring, Kill Ring
address@hidden
address@hidden What the Kill Ring Does
address@hidden ifnottex
+
@need 1250
The kill ring has a default maximum length of sixty items; this number
is too large for an explanation. Instead, set it to four. Please
@@ -19163,14 +19229,7 @@
(setq kill-ring-max old-kill-ring-max)
@end smallexample
address@hidden
-* current-kill::
-* yank::
-* yank-pop::
-* ring file::
address@hidden menu
-
address@hidden current-kill, yank, Kill Ring, Kill Ring
address@hidden current-kill, yank, What the Kill Ring Does, Kill Ring
@comment node-name, next, previous, up
@appendixsec The @code{current-kill} Function
@findex current-kill
@@ -19183,6 +19242,17 @@
@code{copy-region-as-kill}, @code{kill-ring-save}, @code{kill-line},
and @code{kill-region}.)
address@hidden
+* Code for current-kill::
+* Understanding current-kill::
address@hidden menu
+
address@hidden Code for current-kill, Understanding current-kill, current-kill,
current-kill
address@hidden
address@hidden The code for @code{current-kill}
address@hidden ifnottex
+
+
@need 1500
The @code{current-kill} function is used by @code{yank} and by
@code{yank-pop}. Here is the code for @code{current-kill}:
@@ -19238,11 +19308,7 @@
(setq kill-ring-yank-pointer kill-ring)
@end smallexample
address@hidden
-* Understanding current-kill::
address@hidden menu
-
address@hidden Understanding current-kill, , current-kill, current-kill
address@hidden Understanding current-kill, , Code for current-kill,
current-kill
@ifnottex
@unnumberedsubsec @code{current-kill} in Outline
@end ifnottex
@@ -19263,6 +19329,17 @@
This function takes two arguments, one of which is optional. It has a
documentation string. It is @emph{not} interactive.
address@hidden
+* Body of current-kill::
+* Digression concerning error::
+* Determining the Element::
address@hidden menu
+
address@hidden Body of current-kill, Digression concerning error, Understanding
current-kill, Understanding current-kill
address@hidden
address@hidden The Body of @code{current-kill}
address@hidden ifnottex
+
The body of the function definition is a @code{let} expression, which
itself has a body as well as a @var{varlist}.
@@ -19341,12 +19418,7 @@
list. Finally, another expression returns the first element of the
list even if the @code{do-not-move} argument is true.
address@hidden
-* Digression concerning error::
-* Determining the Element ::
address@hidden menu
-
address@hidden Digression concerning error, Determining the Element ,
Understanding current-kill, Understanding current-kill
address@hidden Digression concerning error, Determining the Element, Body of
current-kill, Understanding current-kill
@ifnottex
@unnumberedsubsubsec Digression about the word `error'
@end ifnottex
@@ -19368,7 +19440,7 @@
takes the same steps as it does when there is an `error', a term such as
`cancel' would have a clearer connotation.
address@hidden Determining the Element , , Digression concerning error,
Understanding current-kill
address@hidden Determining the Element, , Digression concerning error,
Understanding current-kill
@ifnottex
@unnumberedsubsubsec Determining the Element
@end ifnottex
@@ -19850,6 +19922,20 @@
The function should be passed the height of the graph, and then should
construct and insert the appropriate numbers and marks.
address@hidden
+* print-Y-axis in Detail::
+* Height of label::
+* Compute a Remainder::
+* Y Axis Element::
+* Y-axis-column::
+* print-Y-axis Penultimate::
address@hidden menu
+
address@hidden print-Y-axis in Detail, Height of label, print-Y-axis,
print-Y-axis
address@hidden
address@hidden The @code{print-Y-axis} Function in Detail
address@hidden ifnottex
+
It is easy enough to see in the figure what the Y axis label should
look like; but to say in words, and then to write a function
definition to do the job is another matter. It is not quite true to
@@ -19861,15 +19947,7 @@
the fifth line from the bottom and on every line that is a multiple of
five.
address@hidden
-* Height of label::
-* Compute a Remainder::
-* Y Axis Element::
-* Y-axis-column::
-* print-Y-axis Penultimate::
address@hidden menu
-
address@hidden Height of label, Compute a Remainder, print-Y-axis, print-Y-axis
address@hidden Height of label, Compute a Remainder, print-Y-axis in Detail,
print-Y-axis
@ifnottex
@unnumberedsubsec What height should the label be?
@end ifnottex
- [Emacs-diffs] Changes to emacs/lispintro/emacs-lisp-intro.texi,v, Juri Linkov, 2006/11/01
- [Emacs-diffs] Changes to emacs/lispintro/emacs-lisp-intro.texi,v, Juri Linkov, 2006/11/01
- [Emacs-diffs] Changes to emacs/lispintro/emacs-lisp-intro.texi,v, Juri Linkov, 2006/11/01
- [Emacs-diffs] Changes to emacs/lispintro/emacs-lisp-intro.texi,v, Robert J. Chassell, 2006/11/02
- [Emacs-diffs] Changes to emacs/lispintro/emacs-lisp-intro.texi,v, Robert J. Chassell, 2006/11/04
- [Emacs-diffs] Changes to emacs/lispintro/emacs-lisp-intro.texi,v, Robert J. Chassell, 2006/11/04
- [Emacs-diffs] Changes to emacs/lispintro/emacs-lisp-intro.texi,v, Robert J. Chassell, 2006/11/05
- [Emacs-diffs] Changes to emacs/lispintro/emacs-lisp-intro.texi,v, Robert J. Chassell, 2006/11/05
- [Emacs-diffs] Changes to emacs/lispintro/emacs-lisp-intro.texi,v, Robert J. Chassell, 2006/11/05
- [Emacs-diffs] Changes to emacs/lispintro/emacs-lisp-intro.texi,v, Robert J. Chassell, 2006/11/06
- [Emacs-diffs] Changes to emacs/lispintro/emacs-lisp-intro.texi,v,
Robert J. Chassell <=
- [Emacs-diffs] Changes to emacs/lispintro/emacs-lisp-intro.texi,v, Robert J. Chassell, 2006/11/09
- [Emacs-diffs] Changes to emacs/lispintro/emacs-lisp-intro.texi,v, Andreas Schwab, 2006/11/27