[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r108412: * doc/lispintro/emacs-lisp-i
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r108412: * doc/lispintro/emacs-lisp-intro.texi: Nuke hand-written node pointers. |
Date: |
Mon, 28 May 2012 17:53:40 -0700 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 108412
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Mon 2012-05-28 17:53:40 -0700
message:
* doc/lispintro/emacs-lisp-intro.texi: Nuke hand-written node pointers.
(dolist, dotimes): Fix sectioning.
modified:
doc/lispintro/ChangeLog
doc/lispintro/emacs-lisp-intro.texi
=== modified file 'doc/lispintro/ChangeLog'
--- a/doc/lispintro/ChangeLog 2012-05-12 00:57:48 +0000
+++ b/doc/lispintro/ChangeLog 2012-05-29 00:53:40 +0000
@@ -1,3 +1,8 @@
+2012-05-29 Glenn Morris <address@hidden>
+
+ * emacs-lisp-intro.texi: Nuke hand-written node pointers.
+ (dolist, dotimes): Fix sectioning.
+
2012-05-12 Glenn Morris <address@hidden>
* Makefile.in (MKDIR_P): New, set by configure.
=== modified file 'doc/lispintro/emacs-lisp-intro.texi'
--- a/doc/lispintro/emacs-lisp-intro.texi 2012-05-09 03:06:08 +0000
+++ b/doc/lispintro/emacs-lisp-intro.texi 2012-05-29 00:53:40 +0000
@@ -315,7 +315,7 @@
@contents
@ifnottex
address@hidden Top, Preface, (dir), (dir)
address@hidden Top
@top An Introduction to Programming in Emacs Lisp
@insertcopying
@@ -829,8 +829,7 @@
@end detailmenu
@end menu
address@hidden Preface, List Processing, Top, Top
address@hidden node-name, next, previous, up
address@hidden Preface
@unnumbered Preface
Most of the GNU Emacs integrated environment is written in the programming
@@ -858,8 +857,8 @@
* Thank You::
@end menu
address@hidden Why, On Reading this Text, Preface, Preface
@ifnottex
address@hidden Why
@unnumberedsec Why Study Emacs Lisp?
@end ifnottex
@@ -873,8 +872,7 @@
fundamentals of programming, and more importantly, to show you how you
can teach yourself to go further.
address@hidden On Reading this Text, Who You Are, Why, Preface
address@hidden node-name, next, previous, up
address@hidden On Reading this Text
@unnumberedsec On Reading this Text
All through this document, you will see little sample programs you can
@@ -924,8 +922,7 @@
something new. This self-reliance is not only a pleasure, but an
advantage.
address@hidden Who You Are, Lisp History, On Reading this Text, Preface
address@hidden node-name, next, previous, up
address@hidden Who You Are
@unnumberedsec For Whom This is Written
This text is written as an elementary introduction for people who are
@@ -987,7 +984,7 @@
@cite{Introduction}, you will find the @cite{Reference Manual} useful
when you are writing your own programs.
address@hidden Lisp History, Note for Novices, Who You Are, Preface
address@hidden Lisp History
@unnumberedsec Lisp History
@cindex Lisp history
@@ -1004,8 +1001,7 @@
Lisp. (The standard Emacs distribution contains an optional extensions
file, @file{cl.el}, that adds many Common Lisp features to Emacs Lisp.)
address@hidden Note for Novices, Thank You, Lisp History, Preface
address@hidden node-name, next, previous, up
address@hidden Note for Novices
@unnumberedsec A Note for Novices
If you don't know GNU Emacs, you can still read this document
@@ -1052,8 +1048,7 @@
referring to the various dialects of Lisp in general, but when I speak
of Emacs Lisp, I am referring to GNU Emacs Lisp in particular.
address@hidden Thank You, , Note for Novices, Preface
address@hidden node-name, next, previous, up
address@hidden Thank You
@unnumberedsec Thank You
My thanks to all who helped me with this book. My especial thanks to
@@ -1099,8 +1094,7 @@
@address@hidden = 1
@end iftex
address@hidden List Processing, Practicing Evaluation, Preface, Top
address@hidden node-name, next, previous, up
address@hidden List Processing
@chapter List Processing
To the untutored eye, Lisp is a strange programming language. In Lisp
@@ -1129,8 +1123,7 @@
* Error Message Exercises::
@end menu
address@hidden Lisp Lists, Run a Program, List Processing, List Processing
address@hidden node-name, next, previous, up
address@hidden Lisp Lists
@section Lisp Lists
@cindex Lisp Lists
@@ -1161,8 +1154,8 @@
* Typing Lists:: How GNU Emacs helps you type lists.
@end menu
address@hidden Numbers Lists, Lisp Atoms, Lisp Lists, Lisp Lists
@ifnottex
address@hidden Numbers Lists
@unnumberedsubsec Numbers, Lists inside of Lists
@end ifnottex
@@ -1190,8 +1183,7 @@
list is made up of the words @samp{a}, @samp{list}, @samp{inside},
@samp{of}, @samp{it}.
address@hidden Lisp Atoms, Whitespace in Lists, Numbers Lists, Lisp Lists
address@hidden node-name, next, previous, up
address@hidden Lisp Atoms
@subsection Lisp Atoms
@cindex Lisp Atoms
@@ -1271,8 +1263,7 @@
Strings are a different kind of atom than numbers or symbols and are
used differently.
address@hidden Whitespace in Lists, Typing Lists, Lisp Atoms, Lisp Lists
address@hidden node-name, next, previous, up
address@hidden Whitespace in Lists
@subsection Whitespace in Lists
@cindex Whitespace in lists
@@ -1312,8 +1303,7 @@
(For certain situations, square brackets, dots and a few other special
characters may be used; however, we will go quite far without them.)
address@hidden Typing Lists, , Whitespace in Lists, Lisp Lists
address@hidden node-name, next, previous, up
address@hidden Typing Lists
@subsection GNU Emacs Helps You Type Lists
@cindex Help typing lists
@cindex Formatting help
@@ -1335,8 +1325,7 @@
parenthesis. (@xref{Major Modes, , Major Modes, emacs, The GNU Emacs
Manual}, for more information about Emacs's modes.)
address@hidden Run a Program, Making Errors, Lisp Lists, List Processing
address@hidden node-name, next, previous, up
address@hidden Run a Program
@section Run a Program
@cindex Run a program
@cindex Program, running one
@@ -1398,8 +1387,7 @@
But before discussing this (@pxref{Variables}), we will discuss what the
Lisp interpreter does when you make an error.
address@hidden Making Errors, Names & Definitions, Run a Program, List
Processing
address@hidden node-name, next, previous, up
address@hidden Making Errors
@section Generate an Error Message
@cindex Generate an error message
@cindex Error message generation
@@ -1549,8 +1537,7 @@
definition is void:@: this}. The symbol (that is, the word
@samp{this}) lacks instructions for the computer to carry out.
address@hidden Names & Definitions, Lisp Interpreter, Making Errors, List
Processing
address@hidden node-name, next, previous, up
address@hidden Names & Definitions
@section Symbol Names and Function Definitions
@cindex Symbol names
@@ -1584,8 +1571,7 @@
@samp{texinfo-} and those for functions that deal with reading mail
start with @samp{rmail-}.
address@hidden Lisp Interpreter, Evaluation, Names & Definitions, List
Processing
address@hidden node-name, next, previous, up
address@hidden Lisp Interpreter
@section The Lisp Interpreter
@cindex Lisp interpreter, what it does
@cindex Interpreter, what it does
@@ -1610,8 +1596,8 @@
* Byte Compiling:: Specially processing code for speed.
@end menu
address@hidden Complications, Byte Compiling, Lisp Interpreter, Lisp Interpreter
@ifnottex
address@hidden Complications
@unnumberedsubsec Complications
@end ifnottex
@@ -1642,7 +1628,7 @@
Otherwise, the interpreter works left to right, from one expression to
the next.
address@hidden Byte Compiling, , Complications, Lisp Interpreter
address@hidden Byte Compiling
@subsection Byte Compiling
@cindex Byte compiling
@@ -1665,8 +1651,7 @@
The GNU Emacs Lisp Reference Manual}, for a full description of byte
compilation.
address@hidden Evaluation, Variables, Lisp Interpreter, List Processing
address@hidden node-name, next, previous, up
address@hidden Evaluation
@section Evaluation
@cindex Evaluation
@@ -1682,8 +1667,8 @@
* Evaluating Inner Lists:: Lists within lists...
@end menu
address@hidden How the Interpreter Acts, Evaluating Inner Lists, Evaluation,
Evaluation
@ifnottex
address@hidden How the Interpreter Acts
@unnumberedsubsec How the Lisp Interpreter Acts
@end ifnottex
@@ -1709,8 +1694,7 @@
Lisp interpreter to return a value and perhaps carry out a side effect;
or else produce an error.
address@hidden Evaluating Inner Lists, , How the Interpreter Acts, Evaluation
address@hidden node-name, next, previous, up
address@hidden Evaluating Inner Lists
@subsection Evaluating Inner Lists
@cindex Inner list evaluation
@cindex Evaluating inner lists
@@ -1773,8 +1757,7 @@
symbol by itself is evaluated, something different happens, as we will
see in the next section.
address@hidden Variables, Arguments, Evaluation, List Processing
address@hidden node-name, next, previous, up
address@hidden Variables
@section Variables
@cindex Variables
@@ -1813,8 +1796,8 @@
* Void Variable:: The error message for a symbol without a value.
@end menu
address@hidden fill-column Example, Void Function, Variables, Variables
@ifnottex
address@hidden fill-column Example
@unnumberedsubsec @code{fill-column}, an Example Variable
@end ifnottex
@@ -1851,8 +1834,7 @@
Setting the Value of a Variable}, for information about one way to do
this.
address@hidden Void Function, Void Variable, fill-column Example, Variables
address@hidden node-name, next, previous, up
address@hidden Void Function
@subsection Error Message for a Symbol Without a Function
@cindex Symbol without function error
@cindex Error for symbol without function
@@ -1904,8 +1886,7 @@
another key.)
@end ignore
address@hidden Void Variable, , Void Function, Variables
address@hidden node-name, next, previous, up
address@hidden Void Variable
@subsection Error Message for a Symbol Without a Value
@cindex Symbol without value error
@cindex Error for symbol without value
@@ -1971,8 +1952,7 @@
The meaning is the same as in GNU Emacs 22.
@end ignore
address@hidden Arguments, set & setq, Variables, List Processing
address@hidden node-name, next, previous, up
address@hidden Arguments
@section Arguments
@cindex Arguments
@cindex Passing information to functions
@@ -2025,8 +2005,7 @@
* message:: A useful function for sending messages.
@end menu
address@hidden Data types, Args as Variable or List, Arguments, Arguments
address@hidden node-name, next, previous, up
address@hidden Data types
@subsection Arguments' Data Types
@cindex Data types
@cindex Types of data
@@ -2080,8 +2059,7 @@
a substring from an argument that is a string, not from another type of
atom such as a number or symbol.
address@hidden Args as Variable or List, Variable Number of Arguments, Data
types, Arguments
address@hidden node-name, next, previous, up
address@hidden Args as Variable or List
@subsection An Argument as the Value of a Variable or List
An argument can be a symbol that returns a value when it is evaluated.
@@ -2122,8 +2100,7 @@
integer that the addition function returns to a string.
@code{number-to-string} is also known as @code{int-to-string}.)
address@hidden Variable Number of Arguments, Wrong Type of Argument, Args as
Variable or List, Arguments
address@hidden node-name, next, previous, up
address@hidden Variable Number of Arguments
@subsection Variable Number of Arguments
@cindex Variable number of arguments
@cindex Arguments, variable number of
@@ -2167,8 +2144,7 @@
@end group
@end smallexample
address@hidden Wrong Type of Argument, message, Variable Number of Arguments,
Arguments
address@hidden node-name, next, previous, up
address@hidden Wrong Type of Argument
@subsection Using the Wrong Type Object as an Argument
@cindex Wrong type of argument
@cindex Argument, wrong type of
@@ -2262,8 +2238,7 @@
@file{*Backtrace*} buffer.
@end ignore
address@hidden message, , Wrong Type of Argument, Arguments
address@hidden node-name, next, previous, up
address@hidden message
@subsection The @code{message} Function
@findex message
@@ -2375,8 +2350,7 @@
message @code{"He saw 38 red foxes leaping."} appears in your echo
area.
address@hidden set & setq, Summary, Arguments, List Processing
address@hidden node-name, next, previous, up
address@hidden set & setq
@section Setting the Value of a Variable
@cindex Variable, setting value
@cindex Setting value of variable
@@ -2396,8 +2370,7 @@
* Counting:: Using @code{setq} to count.
@end menu
address@hidden Using set, Using setq, set & setq, set & setq
address@hidden node-name, next, previous, up
address@hidden Using set
@subsection Using @code{set}
@findex set
@@ -2453,8 +2426,7 @@
the value that was returned. There are situations where this is the
right thing for the function to do; but such situations are rare.)
address@hidden Using setq, Counting, Using set, set & setq
address@hidden node-name, next, previous, up
address@hidden Using setq
@subsection Using @code{setq}
@findex setq
@@ -2514,8 +2486,7 @@
specifically a list, attached to it; or, expressed another way,
the symbol is set to ``point'' to the list.
address@hidden Counting, , Using setq, set & setq
address@hidden node-name, next, previous, up
address@hidden Counting
@subsection Counting
@cindex Counting
@@ -2561,8 +2532,7 @@
@code{setq} which sets the variable @code{counter} to this new value.
Thus, the value of the variable, @code{counter}, is changed.
address@hidden Summary, Error Message Exercises, set & setq, List Processing
address@hidden node-name, next, previous, up
address@hidden Summary
@section Summary
Learning Lisp is like climbing a hill in which the first part is the
@@ -2624,8 +2594,7 @@
create a side effect.
@end itemize
address@hidden Error Message Exercises, , Summary, List Processing
address@hidden node-name, next, previous, up
address@hidden Error Message Exercises
@section Exercises
A few simple exercises:
@@ -2647,8 +2616,7 @@
evaluated.
@end itemize
address@hidden Practicing Evaluation, Writing Defuns, List Processing, Top
address@hidden node-name, next, previous, up
address@hidden Practicing Evaluation
@chapter Practicing Evaluation
@cindex Practicing evaluation
@cindex Evaluation practice
@@ -2673,8 +2641,8 @@
* Evaluation Exercise::
@end menu
address@hidden How to Evaluate, Buffer Names, Practicing Evaluation, Practicing
Evaluation
@ifnottex
address@hidden How to Evaluate
@unnumberedsec How to Evaluate
@end ifnottex
@@ -2705,8 +2673,7 @@
functions makes clear the distinction between buffers and files, how to
switch to a buffer, and how to determine a location within it.
address@hidden Buffer Names, Getting Buffers, How to Evaluate, Practicing
Evaluation
address@hidden node-name, next, previous, up
address@hidden Buffer Names
@section Buffer Names
@findex buffer-name
@findex buffer-file-name
@@ -2831,8 +2798,7 @@
buffer you can edit; and when you write code or documentation (such as
this book), this feature is very useful.
address@hidden Getting Buffers, Switching Buffers, Buffer Names, Practicing
Evaluation
address@hidden node-name, next, previous, up
address@hidden Getting Buffers
@section Getting Buffers
@findex current-buffer
@findex other-buffer
@@ -2900,8 +2866,7 @@
will choose the most recent buffer that you cannot see; this is a
subtlety that I often forget.}.
address@hidden Switching Buffers, Buffer Size & Locations, Getting Buffers,
Practicing Evaluation
address@hidden node-name, next, previous, up
address@hidden Switching Buffers
@section Switching Buffers
@findex switch-to-buffer
@findex set-buffer
@@ -2990,8 +2955,7 @@
it---just as a plumber is an entity who can fix a leak if you call him
or her.
address@hidden Buffer Size & Locations, Evaluation Exercise, Switching Buffers,
Practicing Evaluation
address@hidden node-name, next, previous, up
address@hidden Buffer Size & Locations
@section Buffer Size and the Location of Point
@cindex Size of buffer
@cindex Buffer size
@@ -3058,14 +3022,13 @@
function @code{point-max} returns the value of the maximum permissible
value of point in the current buffer.
address@hidden Evaluation Exercise, , Buffer Size & Locations, Practicing
Evaluation
address@hidden Evaluation Exercise
@section Exercise
Find a file with which you are working and move towards its middle.
Find its buffer name, file name, length, and your position in the file.
address@hidden Writing Defuns, Buffer Walk Through, Practicing Evaluation, Top
address@hidden node-name, next, previous, up
address@hidden Writing Defuns
@chapter How To Write Function Definitions
@cindex Definition writing
@cindex Function definition writing
@@ -3095,8 +3058,8 @@
* defun Exercises::
@end menu
address@hidden Primitive Functions, defun, Writing Defuns, Writing Defuns
@ifnottex
address@hidden Primitive Functions
@unnumberedsec An Aside about Primitive Functions
@end ifnottex
@cindex Primitive functions
@@ -3121,8 +3084,7 @@
unless you investigate, you won't know whether an already-written
function is written in Emacs Lisp or C.
address@hidden defun, Install, Primitive Functions, Writing Defuns
address@hidden node-name, next, previous, up
address@hidden defun
@section The @code{defun} Special Form
@findex defun
@cindex Special form of @code{defun}
@@ -3294,8 +3256,7 @@
definition of the function. Installation is described in the next
section.
address@hidden Install, Interactive, defun, Writing Defuns
address@hidden node-name, next, previous, up
address@hidden Install
@section Install a Function Definition
@cindex Install a Function Definition
@cindex Definition installation
@@ -3332,8 +3293,8 @@
* Change a defun:: How to change a function definition.
@end menu
address@hidden Effect of installation, Change a defun, Install, Install
@ifnottex
address@hidden Effect of installation
@unnumberedsubsec The effect of installation
@end ifnottex
@@ -3363,8 +3324,7 @@
@noindent
(To return to a single window on your screen, type @kbd{C-x 1}.)
address@hidden Change a defun, , Effect of installation, Install
address@hidden node-name, next, previous, up
address@hidden Change a defun
@subsection Change a Function Definition
@cindex Changing a function definition
@cindex Function definition, how to change
@@ -3409,8 +3369,7 @@
function; install it; test it; and then make fixes or enhancements and
install it again.
address@hidden Interactive, Interactive Options, Install, Writing Defuns
address@hidden node-name, next, previous, up
address@hidden Interactive
@section Make a Function Interactive
@cindex Interactive functions
@findex interactive
@@ -3434,8 +3393,8 @@
* multiply-by-seven in detail:: The interactive version.
@end menu
address@hidden Interactive multiply-by-seven, multiply-by-seven in detail,
Interactive, Interactive
@ifnottex
address@hidden Interactive multiply-by-seven
@unnumberedsubsec An Interactive @code{multiply-by-seven}, An Overview
@end ifnottex
@@ -3490,8 +3449,7 @@
typing @kbd{C-u} and then a number, for example, @kbd{C-u 3 M-e} (if you
type @kbd{C-u} without a number, it defaults to 4).
address@hidden multiply-by-seven in detail, , Interactive multiply-by-seven,
Interactive
address@hidden node-name, next, previous, up
address@hidden multiply-by-seven in detail
@subsection An Interactive @code{multiply-by-seven}
Let's look at the use of the special form @code{interactive} and then at
@@ -3560,8 +3518,7 @@
function, @code{message} prints the text as a side effect without
quotes.)
address@hidden Interactive Options, Permanent Installation, Interactive,
Writing Defuns
address@hidden node-name, next, previous, up
address@hidden Interactive Options
@section Different Options for @code{interactive}
@cindex Options for @code{interactive}
@cindex Interactive options
@@ -3639,8 +3596,7 @@
elisp, The GNU Emacs Lisp Reference Manual}, for a more complete
explanation about this technique.
address@hidden Permanent Installation, let, Interactive Options, Writing Defuns
address@hidden node-name, next, previous, up
address@hidden Permanent Installation
@section Install Code Permanently
@cindex Install code permanently
@cindex Permanent code installation
@@ -3688,8 +3644,7 @@
others, it may be included in the next release of Emacs. In large
part, this is how Emacs has grown over the past years, by donations.
address@hidden let, if, Permanent Installation, Writing Defuns
address@hidden node-name, next, previous, up
address@hidden let
@section @code{let}
@findex let
@@ -3721,8 +3676,8 @@
* Uninitialized let Variables::
@end menu
address@hidden Prevent confusion, Parts of let Expression, let, let
@ifnottex
address@hidden Prevent confusion
@unnumberedsubsec @code{let} Prevents Confusion
@end ifnottex
@@ -3760,8 +3715,7 @@
Dictionary}). Since you evaluate an expression to perform an action,
`execute' has evolved as a synonym to `evaluate'.)
address@hidden Parts of let Expression, Sample let Expression, Prevent
confusion, let
address@hidden node-name, next, previous, up
address@hidden Parts of let Expression
@subsection The Parts of a @code{let} Expression
@cindex @code{let} expression, parts of
@cindex Parts of @code{let} expression
@@ -3809,8 +3763,7 @@
@end group
@end smallexample
address@hidden Sample let Expression, Uninitialized let Variables, Parts of let
Expression, let
address@hidden node-name, next, previous, up
address@hidden Sample let Expression
@subsection Sample @code{let} Expression
@cindex Sample @code{let} expression
@cindex @code{let} expression sample
@@ -3860,8 +3813,7 @@
value of the variable @code{tiger} is printed at the location of the
second @samp{%s}.
address@hidden Uninitialized let Variables, , Sample let Expression, let
address@hidden node-name, next, previous, up
address@hidden Uninitialized let Variables
@subsection Uninitialized Variables in a @code{let} Statement
@cindex Uninitialized @code{let} variables
@cindex @code{let} variables uninitialized
@@ -3909,8 +3861,7 @@
@samp{%s}.) The four variables as a group are put into a list to
delimit them from the body of the @code{let}.
address@hidden if, else, let, Writing Defuns
address@hidden node-name, next, previous, up
address@hidden if
@section The @code{if} Special Form
@findex if
@cindex Conditional with @code{if}
@@ -3932,8 +3883,8 @@
* type-of-animal in detail:: An example of an @code{if} expression.
@end menu
address@hidden if in more detail, type-of-animal in detail, if, if
@ifnottex
address@hidden if in more detail
@unnumberedsubsec @code{if} in more detail
@end ifnottex
@@ -4023,8 +3974,7 @@
when you evaluate @code{(type-of-animal 'zebra)} you will see @code{nil}
printed in the echo area.
address@hidden type-of-animal in detail, , if in more detail, if
address@hidden node-name, next, previous, up
address@hidden type-of-animal in detail
@subsection The @code{type-of-animal} Function in Detail
Let's look at the @code{type-of-animal} function in detail.
@@ -4111,8 +4061,7 @@
is not equal to @code{fierce}, so the then-part is not evaluated and
@code{nil} is returned by the @code{if} expression.
address@hidden else, Truth & Falsehood, if, Writing Defuns
address@hidden node-name, next, previous, up
address@hidden else
@section If--then--else Expressions
@cindex Else
@@ -4200,8 +4149,7 @@
possibility that some such argument will be tested by the @code{if}
and write your program accordingly.)
address@hidden Truth & Falsehood, save-excursion, else, Writing Defuns
address@hidden node-name, next, previous, up
address@hidden Truth & Falsehood
@section Truth and Falsehood in Emacs Lisp
@cindex Truth and falsehood in Emacs Lisp
@cindex Falsehood and truth in Emacs Lisp
@@ -4224,8 +4172,8 @@
* nil explained:: @code{nil} has two meanings.
@end menu
address@hidden nil explained, , Truth & Falsehood, Truth & Falsehood
@ifnottex
address@hidden nil explained
@unnumberedsubsec An explanation of @code{nil}
@end ifnottex
@@ -4288,8 +4236,7 @@
(> 4 5)
@end smallexample
address@hidden save-excursion, Review, Truth & Falsehood, Writing Defuns
address@hidden node-name, next, previous, up
address@hidden save-excursion
@section @code{save-excursion}
@findex save-excursion
@cindex Region, what it is
@@ -4313,8 +4260,8 @@
* Template for save-excursion::
@end menu
address@hidden Point and mark, Template for save-excursion, save-excursion,
save-excursion
@ifnottex
address@hidden Point and mark
@unnumberedsubsec Point and Mark
@end ifnottex
@@ -4371,8 +4318,7 @@
This is how @code{save-excursion} is used in @code{append-to-buffer}.
(@xref{append-to-buffer, , The Definition of @code{append-to-buffer}}.)
address@hidden Template for save-excursion, , Point and mark, save-excursion
address@hidden node-name, next, previous, up
address@hidden Template for save-excursion
@subsection Template for a @code{save-excursion} Expression
@need 800
@@ -4423,8 +4369,7 @@
@end group
@end smallexample
address@hidden Review, defun Exercises, save-excursion, Writing Defuns
address@hidden node-name, next, previous, up
address@hidden Review
@section Review
In the last few chapters we have introduced a fair number of functions
@@ -4677,7 +4622,7 @@
@end table
@need 1500
address@hidden defun Exercises, , Review, Writing Defuns
address@hidden defun Exercises
@section Exercises
@itemize @bullet
@@ -4691,8 +4636,7 @@
and if so, prints an appropriate message.
@end itemize
address@hidden Buffer Walk Through, More Complex, Writing Defuns, Top
address@hidden node-name, next, previous, up
address@hidden Buffer Walk Through
@chapter A Few Buffer--Related Functions
In this chapter we study in detail several of the functions used in GNU
@@ -4714,7 +4658,7 @@
* Buffer Exercises::
@end menu
address@hidden Finding More, simplified-beginning-of-buffer, Buffer Walk
Through, Buffer Walk Through
address@hidden Finding More
@section Finding More Information
@findex describe-function, @r{introduced}
@@ -4810,8 +4754,7 @@
@kbd{C-h p} command lets you search the standard Emacs Lisp libraries
by topic keywords.''
address@hidden simplified-beginning-of-buffer, mark-whole-buffer, Finding More,
Buffer Walk Through
address@hidden node-name, next, previous, up
address@hidden simplified-beginning-of-buffer
@section A Simplified @code{beginning-of-buffer} Definition
@findex simplified-beginning-of-buffer
@@ -4939,8 +4882,7 @@
function contains the expression @code{(goto-char (point-max))} in place
of @code{(goto-char (point-min))}.
address@hidden mark-whole-buffer, append-to-buffer,
simplified-beginning-of-buffer, Buffer Walk Through
address@hidden node-name, next, previous, up
address@hidden mark-whole-buffer
@section The Definition of @code{mark-whole-buffer}
@findex mark-whole-buffer
@@ -4959,8 +4901,8 @@
* Body of mark-whole-buffer:: Only three lines of code.
@end menu
address@hidden mark-whole-buffer overview, Body of mark-whole-buffer,
mark-whole-buffer, mark-whole-buffer
@ifnottex
address@hidden mark-whole-buffer overview
@unnumberedsubsec An overview of @code{mark-whole-buffer}
@end ifnottex
@@ -5006,8 +4948,7 @@
previous section.
@need 1250
address@hidden Body of mark-whole-buffer, , mark-whole-buffer overview,
mark-whole-buffer
address@hidden node-name, next, previous, up
address@hidden Body of mark-whole-buffer
@subsection Body of @code{mark-whole-buffer}
The body of the @code{mark-whole-buffer} function consists of three
@@ -5080,8 +5021,7 @@
is set at the end of the buffer. The whole buffer is, therefore, the
region.
address@hidden append-to-buffer, Buffer Related Review, mark-whole-buffer,
Buffer Walk Through
address@hidden node-name, next, previous, up
address@hidden append-to-buffer
@section The Definition of @code{append-to-buffer}
@findex append-to-buffer
@@ -5097,8 +5037,8 @@
* append save-excursion:: How the @code{save-excursion} works.
@end menu
address@hidden append-to-buffer overview, append interactive, append-to-buffer,
append-to-buffer
@ifnottex
address@hidden append-to-buffer overview
@unnumberedsubsec An Overview of @code{append-to-buffer}
@end ifnottex
@@ -5178,8 +5118,7 @@
Note that the documentation distinguishes between a buffer and its
name. (The function can handle either.)
address@hidden append interactive, append-to-buffer body, append-to-buffer
overview, append-to-buffer
address@hidden node-name, next, previous, up
address@hidden append interactive
@subsection The @code{append-to-buffer} Interactive Expression
Since the @code{append-to-buffer} function will be used interactively,
@@ -5247,8 +5186,7 @@
argument list (that is, @code{start} and @code{end}) to the values of
point and mark. That argument worked fine.)
address@hidden append-to-buffer body, append save-excursion, append
interactive, append-to-buffer
address@hidden node-name, next, previous, up
address@hidden append-to-buffer body
@subsection The Body of @code{append-to-buffer}
@ignore
@@ -5347,8 +5285,7 @@
boundary of the varlist and the second parenthesis marks the beginning
of the two-element list, @code{(oldbuf (current-buffer))}.
address@hidden append save-excursion, , append-to-buffer body, append-to-buffer
address@hidden node-name, next, previous, up
address@hidden append save-excursion
@subsection @code{save-excursion} in @code{append-to-buffer}
The body of the @code{let} expression in @code{append-to-buffer}
@@ -5525,8 +5462,7 @@
buffer. Many function definitions use @code{let},
@code{save-excursion}, and @code{set-buffer} this way.
address@hidden Buffer Related Review, Buffer Exercises, append-to-buffer,
Buffer Walk Through
address@hidden node-name, next, previous, up
address@hidden Buffer Related Review
@section Review
Here is a brief summary of the various functions discussed in this chapter.
@@ -5578,7 +5514,7 @@
@end table
@need 1500
address@hidden Buffer Exercises, , Buffer Related Review, Buffer Walk Through
address@hidden Buffer Exercises
@section Exercises
@itemize @bullet
@@ -5595,8 +5531,7 @@
function.
@end itemize
address@hidden More Complex, Narrowing & Widening, Buffer Walk Through, Top
address@hidden node-name, next, previous, up
address@hidden More Complex
@chapter A Few More Complex Functions
In this chapter, we build on what we have learned in previous chapters
@@ -5616,8 +5551,7 @@
* optional Exercise::
@end menu
address@hidden copy-to-buffer, insert-buffer, More Complex, More Complex
address@hidden node-name, next, previous, up
address@hidden copy-to-buffer
@section The Definition of @code{copy-to-buffer}
@findex copy-to-buffer
@@ -5695,8 +5629,7 @@
@end group
@end smallexample
address@hidden insert-buffer, beginning-of-buffer, copy-to-buffer, More Complex
address@hidden node-name, next, previous, up
address@hidden insert-buffer
@section The Definition of @code{insert-buffer}
@findex insert-buffer
@@ -5725,8 +5658,8 @@
* New insert-buffer::
@end menu
address@hidden insert-buffer code, insert-buffer interactive, insert-buffer,
insert-buffer
@ifnottex
address@hidden insert-buffer code
@unnumberedsubsec The Code for @code{insert-buffer}
@end ifnottex
@@ -5770,8 +5703,7 @@
@end group
@end smallexample
address@hidden insert-buffer interactive, insert-buffer body, insert-buffer
code, insert-buffer
address@hidden node-name, next, previous, up
address@hidden insert-buffer interactive
@subsection The Interactive Expression in @code{insert-buffer}
@findex interactive, @r{example use of}
@@ -5784,8 +5716,7 @@
* b for interactive:: An existing buffer or else its name.
@end menu
address@hidden Read-only buffer, b for interactive, insert-buffer interactive,
insert-buffer interactive
address@hidden node-name, next, previous, up
address@hidden Read-only buffer
@unnumberedsubsubsec A Read-only Buffer
@cindex Read-only buffer
@cindex Asterisk for read-only buffer
@@ -5799,8 +5730,7 @@
into current buffer. The asterisk does not need to be followed by a
newline to separate it from the next argument.
address@hidden b for interactive, , Read-only buffer, insert-buffer interactive
address@hidden node-name, next, previous, up
address@hidden b for interactive
@unnumberedsubsubsec @samp{b} in an Interactive Expression
The next argument in the interactive expression starts with a lower
@@ -5820,8 +5750,7 @@
functions with which we are already familiar and the @code{progn}
special form with which we are not. (It will be described later.)
address@hidden insert-buffer body, if & or, insert-buffer interactive,
insert-buffer
address@hidden node-name, next, previous, up
address@hidden insert-buffer body
@subsection The Body of the @code{insert-buffer} Function
The body of the @code{insert-buffer} function has two major parts: an
@@ -5856,8 +5785,7 @@
Before doing this, let me rewrite this part of the function using
@code{if} so that you can see what is done in a manner that will be familiar.
address@hidden if & or, Insert or, insert-buffer body, insert-buffer
address@hidden node-name, next, previous, up
address@hidden if & or
@subsection @code{insert-buffer} With an @code{if} Instead of an @code{or}
The job to be done is to make sure the value of @code{buffer} is a
@@ -5937,8 +5865,7 @@
@code{buffer} to the value of the buffer itself, replacing its previous
value (which was the name of the buffer).
address@hidden Insert or, Insert let, if & or, insert-buffer
address@hidden node-name, next, previous, up
address@hidden Insert or
@subsection The @code{or} in the Body
The purpose of the @code{or} expression in the @code{insert-buffer}
@@ -5996,8 +5923,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 node-name, next, previous, up
address@hidden Insert let
@subsection The @code{let} Expression in @code{insert-buffer}
After ensuring that the variable @code{buffer} refers to a buffer itself
@@ -6095,8 +6021,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 node-name, next, previous, up
address@hidden New insert-buffer
@subsection New Body for @code{insert-buffer}
@findex insert-buffer, new version body
@findex new version body for insert-buffer
@@ -6134,8 +6059,7 @@
exists only to produce a side effect, inserting another buffer, not to
return any value.
address@hidden beginning-of-buffer, Second Buffer Related Review,
insert-buffer, More Complex
address@hidden node-name, next, previous, up
address@hidden beginning-of-buffer
@section Complete Definition of @code{beginning-of-buffer}
@findex beginning-of-buffer
@@ -6167,7 +6091,7 @@
* beginning-of-buffer complete::
@end menu
address@hidden Optional Arguments, beginning-of-buffer opt arg,
beginning-of-buffer, beginning-of-buffer
address@hidden Optional Arguments
@subsection Optional Arguments
Unless told otherwise, Lisp expects that a function with an argument in
@@ -6250,7 +6174,7 @@
is how we saw the @code{beginning-of-buffer} function in its
simplified form.
address@hidden beginning-of-buffer opt arg, beginning-of-buffer complete,
Optional Arguments, beginning-of-buffer
address@hidden beginning-of-buffer opt arg
@subsection @code{beginning-of-buffer} with an Argument
When @code{beginning-of-buffer} is called with an argument, an
@@ -6278,8 +6202,8 @@
* Small buffer case::
@end menu
address@hidden Disentangle beginning-of-buffer, Large buffer case,
beginning-of-buffer opt arg, beginning-of-buffer opt arg
@ifnottex
address@hidden Disentangle beginning-of-buffer
@unnumberedsubsubsec Disentangle @code{beginning-of-buffer}
@end ifnottex
@@ -6308,8 +6232,7 @@
There are two cases: if the buffer is large and if it is not.
address@hidden Large buffer case, Small buffer case, Disentangle
beginning-of-buffer, beginning-of-buffer opt arg
address@hidden node-name, next, previous, up
address@hidden Large buffer case
@unnumberedsubsubsec What happens in a large buffer
In @code{beginning-of-buffer}, the inner @code{if} expression tests
@@ -6392,8 +6315,7 @@
This puts the cursor where we want it.
address@hidden Small buffer case, , Large buffer case, beginning-of-buffer opt
arg
address@hidden node-name, next, previous, up
address@hidden Small buffer case
@unnumberedsubsubsec What happens in a small buffer
If the buffer contains fewer than 10,000 characters, a slightly
@@ -6450,8 +6372,7 @@
the cursor is moved to that point.
@need 1500
address@hidden beginning-of-buffer complete, , beginning-of-buffer opt arg,
beginning-of-buffer
address@hidden node-name, next, previous, up
address@hidden beginning-of-buffer complete
@subsection The Complete @code{beginning-of-buffer}
@need 1000
@@ -6579,8 +6500,7 @@
intended or whether no one has dealt with the code to avoid this
happening.
address@hidden Second Buffer Related Review, optional Exercise,
beginning-of-buffer, More Complex
address@hidden node-name, next, previous, up
address@hidden Second Buffer Related Review
@section Review
Here is a brief summary of some of the topics covered in this chapter.
@@ -6623,7 +6543,7 @@
Return @code{t} if its argument is a buffer; otherwise return @code{nil}.
@end table
address@hidden optional Exercise, , Second Buffer Related Review, More Complex
address@hidden optional Exercise
@section @code{optional} Argument Exercise
Write an interactive function with an optional argument that tests
@@ -6632,8 +6552,7 @@
message. However, if you do not pass an argument to the function, use
56 as a default value.
address@hidden Narrowing & Widening, car cdr & cons, More Complex, Top
address@hidden node-name, next, previous, up
address@hidden Narrowing & Widening
@chapter Narrowing and Widening
@cindex Focusing attention (narrowing)
@cindex Narrowing
@@ -6651,8 +6570,8 @@
* narrow Exercise::
@end menu
address@hidden Narrowing advantages, save-restriction, Narrowing & Widening,
Narrowing & Widening
@ifnottex
address@hidden Narrowing advantages
@unnumberedsec The Advantages of Narrowing
@end ifnottex
@@ -6686,8 +6605,7 @@
of the buffer in which it is interested and then restores the previous
situation.
address@hidden save-restriction, what-line, Narrowing advantages, Narrowing &
Widening
address@hidden node-name, next, previous, up
address@hidden save-restriction
@section The @code{save-restriction} Special Form
@findex save-restriction
@@ -6804,8 +6722,7 @@
(- (buffer-size) (forward-line (buffer-size)))))))
@end ignore
address@hidden what-line, narrow Exercise, save-restriction, Narrowing &
Widening
address@hidden node-name, next, previous, up
address@hidden what-line
@section @code{what-line}
@findex what-line
@cindex Widening, example of
@@ -6938,7 +6855,7 @@
mark to their original positions; and @code{save-restriction} restores
the original narrowing, if any.
address@hidden narrow Exercise, , what-line, Narrowing & Widening
address@hidden narrow Exercise
@section Exercise with Narrowing
Write a function that will display the first 60 characters of the
@@ -6961,8 +6878,7 @@
Additionally, do you really need @code{goto-char} or @code{point-min}?
Or can you write the function without them?
address@hidden car cdr & cons, Cutting & Storing Text, Narrowing & Widening, Top
address@hidden node-name, next, previous, up
address@hidden car cdr & cons
@chapter @code{car}, @code{cdr}, @code{cons}: Fundamental Functions
@findex car, @r{introduced}
@findex cdr, @r{introduced}
@@ -6986,8 +6902,8 @@
* cons Exercise::
@end menu
address@hidden Strange Names, car & cdr, car cdr & cons, car cdr & cons
@ifnottex
address@hidden Strange Names
@unnumberedsec Strange Names
@end ifnottex
@@ -7006,8 +6922,7 @@
terms are used in the Emacs Lisp source code, we will use them in this
introduction.
address@hidden car & cdr, cons, Strange Names, car cdr & cons
address@hidden node-name, next, previous, up
address@hidden car & cdr
@section @code{car} and @code{cdr}
The @sc{car} of a list is, quite simply, the first item in the list.
@@ -7129,8 +7044,7 @@
by array-specific functions. @xref{Arrays, , Arrays, elisp, The GNU
Emacs Lisp Reference Manual}.)
address@hidden cons, nthcdr, car & cdr, car cdr & cons
address@hidden node-name, next, previous, up
address@hidden cons
@section @code{cons}
@findex cons, @r{introduced}
@@ -7167,8 +7081,8 @@
* length:: How to find the length of a list.
@end menu
address@hidden Build a list, length, cons, cons
@ifnottex
address@hidden Build a list
@unnumberedsubsec Build a list
@end ifnottex
@@ -7218,8 +7132,7 @@
and the third example constructs a three element list by putting
@code{violet} in front of @code{daisy} and @code{buttercup}.
address@hidden length, , Build a list, cons
address@hidden node-name, next, previous, up
address@hidden length
@subsection Find the Length of a List: @code{length}
@findex length
@@ -7300,8 +7213,7 @@
about subroutines.
@end ignore
address@hidden nthcdr, nth, cons, car cdr & cons
address@hidden node-name, next, previous, up
address@hidden nthcdr
@section @code{nthcdr}
@findex nthcdr
@@ -7425,8 +7337,7 @@
@end group
@end smallexample
address@hidden nth, setcar, nthcdr, car cdr & cons
address@hidden node-name, next, previous, up
address@hidden nth
@section @code{nth}
@findex nth
@@ -7478,8 +7389,7 @@
non-destructive. This is in sharp contrast to the @code{setcar} and
@code{setcdr} functions.
address@hidden setcar, setcdr, nth, car cdr & cons
address@hidden node-name, next, previous, up
address@hidden setcar
@section @code{setcar}
@findex setcar
@@ -7554,8 +7464,7 @@
as @code{cons} would have; it replaced @code{antelope} with
@code{hippopotamus}; it @emph{changed} the list.
address@hidden setcdr, cons Exercise, setcar, car cdr & cons
address@hidden node-name, next, previous, up
address@hidden setcdr
@section @code{setcdr}
@findex setcdr
@@ -7614,7 +7523,7 @@
@code{(horse cat dog)}. The @sc{cdr} of the list is changed from
@code{(cow sheep goat)} to @code{(cat dog)}.
address@hidden cons Exercise, , setcdr, car cdr & cons
address@hidden cons Exercise
@section Exercise
Construct a list of four birds by evaluating several expressions with
@@ -7622,8 +7531,7 @@
itself. Replace the first element of the list of four birds with a
fish. Replace the rest of that list with a list of other fish.
address@hidden Cutting & Storing Text, List Implementation, car cdr & cons, Top
address@hidden node-name, next, previous, up
address@hidden Cutting & Storing Text
@chapter Cutting and Storing Text
@cindex Cutting and storing text
@cindex Storing and cutting text
@@ -7655,8 +7563,8 @@
* search Exercises::
@end menu
address@hidden Storing Text, zap-to-char, Cutting & Storing Text, Cutting &
Storing Text
@ifnottex
address@hidden Storing Text
@unnumberedsec Storing Text in a List
@end ifnottex
@@ -7722,8 +7630,7 @@
A subsequent chapter describes how text that is cut from the buffer is
retrieved. @xref{Yanking, , Yanking Text Back}.
address@hidden zap-to-char, kill-region, Storing Text, Cutting & Storing Text
address@hidden node-name, next, previous, up
address@hidden zap-to-char
@section @code{zap-to-char}
@findex zap-to-char
@@ -7751,8 +7658,8 @@
* Summing up zap-to-char:: Using @code{point} and @code{search-forward}.
@end menu
address@hidden Complete zap-to-char, zap-to-char interactive, zap-to-char,
zap-to-char
@ifnottex
address@hidden Complete zap-to-char
@unnumberedsubsec The Complete @code{zap-to-char} Implementation
@end ifnottex
@@ -7812,8 +7719,7 @@
The documentation is thorough. You do need to know the jargon meaning
of the word `kill'.
address@hidden zap-to-char interactive, zap-to-char body, Complete zap-to-char,
zap-to-char
address@hidden node-name, next, previous, up
address@hidden zap-to-char interactive
@subsection The @code{interactive} Expression
@need 800
@@ -7848,8 +7754,7 @@
message saying that the buffer is read-only. Also, the terminal may
beep or blink at you.
address@hidden zap-to-char body, search-forward, zap-to-char interactive,
zap-to-char
address@hidden node-name, next, previous, up
address@hidden zap-to-char body
@subsection The Body of @code{zap-to-char}
The body of the @code{zap-to-char} function contains the code that
@@ -7887,8 +7792,7 @@
@code{search-forward}, so we will look at @code{search-forward} and
then at @code{progn}.
address@hidden search-forward, progn, zap-to-char body, zap-to-char
address@hidden node-name, next, previous, up
address@hidden search-forward
@subsection The @code{search-forward} Function
@findex search-forward
@@ -7963,8 +7867,7 @@
We will look at @code{progn} next.
address@hidden progn, Summing up zap-to-char, search-forward, zap-to-char
address@hidden node-name, next, previous, up
address@hidden progn
@subsection The @code{progn} Special Form
@findex progn
@@ -8004,8 +7907,7 @@
returned by the @code{progn} expression and is passed to
@code{kill-region} as @code{kill-region}'s second argument.
address@hidden Summing up zap-to-char, , progn, zap-to-char
address@hidden node-name, next, previous, up
address@hidden Summing up zap-to-char
@subsection Summing up @code{zap-to-char}
Now that we have seen how @code{search-forward} and @code{progn} work,
@@ -8026,8 +7928,7 @@
a single argument to @code{kill-region} and returns the one value that
@code{kill-region} needs for its second argument.
address@hidden kill-region, copy-region-as-kill, zap-to-char, Cutting & Storing
Text
address@hidden node-name, next, previous, up
address@hidden kill-region
@section @code{kill-region}
@findex kill-region
@@ -8111,8 +8012,8 @@
* Lisp macro::
@end menu
address@hidden Complete kill-region, condition-case, kill-region, kill-region
@ifnottex
address@hidden Complete kill-region
@unnumberedsubsec The Complete @code{kill-region} Definition
@end ifnottex
@@ -8299,8 +8200,7 @@
@end smallexample
@end ignore
address@hidden condition-case, Lisp macro, Complete kill-region, kill-region
address@hidden node-name, next, previous, up
address@hidden condition-case
@subsection @code{condition-case}
@findex condition-case
@@ -8386,8 +8286,7 @@
Initializing a Variable with @code{defvar} includes line 8350
@end ignore
address@hidden Lisp macro, , condition-case, kill-region
address@hidden node-name, next, previous, up
address@hidden Lisp macro
@subsection Lisp macro
@cindex Macro, lisp
@cindex Lisp macro
@@ -8458,8 +8357,7 @@
concatenates a copy of the newly clipped text to the just previously
clipped text in the kill ring.
address@hidden copy-region-as-kill, Digression into C, kill-region, Cutting &
Storing Text
address@hidden node-name, next, previous, up
address@hidden copy-region-as-kill
@section @code{copy-region-as-kill}
@findex copy-region-as-kill
@findex nthcdr
@@ -8480,8 +8378,8 @@
* copy-region-as-kill body:: The body of @code{copy-region-as-kill}.
@end menu
address@hidden Complete copy-region-as-kill, copy-region-as-kill body,
copy-region-as-kill, copy-region-as-kill
@ifnottex
address@hidden Complete copy-region-as-kill
@unnumberedsubsec The complete @code{copy-region-as-kill} function definition
@end ifnottex
@@ -8559,8 +8457,7 @@
The body of @code{copy-region-as-kill} merits discussion in detail.
address@hidden copy-region-as-kill body, , Complete copy-region-as-kill,
copy-region-as-kill
address@hidden node-name, next, previous, up
address@hidden copy-region-as-kill body
@subsection The Body of @code{copy-region-as-kill}
The @code{copy-region-as-kill} function works in much the same way as
@@ -8583,8 +8480,8 @@
* kill-new function::
@end menu
address@hidden last-command & this-command, kill-append function,
copy-region-as-kill body, copy-region-as-kill body
@ifnottex
address@hidden last-command & this-command
@unnumberedsubsubsec @code{last-command} and @code{this-command}
@end ifnottex
@@ -8639,7 +8536,7 @@
If the previous command was @code{kill-region}, then the Emacs Lisp
interpreter calls the @code{kill-append} function
address@hidden kill-append function, kill-new function, last-command &
this-command, copy-region-as-kill body
address@hidden kill-append function
@unnumberedsubsubsec The @code{kill-append} function
@findex kill-append
@@ -8771,7 +8668,7 @@
saved text. The @code{kill-append} function uses the @code{kill-new}
function which in turn uses the @code{setcar} function.
address@hidden kill-new function, , kill-append function, copy-region-as-kill
body
address@hidden kill-new function
@unnumberedsubsubsec The @code{kill-new} function
@findex kill-new
@@ -9200,8 +9097,7 @@
see Initializing a Variable with @code{defvar}
@end ignore
address@hidden Digression into C, defvar, copy-region-as-kill, Cutting &
Storing Text
address@hidden node-name, next, previous, up
address@hidden Digression into C
@section Digression into C
@findex delete-and-extract-region
@cindex C, a digression into
@@ -9366,8 +9262,7 @@
simple; but hidden underneath is a great deal of complexity to make it
all work.
address@hidden defvar, cons & search-fwd Review, Digression into C, Cutting &
Storing Text
address@hidden node-name, next, previous, up
address@hidden defvar
@section Initializing a Variable with @code{defvar}
@findex defvar
@cindex Initializing a variable
@@ -9416,8 +9311,8 @@
* defvar and asterisk::
@end menu
address@hidden See variable current value, defvar and asterisk, defvar, defvar
@ifnottex
address@hidden See variable current value
@unnumberedsubsec Seeing the Current Value of a Variable
@end ifnottex
@@ -9468,7 +9363,7 @@
Succeeding lines should not be indented; otherwise they look odd when
you use @kbd{C-h v} (@code{describe-variable}).
address@hidden defvar and asterisk, , See variable current value, defvar
address@hidden defvar and asterisk
@subsection @code{defvar} and an asterisk
@findex defvar @r{for a user customizable variable}
@findex defvar @r{with an asterisk}
@@ -9514,8 +9409,7 @@
The GNU Emacs Manual}.)
@need 1250
address@hidden cons & search-fwd Review, search Exercises, defvar, Cutting &
Storing Text
address@hidden node-name, next, previous, up
address@hidden cons & search-fwd Review
@section Review
Here is a brief summary of some recently introduced functions.
@@ -9664,7 +9558,7 @@
(This is not an interactive command.)
@need 1500
address@hidden search Exercises, , cons & search-fwd Review, Cutting & Storing
Text
address@hidden search Exercises
@section Searching Exercises
@itemize @bullet
@@ -9682,8 +9576,7 @@
print an appropriate message.
@end itemize
address@hidden List Implementation, Yanking, Cutting & Storing Text, Top
address@hidden node-name, next, previous, up
address@hidden List Implementation
@chapter How Lists are Implemented
@cindex Lists in a computer
@@ -9707,8 +9600,8 @@
* List Exercise::
@end menu
address@hidden Lists diagrammed, Symbols as Chest, List Implementation, List
Implementation
@ifnottex
address@hidden Lists diagrammed
@unnumberedsec Lists diagrammed
@end ifnottex
@@ -10047,7 +9940,7 @@
In summary, when a Lisp variable is set to a value, it is provided with
the address of the list to which the variable refers.
address@hidden Symbols as Chest, List Exercise, Lists diagrammed, List
Implementation
address@hidden Symbols as Chest
@section Symbols as a Chest of Drawers
@cindex Symbols as a Chest of Drawers
@cindex Chest of Drawers, metaphor for a symbol
@@ -10148,7 +10041,7 @@
@end iftex
@end ifclear
address@hidden List Exercise, , Symbols as Chest, List Implementation
address@hidden List Exercise
@section Exercise
Set @code{flowers} to @code{violet} and @code{buttercup}. Cons two
@@ -10156,8 +10049,7 @@
@code{more-flowers}. Set the @sc{car} of @code{flowers} to a fish.
What does the @code{more-flowers} list now contain?
address@hidden Yanking, Loops & Recursion, List Implementation, Top
address@hidden node-name, next, previous, up
address@hidden Yanking
@chapter Yanking Text Back
@findex yank
@cindex Text retrieval
@@ -10188,8 +10080,7 @@
* yank nthcdr Exercises:: The @code{kill-ring-yank-pointer} variable.
@end menu
address@hidden Kill Ring Overview, kill-ring-yank-pointer, Yanking, Yanking
address@hidden node-name, next, previous, up
address@hidden Kill Ring Overview
@section Kill Ring Overview
@cindex Kill ring overview
@@ -10232,8 +10123,7 @@
To begin to understand how @code{yank} and @code{yank-pop} work, it is
first necessary to look at the @code{kill-ring-yank-pointer} variable.
address@hidden kill-ring-yank-pointer, yank nthcdr Exercises, Kill Ring
Overview, Yanking
address@hidden node-name, next, previous, up
address@hidden kill-ring-yank-pointer
@section The @code{kill-ring-yank-pointer} Variable
@code{kill-ring-yank-pointer} is a variable, just as @code{kill-ring} is
@@ -10372,7 +10262,7 @@
@end ignore
@need 1500
address@hidden yank nthcdr Exercises, , kill-ring-yank-pointer, Yanking
address@hidden yank nthcdr Exercises
@section Exercises with @code{yank} and @code{nthcdr}
@itemize @bullet
@@ -10389,8 +10279,7 @@
to return the first, second, third, and fourth elements of a list.
@end itemize
address@hidden Loops & Recursion, Regexp Search, Yanking, Top
address@hidden node-name, next, previous, up
address@hidden Loops & Recursion
@chapter Loops and Recursion
@cindex Loops and recursion
@cindex Recursion and loops
@@ -10426,8 +10315,7 @@
* Looping exercise::
@end menu
address@hidden while, dolist dotimes, Loops & Recursion, Loops & Recursion
address@hidden node-name, next, previous, up
address@hidden while
@section @code{while}
@cindex Loops
@findex while
@@ -10465,8 +10353,8 @@
* Decrementing Loop:: A loop with a decrementing counter.
@end menu
address@hidden Looping with while, Loop Example, while, while
@ifnottex
address@hidden Looping with while
@unnumberedsubsec Looping with @code{while}
@end ifnottex
@@ -10499,8 +10387,7 @@
but the consequences of what happens when the expressions in the loop
are repeatedly evaluated.
address@hidden Loop Example, print-elements-of-list, Looping with while, while
address@hidden node-name, next, previous, up
address@hidden Loop Example
@subsection A @code{while} Loop and a List
A common way to control a @code{while} loop is to test whether a list
@@ -10604,7 +10491,7 @@
goes through a list and prints each element of the list on a line of its
own.
address@hidden print-elements-of-list, Incrementing Loop, Loop Example, while
address@hidden print-elements-of-list
@subsection An Example: @code{print-elements-of-list}
@findex print-elements-of-list
@@ -10683,8 +10570,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, Incrementing Loop Details,
print-elements-of-list, while
address@hidden node-name, next, previous, up
address@hidden Incrementing Loop
@subsection A Loop with an Incrementing Counter
A loop is not useful unless it stops when it ought. Besides
@@ -10694,8 +10580,8 @@
have a counter---an expression that counts how many times the loop
repeats itself.
address@hidden Incrementing Loop Details, Decrementing Loop, Incrementing Loop,
while
@ifnottex
address@hidden Incrementing Loop Details
@unnumberedsubsec Details of an Incrementing Loop
@end ifnottex
@@ -10733,7 +10619,7 @@
* Inc Example altogether:: Putting the function definition together.
@end menu
address@hidden Incrementing Example, Inc Example parts, Incrementing Loop
Details, Incrementing Loop Details
address@hidden Incrementing Example
@unnumberedsubsubsec Example with incrementing counter
Suppose you are playing on the beach and decide to make a triangle of
@@ -10800,7 +10686,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 Details
address@hidden Inc Example parts
@unnumberedsubsubsec The parts of the function definition
The preceding analysis gives us the bones of our function definition:
@@ -10894,7 +10780,7 @@
(setq row-number (1+ row-number))
@end smallexample
address@hidden Inc Example altogether, , Inc Example parts, Incrementing Loop
Details
address@hidden Inc Example altogether
@unnumberedsubsubsec Putting the function definition together
We have created the parts for the function definition; now we need to
@@ -11004,8 +10890,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 Details, while
address@hidden node-name, next, previous, up
address@hidden Decrementing Loop
@subsection Loop with a Decrementing Counter
Another common way to write a @code{while} loop is to write the test
@@ -11041,7 +10926,7 @@
* Dec Example altogether:: Putting the function definition together.
@end menu
address@hidden Decrementing Example, Dec Example parts, Decrementing Loop,
Decrementing Loop
address@hidden Decrementing Example
@unnumberedsubsubsec Example with decrementing counter
To illustrate a loop with a decrementing counter, we will rewrite the
@@ -11068,7 +10953,7 @@
many pebbles are in the preceding row: it is one less than the number in
the row.
address@hidden Dec Example parts, Dec Example altogether, Decrementing Example,
Decrementing Loop
address@hidden Dec Example parts
@unnumberedsubsubsec The parts of the function definition
We start with three variables: the total number of rows in the
@@ -11130,7 +11015,7 @@
(while (> number-of-pebbles-in-row 0)
@end smallexample
address@hidden Dec Example altogether, , Dec Example parts, Decrementing Loop
address@hidden Dec Example altogether
@unnumberedsubsubsec Putting the function definition together
We can put these expressions together to create a function definition
@@ -11201,8 +11086,7 @@
number of times.
@end enumerate
address@hidden dolist dotimes, Recursion, while, Loops & Recursion
address@hidden node-name, next, previous, up
address@hidden dolist dotimes
@section Save your time: @code{dolist} and @code{dotimes}
In addition to @code{while}, both @code{dolist} and @code{dotimes}
@@ -11222,8 +11106,8 @@
* dotimes::
@end menu
address@hidden dolist, dotimes, dolist dotimes, dolist dotimes
address@hidden The @code{dolist} Macro
address@hidden dolist
address@hidden The @code{dolist} Macro
@findex dolist
Suppose, for example, you want to reverse a list, so that
@@ -11326,8 +11210,8 @@
the expression; and repeats the loop. The result is returned in
@code{value}.
address@hidden dotimes, , dolist, dolist dotimes
address@hidden The @code{dotimes} Macro
address@hidden dotimes
address@hidden The @code{dotimes} Macro
@findex dotimes
The @code{dotimes} macro is similar to @code{dolist}, except that it
@@ -11376,8 +11260,7 @@
@end group
@end smallexample
address@hidden Recursion, Looping exercise, dolist dotimes, Loops & Recursion
address@hidden node-name, next, previous, up
address@hidden Recursion
@section Recursion
@cindex Recursion
@@ -11403,8 +11286,7 @@
* No deferment solution::
@end menu
address@hidden Building Robots, Recursive Definition Parts, Recursion, Recursion
address@hidden node-name, next, previous, up
address@hidden Building Robots
@subsection Building Robots: Extending the Metaphor
@cindex Building robots
@cindex Robots, building
@@ -11441,8 +11323,7 @@
It is important that the arguments differ from one instance to the
next; otherwise, the process will never stop.
address@hidden Recursive Definition Parts, Recursion with list, Building
Robots, Recursion
address@hidden node-name, next, previous, up
address@hidden Recursive Definition Parts
@subsection The Parts of a Recursive Definition
@cindex Parts of a Recursive Definition
@cindex Recursive Definition Parts
@@ -11506,8 +11387,7 @@
The do-again-test is sometimes called the @dfn{stop condition},
since it stops the repetitions when it tests false.
address@hidden Recursion with list, Recursive triangle function, Recursive
Definition Parts, Recursion
address@hidden node-name, next, previous, up
address@hidden Recursion with list
@subsection Recursion with a List
The example of a @code{while} loop that printed the elements of a list
@@ -11599,8 +11479,7 @@
@end smallexample
@need 2000
address@hidden Recursive triangle function, Recursion with cond, Recursion with
list, Recursion
address@hidden node-name, next, previous, up
address@hidden Recursive triangle function
@subsection Recursion in Place of a Counter
@findex triangle-recursively
@@ -11638,8 +11517,8 @@
* Recursive Example arg of 3 or 4::
@end menu
address@hidden Recursive Example arg of 1 or 2, Recursive Example arg of 3 or
4, Recursive triangle function, Recursive triangle function
@ifnottex
address@hidden Recursive Example arg of 1 or 2
@unnumberedsubsubsec An argument of 1 or 2
@end ifnottex
@@ -11701,7 +11580,7 @@
pebbles in it.
@end table
address@hidden Recursive Example arg of 3 or 4, , Recursive Example arg of 1
or 2, Recursive triangle function
address@hidden Recursive Example arg of 3 or 4
@unnumberedsubsubsec An argument of 3 or 4
Suppose that @code{triangle-recursively} is called with an argument of
@@ -11791,8 +11670,7 @@
There is a way around this kind of waiting, which we will discuss in
@ref{No Deferment, , Recursion without Deferments}.
address@hidden Recursion with cond, Recursive Patterns, Recursive triangle
function, Recursion
address@hidden node-name, next, previous, up
address@hidden Recursion with cond
@subsection Recursion Example Using @code{cond}
@findex cond
@@ -11868,8 +11746,7 @@
number (triangle-using-cond (1- number)))} if the number is greater than
1.
address@hidden Recursive Patterns, No Deferment, Recursion with cond, Recursion
address@hidden node-name, next, previous, up
address@hidden Recursive Patterns
@subsection Recursive Patterns
@cindex Recursive Patterns
@@ -11883,8 +11760,7 @@
* Keep::
@end menu
address@hidden Every, Accumulate, Recursive Patterns, Recursive Patterns
address@hidden node-name, next, previous, up
address@hidden Every
@unnumberedsubsubsec Recursive Pattern: @emph{every}
@cindex Every, type of recursive pattern
@cindex Recursive pattern: every
@@ -11983,8 +11859,7 @@
@end itemize
@end itemize
address@hidden Accumulate, Keep, Every, Recursive Patterns
address@hidden node-name, next, previous, up
address@hidden Accumulate
@unnumberedsubsubsec Recursive Pattern: @emph{accumulate}
@cindex Accumulate, type of recursive pattern
@cindex Recursive pattern: accumulate
@@ -12035,8 +11910,7 @@
@xref{Files List, , Making a List of Files}, for an example of the
accumulate pattern.
address@hidden Keep, , Accumulate, Recursive Patterns
address@hidden node-name, next, previous, up
address@hidden Keep
@unnumberedsubsubsec Recursive Pattern: @emph{keep}
@cindex Keep, type of recursive pattern
@cindex Recursive pattern: keep
@@ -12105,7 +11979,7 @@
It goes without saying that you need not use @code{nil} as the test for
when to stop; and you can, of course, combine these patterns.
address@hidden No Deferment, No deferment solution, Recursive Patterns,
Recursion
address@hidden No Deferment
@subsection Recursion without Deferments
@cindex Deferment in recursion
@cindex Recursion without Deferments
@@ -12188,7 +12062,7 @@
steps, as in this example. But it can be a problem when there are
more steps.
address@hidden No deferment solution, , No Deferment, Recursion
address@hidden No deferment solution
@subsection No Deferment Solution
@cindex No deferment solution
@cindex Defermentless solution
@@ -12352,7 +12226,7 @@
many resources in a computer.
@need 1500
address@hidden Looping exercise, , Recursion, Loops & Recursion
address@hidden Looping exercise
@section Looping Exercise
@itemize @bullet
@@ -12399,8 +12273,7 @@
@end iftex
@end itemize
address@hidden Regexp Search, Counting Words, Loops & Recursion, Top
address@hidden node-name, next, previous, up
address@hidden Regexp Search
@chapter Regular Expression Searches
@cindex Searches, illustrating
@cindex Regular expression searches
@@ -12446,8 +12319,7 @@
* re-search Exercises::
@end menu
address@hidden sentence-end, re-search-forward, Regexp Search, Regexp Search
address@hidden node-name, next, previous, up
address@hidden sentence-end
@section The Regular Expression for @code{sentence-end}
@findex sentence-end
@@ -12598,8 +12470,7 @@
@end table
@end ignore
address@hidden re-search-forward, forward-sentence, sentence-end, Regexp Search
address@hidden node-name, next, previous, up
address@hidden re-search-forward
@section The @code{re-search-forward} Function
@findex re-search-forward
@@ -12673,8 +12544,7 @@
function will return @code{nil}; and the repeat count will be provided
by the argument to the @code{forward-sentence} function.
address@hidden forward-sentence, forward-paragraph, re-search-forward, Regexp
Search
address@hidden node-name, next, previous, up
address@hidden forward-sentence
@section @code{forward-sentence}
@findex forward-sentence
@@ -12691,8 +12561,8 @@
* fwd-sentence re-search:: A regular expression search.
@end menu
address@hidden Complete forward-sentence, fwd-sentence while loops,
forward-sentence, forward-sentence
@ifnottex
address@hidden Complete forward-sentence
@unnumberedsubsec Complete @code{forward-sentence} function definition
@end ifnottex
@@ -12818,7 +12688,7 @@
equivalents. The @code{sentence-end} variable is set by the
@code{sentence-end} function.
address@hidden fwd-sentence while loops, fwd-sentence re-search, Complete
forward-sentence, forward-sentence
address@hidden fwd-sentence while loops
@unnumberedsubsec The @code{while} loops
Two @code{while} loops follow. The first @code{while} has a
@@ -12919,7 +12789,7 @@
the @code{forward-sentence} function buried here, but this is a common
way this kind of operation is carried out in Lisp.
address@hidden fwd-sentence re-search, , fwd-sentence while loops,
forward-sentence
address@hidden fwd-sentence re-search
@unnumberedsubsec The regular expression search
The @code{re-search-forward} function searches for the end of the
@@ -12967,8 +12837,7 @@
test of an @code{if} expression, is handy. You will see or write code
incorporating this pattern often.
address@hidden forward-paragraph, etags, forward-sentence, Regexp Search
address@hidden node-name, next, previous, up
address@hidden forward-paragraph
@section @code{forward-paragraph}: a Goldmine of Functions
@findex forward-paragraph
@@ -13151,8 +13020,8 @@
* fwd-para while:: The forward motion @code{while} loop.
@end menu
address@hidden forward-paragraph in brief, fwd-para let, forward-paragraph,
forward-paragraph
@ifnottex
address@hidden forward-paragraph in brief
@unnumberedsubsec Shortened @code{forward-paragraph} function definition
@end ifnottex
@@ -13191,7 +13060,7 @@
@code{forward-sentence} function}.) Now we reach the end of the
familiar part of this function.
address@hidden fwd-para let, fwd-para while, forward-paragraph in brief,
forward-paragraph
address@hidden fwd-para let
@unnumberedsubsec The @code{let*} expression
The next line of the @code{forward-paragraph} function begins a
@@ -13323,7 +13192,7 @@
negative argument and is therefore moving backwards. We will skip this
section.
address@hidden fwd-para while, , fwd-para let, forward-paragraph
address@hidden fwd-para while
@unnumberedsubsec The forward motion @code{while} loop
The second part of the body of the @code{let*} deals with forward
@@ -13596,7 +13465,7 @@
your sources! Without them, you are like a person who tries to drive
a car with his eyes shut!)
address@hidden etags, Regexp Review, forward-paragraph, Regexp Search
address@hidden etags
@section Create Your Own @file{TAGS} File
@findex etags
@cindex @file{TAGS} file, create own
@@ -13720,8 +13589,7 @@
For more information, see @ref{Tags, , Tag Tables, emacs, The GNU Emacs
Manual}.
address@hidden Regexp Review, re-search Exercises, etags, Regexp Search
address@hidden node-name, next, previous, up
address@hidden Regexp Review
@section Review
Here is a brief summary of some recently introduced functions.
@@ -13812,7 +13680,7 @@
@end table
@need 1500
address@hidden re-search Exercises, , Regexp Review, Regexp Search
address@hidden re-search Exercises
@section Exercises with @code{re-search-forward}
@itemize @bullet
@@ -13830,7 +13698,7 @@
regexps. @xref{the-the, , @code{the-the} Duplicated Words Function}.
@end itemize
address@hidden Counting Words, Words in a defun, Regexp Search, Top
address@hidden Counting Words
@chapter Counting: Repetition and Regexps
@cindex Repetition for word counting
@cindex Regular expressions for word counting
@@ -13847,8 +13715,8 @@
* Counting Exercise::
@end menu
address@hidden Why Count Words, @value{COUNT-WORDS}, Counting Words, Counting
Words
@ifnottex
address@hidden Why Count Words
@unnumberedsec Counting words
@end ifnottex
@@ -13869,8 +13737,7 @@
some examples, which you may wish to compare with the standard Emacs
command, @code{count-words-region}.
address@hidden @value{COUNT-WORDS}, recursive-count-words, Why Count Words,
Counting Words
address@hidden node-name, next, previous, up
address@hidden @value{COUNT-WORDS}
@section The @address@hidden Function
@findex @value{COUNT-WORDS}
@@ -13895,8 +13762,8 @@
* Whitespace Bug:: The Whitespace Bug in @address@hidden
@end menu
address@hidden Design @value{COUNT-WORDS}, Whitespace Bug, @value{COUNT-WORDS},
@value{COUNT-WORDS}
@ifnottex
address@hidden Design @value{COUNT-WORDS}
@unnumberedsubsec Designing @address@hidden
@end ifnottex
@@ -14072,8 +13939,7 @@
@noindent
As written, the function works, but not in all circumstances.
address@hidden Whitespace Bug, , Design @value{COUNT-WORDS},
@value{COUNT-WORDS}
address@hidden node-name, next, previous, up
address@hidden Whitespace Bug
@subsection The Whitespace Bug in @address@hidden
The @address@hidden command described in the preceding
@@ -14325,8 +14191,7 @@
@end group
@end smallexample
address@hidden recursive-count-words, Counting Exercise, @value{COUNT-WORDS},
Counting Words
address@hidden node-name, next, previous, up
address@hidden recursive-count-words
@section Count Words Recursively
@cindex Count words recursively
@cindex Recursively counting words
@@ -14704,14 +14569,14 @@
@end group
@end smallexample
address@hidden Counting Exercise, , recursive-count-words, Counting Words
address@hidden Counting Exercise
@section Exercise: Counting Punctuation
Using a @code{while} loop, write a function to count the number of
punctuation marks in a region---period, comma, semicolon, colon,
exclamation mark, and question mark. Do the same using recursion.
address@hidden Words in a defun, Readying a Graph, Counting Words, Top
address@hidden Words in a defun
@chapter Counting Words in a @code{defun}
@cindex Counting words in a @code{defun}
@cindex Word counting in a @code{defun}
@@ -14744,8 +14609,8 @@
* Prepare the data:: Prepare the data for display in a graph.
@end menu
address@hidden Divide and Conquer, Words and Symbols, Words in a defun, Words
in a defun
@ifnottex
address@hidden Divide and Conquer
@unnumberedsec Divide and Conquer
@end ifnottex
@@ -14782,7 +14647,7 @@
This is quite a project! But if we take each step slowly, it will not
be difficult.
address@hidden Words and Symbols, Syntax, Divide and Conquer, Words in a defun
address@hidden Words and Symbols
@section What to Count?
@cindex Words and symbols in defun
@@ -14836,7 +14701,7 @@
characters' brings us to the issue of syntax, which is worth a section
of its own.
address@hidden Syntax, count-words-in-defun, Words and Symbols, Words in a defun
address@hidden Syntax
@section What Constitutes a Word or Symbol?
@cindex Syntax categories and tables
@@ -14920,7 +14785,7 @@
"\\(\\w\\|\\s_\\)+[^ \t\n]*[ \t\n]*"
@end smallexample
address@hidden count-words-in-defun, Several defuns, Syntax, Words in a defun
address@hidden count-words-in-defun
@section The @code{count-words-in-defun} Function
@cindex Counting words in a @code{defun}
@@ -15114,7 +14979,7 @@
The next problem is to count the numbers of words and symbols in
several definitions within a single file.
address@hidden Several defuns, Find a File, count-words-in-defun, Words in a
defun
address@hidden Several defuns
@section Count Several @code{defuns} Within a File
A file such as @file{simple.el} may have a hundred or more function
@@ -15169,8 +15034,7 @@
Finding a file is a new process that we have not yet discussed.
address@hidden Find a File, lengths-list-file, Several defuns, Words in a defun
address@hidden node-name, next, previous, up
address@hidden Find a File
@section Find a File
@cindex Find a File
@@ -15253,7 +15117,7 @@
The task is easy: use @code{find-file-noselect} and @code{set-buffer}.
address@hidden lengths-list-file, Several files, Find a File, Words in a defun
address@hidden lengths-list-file
@section @code{lengths-list-file} in Detail
The core of the @code{lengths-list-file} function is a @code{while}
@@ -15394,7 +15258,7 @@
Note that the length of the last definition in the file is first in
the list.
address@hidden Several files, Several files recursively, lengths-list-file,
Words in a defun
address@hidden Several files
@section Count Words in @code{defuns} in Different Files
In the previous section, we created a function that returns a list of
@@ -15410,8 +15274,8 @@
* append:: Attach one list to another.
@end menu
address@hidden lengths-list-many-files, append, Several files, Several files
@ifnottex
address@hidden lengths-list-many-files
@unnumberedsubsec Determine the lengths of @code{defuns}
@end ifnottex
@@ -15507,7 +15371,7 @@
unstudied function @code{append}, which merits a short section for
itself.
address@hidden append, , lengths-list-many-files, Several files
address@hidden append
@subsection The @code{append} Function
@need 800
@@ -15542,7 +15406,7 @@
((1 2 3 4) 5 6 7 8)
@end smallexample
address@hidden Several files recursively, Prepare the data, Several files,
Words in a defun
address@hidden Several files recursively
@section Recursively Count Words in Different Files
Besides a @code{while} loop, you can work on each of a list of files
@@ -15625,7 +15489,7 @@
The next step is to prepare the data in the list for display in a graph.
address@hidden Prepare the data, , Several files recursively, Words in a defun
address@hidden Prepare the data
@section Prepare the Data for Display in a Graph
The @code{recursive-lengths-list-many-files} function returns a list
@@ -15648,8 +15512,8 @@
* Counting function definitions::
@end menu
address@hidden Data for Display in Detail, Sorting, Prepare the data, Prepare
the data
@ifnottex
address@hidden Data for Display in Detail
@unnumberedsubsec The Data for Display in Detail
@end ifnottex
@@ -15667,7 +15531,7 @@
number, and thereby determine the largest and smallest length range
that we will need.
address@hidden Sorting, Files List, Data for Display in Detail, Prepare the data
address@hidden Sorting
@subsection Sorting Lists
@findex sort
@@ -15746,7 +15610,7 @@
quoted, since the expression must be evaluated so as to produce the
list that is passed to @code{sort}.)
address@hidden Files List, Counting function definitions, Sorting, Prepare the
data
address@hidden Files List
@subsection Making a List of Files
The @code{recursive-lengths-list-many-files} function requires a list
@@ -16007,7 +15871,7 @@
(insert (format "%s" (current-time-string))))
@end ignore
address@hidden Counting function definitions, , Files List, Prepare the data
address@hidden Counting function definitions
@subsection Counting function definitions
Our immediate goal is to generate a list that tells us how many
@@ -16311,7 +16175,7 @@
of 200 or larger.
@c The next step is to turn this numbers' list into a graph.
address@hidden Readying a Graph, Emacs Initialization, Words in a defun, Top
address@hidden Readying a Graph
@chapter Readying a Graph
@cindex Readying a graph
@cindex Graph prototype
@@ -16343,8 +16207,8 @@
* Line Graph Exercise::
@end menu
address@hidden Columns of a graph, graph-body-print, Readying a Graph, Readying
a Graph
@ifnottex
address@hidden Columns of a graph
@unnumberedsec Printing the Columns of a Graph
@end ifnottex
@@ -16716,7 +16580,7 @@
This prints the body of a graph, not the labels for the vertical and
horizontal axes, so we can call this @code{graph-body-print}.
address@hidden graph-body-print, recursive-graph-body-print, Columns of a
graph, Readying a Graph
address@hidden graph-body-print
@section The @code{graph-body-print} Function
@findex graph-body-print
@@ -16875,7 +16739,7 @@
@end group
@end smallexample
address@hidden recursive-graph-body-print, Printed Axes, graph-body-print,
Readying a Graph
address@hidden recursive-graph-body-print
@section The @code{recursive-graph-body-print} Function
@findex recursive-graph-body-print
@@ -16962,7 +16826,7 @@
Either of these two functions, @code{graph-body-print} or
@code{recursive-graph-body-print}, create the body of a graph.
address@hidden Printed Axes, Line Graph Exercise, recursive-graph-body-print,
Readying a Graph
address@hidden Printed Axes
@section Need for Printed Axes
A graph needs printed axes, so you can orient yourself. For a do-once
@@ -16975,12 +16839,12 @@
do not contain much new material, I have placed their description in
an appendix. @xref{Full Graph, , A Graph with Labeled Axes}.
address@hidden Line Graph Exercise, , Printed Axes, Readying a Graph
address@hidden Line Graph Exercise
@section Exercise
Write a line graph version of the graph printing functions.
address@hidden Emacs Initialization, Debugging, Readying a Graph, Top
address@hidden Emacs Initialization
@chapter Your @file{.emacs} File
@cindex @file{.emacs} file
@cindex Customizing your @file{.emacs} file
@@ -17012,8 +16876,8 @@
* Mode Line:: How to customize your mode line.
@end menu
address@hidden Default Configuration, Site-wide Init, Emacs Initialization,
Emacs Initialization
@ifnottex
address@hidden Default Configuration
@unnumberedsec Emacs's Default Configuration
@end ifnottex
@@ -17059,7 +16923,7 @@
@ref{Init File, , The Init File, elisp, The GNU Emacs Lisp Reference
Manual}.
address@hidden Site-wide Init, defcustom, Default Configuration, Emacs
Initialization
address@hidden Site-wide Init
@section Site-wide Initialization Files
@cindex @file{default.el} init file
@@ -17105,7 +16969,7 @@
what to put into your own @file{.emacs} file, or into a site-wide
initialization file.
address@hidden defcustom, Beginning a .emacs File, Site-wide Init, Emacs
Initialization
address@hidden defcustom
@section Specifying Variables using @code{defcustom}
@findex defcustom
@@ -17270,7 +17134,7 @@
set by @code{defconst}. (You can change it; the value set is a
variable; but please do not.)
address@hidden Beginning a .emacs File, Text and Auto-fill, defcustom, Emacs
Initialization
address@hidden Beginning a .emacs File
@section Beginning a @file{.emacs} File
@cindex @file{.emacs} file, beginning of
@@ -17353,7 +17217,7 @@
about Mode help or the conventions for comments---but I was able to
remember to look here to remind myself.
address@hidden Text and Auto-fill, Mail Aliases, Beginning a .emacs File, Emacs
Initialization
address@hidden Text and Auto-fill
@section Text and Auto Fill Mode
Now we come to the part that `turns on' Text mode and
@@ -17475,7 +17339,7 @@
(setq colon-double-space t)
@end smallexample
address@hidden Mail Aliases, Indent Tabs Mode, Text and Auto-fill, Emacs
Initialization
address@hidden Mail Aliases
@section Mail Aliases
Here is a @code{setq} that `turns on' mail aliases, along with more
@@ -17509,7 +17373,7 @@
When you write a message to George, address it to @samp{geo}; the
mailer will automatically expand @samp{geo} to the full address.
address@hidden Indent Tabs Mode, Keybindings, Mail Aliases, Emacs Initialization
address@hidden Indent Tabs Mode
@section Indent Tabs Mode
@cindex Tabs, preventing
@findex indent-tabs-mode
@@ -17547,7 +17411,7 @@
@end iftex
@need 1700
address@hidden Keybindings, Keymaps, Indent Tabs Mode, Emacs Initialization
address@hidden Keybindings
@section Some Keybindings
Now for some personal keybindings:
@@ -17660,7 +17524,7 @@
command, which not only lists the buffers,
but moves point into that window.
address@hidden Keymaps, Loading Files, Keybindings, Emacs Initialization
address@hidden Keymaps
@section Keymaps
@cindex Keymaps
@cindex Rebinding keys
@@ -17728,7 +17592,7 @@
Manual}, and @ref{Keymaps, , Keymaps, elisp, The GNU Emacs Lisp
Reference Manual}, for more information about keymaps.
address@hidden Loading Files, Autoload, Keymaps, Emacs Initialization
address@hidden Loading Files
@section Loading Files
@cindex Loading files
@c findex load
@@ -17820,7 +17684,7 @@
Emacs, emacs, The GNU Emacs Manual}, for information on the
distinction between @code{load-library} and this command.
address@hidden Autoload, Simple Extension, Loading Files, Emacs Initialization
address@hidden Autoload
@section Autoloading
@findex autoload
@@ -17889,7 +17753,7 @@
@xref{Autoload, , Autoload, elisp, The GNU Emacs Lisp Reference
Manual}, for more information.
address@hidden Simple Extension, X11 Colors, Autoload, Emacs Initialization
address@hidden Simple Extension
@section A Simple Extension: @code{line-to-top-of-window}
@findex line-to-top-of-window
@cindex Simple extension in @file{.emacs} file
@@ -18001,7 +17865,7 @@
@end group
@end smallexample
address@hidden X11 Colors, Miscellaneous, Simple Extension, Emacs Initialization
address@hidden X11 Colors
@section X11 Colors
You can specify colors when you use Emacs with the MIT X Windowing
@@ -18079,7 +17943,7 @@
@end smallexample
@need 1700
address@hidden Miscellaneous, Mode Line, X11 Colors, Emacs Initialization
address@hidden Miscellaneous
@section Miscellaneous Settings for a @file{.emacs} File
@need 1250
@@ -18271,7 +18135,7 @@
@end smallexample
@need 1700
address@hidden Mode Line, , Miscellaneous, Emacs Initialization
address@hidden Mode Line
@section A Modified Mode Line
@vindex mode-line-format
@cindex Mode line format
@@ -18434,7 +18298,7 @@
@file{~/.emacs} initialization file. A plain, default Emacs. Nothing
more.
address@hidden Debugging, Conclusion, Emacs Initialization, Top
address@hidden Debugging
@chapter Debugging
@cindex debugging
@@ -18454,7 +18318,7 @@
* Debugging Exercises::
@end menu
address@hidden debug, debug-on-entry, Debugging, Debugging
address@hidden debug
@section @code{debug}
@findex debug
@@ -18581,7 +18445,7 @@
You can correct the mistake, re-evaluate the function definition, and
then run your test again.
address@hidden debug-on-entry, debug-on-quit, debug, Debugging
address@hidden debug-on-entry
@section @code{debug-on-entry}
@findex debug-on-entry
@@ -18720,7 +18584,7 @@
@noindent
(If you are reading this in Info, cancel @code{debug-on-entry} now.)
address@hidden debug-on-quit, edebug, debug-on-entry, Debugging
address@hidden debug-on-quit
@section @code{debug-on-quit} and @code{(debug)}
In addition to setting @code{debug-on-error} or calling @code{debug-on-entry},
@@ -18752,7 +18616,7 @@
The @code{debug} function is described in detail in @ref{Debugger, ,
The Lisp Debugger, elisp, The GNU Emacs Lisp Reference Manual}.
address@hidden edebug, Debugging Exercises, debug-on-quit, Debugging
address@hidden edebug
@section The @code{edebug} Source Level Debugger
@cindex Source level debugger
@findex edebug
@@ -18895,7 +18759,7 @@
Lisp Reference Manual}.
@need 1500
address@hidden Debugging Exercises, , edebug, Debugging
address@hidden Debugging Exercises
@section Debugging Exercises
@itemize @bullet
@@ -18940,7 +18804,7 @@
stopping point.
@end itemize
address@hidden Conclusion, the-the, Debugging, Top
address@hidden Conclusion
@chapter Conclusion
We have now reached the end of this Introduction. You have now
@@ -19060,7 +18924,7 @@
@c ================ Appendix ================
address@hidden the-the, Kill Ring, Conclusion, Top
address@hidden the-the
@appendix The @code{the-the} Function
@findex the-the
@cindex Duplicated words function
@@ -19157,7 +19021,7 @@
You can substitute the other regular expressions shown above in the
function definition and try each of them on this list.
address@hidden Kill Ring, Full Graph, the-the, Top
address@hidden Kill Ring
@appendix Handling the Kill Ring
@cindex Kill ring handling
@cindex Handling the kill ring
@@ -19179,8 +19043,8 @@
* ring file::
@end menu
address@hidden What the Kill Ring Does, current-kill, Kill Ring, Kill Ring
@ifnottex
address@hidden What the Kill Ring Does
@unnumberedsec What the Kill Ring Does
@end ifnottex
@@ -19254,8 +19118,7 @@
(setq kill-ring-max old-kill-ring-max)
@end smallexample
address@hidden current-kill, yank, What the Kill Ring Does, Kill Ring
address@hidden node-name, next, previous, up
address@hidden current-kill
@appendixsec The @code{current-kill} Function
@findex current-kill
@@ -19272,8 +19135,8 @@
* Understanding current-kill::
@end menu
address@hidden Code for current-kill, Understanding current-kill, current-kill,
current-kill
@ifnottex
address@hidden Code for current-kill
@unnumberedsubsec The code for @code{current-kill}
@end ifnottex
@@ -19333,8 +19196,8 @@
(setq kill-ring-yank-pointer kill-ring)
@end smallexample
address@hidden Understanding current-kill, , Code for current-kill,
current-kill
@ifnottex
address@hidden Understanding current-kill
@unnumberedsubsec @code{current-kill} in Outline
@end ifnottex
@@ -19360,8 +19223,8 @@
* Determining the Element::
@end menu
address@hidden Body of current-kill, Digression concerning error, Understanding
current-kill, Understanding current-kill
@ifnottex
address@hidden Body of current-kill
@unnumberedsubsubsec The Body of @code{current-kill}
@end ifnottex
@@ -19443,8 +19306,8 @@
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, Body of
current-kill, Understanding current-kill
@ifnottex
address@hidden Digression concerning error
@unnumberedsubsubsec Digression about the word `error'
@end ifnottex
@@ -19465,8 +19328,8 @@
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
@ifnottex
address@hidden Determining the Element
@unnumberedsubsubsec Determining the Element
@end ifnottex
@@ -19603,8 +19466,7 @@
@ref{defun, , The @code{defun} Special Form}.)
@end ignore
address@hidden yank, yank-pop, current-kill, Kill Ring
address@hidden node-name, next, previous, up
address@hidden yank
@appendixsec @code{yank}
@findex yank
@@ -19689,8 +19551,7 @@
The last part of the function tells what to do when it succeeds.
address@hidden yank-pop, ring file, yank, Kill Ring
address@hidden node-name, next, previous, up
address@hidden yank-pop
@appendixsec @code{yank-pop}
@findex yank-pop
@@ -19760,8 +19621,7 @@
There is more, but that is the hardest part.
address@hidden ring file, , yank-pop, Kill Ring
address@hidden node-name, next, previous, up
address@hidden ring file
@appendixsec The @file{ring.el} File
@cindex @file{ring.el} file
@@ -19770,7 +19630,7 @@
as @code{kill-ring-yank-pointer} do not use this library, possibly
because they were written earlier.
address@hidden Full Graph, Free Software and Free Manuals, Kill Ring, Top
address@hidden Full Graph
@appendix A Graph with Labeled Axes
Printed axes help you understand a graph. They convey scale. In an
@@ -19787,8 +19647,8 @@
* Print Whole Graph:: The function to print a complete graph.
@end menu
address@hidden Labeled Example, print-graph Varlist, Full Graph, Full Graph
@ifnottex
address@hidden Labeled Example
@unnumberedsec Labeled Example Graph
@end ifnottex
@@ -19875,8 +19735,7 @@
We can work on each part of the @code{print-graph} function definition
in turn.
address@hidden print-graph Varlist, print-Y-axis, Labeled Example, Full Graph
address@hidden node-name, next, previous, up
address@hidden print-graph Varlist
@appendixsec The @code{print-graph} Varlist
@cindex @code{print-graph} varlist
@@ -19917,8 +19776,7 @@
As we shall see, this expression is not quite right.
@need 2000
address@hidden print-Y-axis, print-X-axis, print-graph Varlist, Full Graph
address@hidden node-name, next, previous, up
address@hidden print-Y-axis
@appendixsec The @code{print-Y-axis} Function
@cindex Axis, print vertical
@cindex Y axis printing
@@ -19956,8 +19814,8 @@
* print-Y-axis Penultimate:: A not quite final version.
@end menu
address@hidden print-Y-axis in Detail, Height of label, print-Y-axis,
print-Y-axis
@ifnottex
address@hidden print-Y-axis in Detail
@unnumberedsubsec The @code{print-Y-axis} Function in Detail
@end ifnottex
@@ -19972,8 +19830,8 @@
the fifth line from the bottom and on every line that is a multiple of
five.
address@hidden Height of label, Compute a Remainder, print-Y-axis in Detail,
print-Y-axis
@ifnottex
address@hidden Height of label
@unnumberedsubsec What height should the label be?
@end ifnottex
@@ -20010,7 +19868,7 @@
once, with a remainder of two. However, five goes into ten twice,
with no remainder: ten is an integral multiple of five.
address@hidden Compute a Remainder, Y Axis Element, Height of label,
print-Y-axis
address@hidden Compute a Remainder
@appendixsubsec Side Trip: Compute a Remainder
@findex % @r{(remainder function)}
@@ -20144,7 +20002,7 @@
final value. @xref{fwd-para let, , The @code{let*} expression}, for
more about @code{let*}.)
address@hidden Y Axis Element, Y-axis-column, Compute a Remainder, print-Y-axis
address@hidden Y Axis Element
@appendixsubsec Construct a Y Axis Element
When we print the vertical axis, we want to insert strings such as
@@ -20250,7 +20108,7 @@
expression, to convert the number to a string that is concatenated
with the leading spaces and the tic mark.
address@hidden Y-axis-column, print-Y-axis Penultimate, Y Axis Element,
print-Y-axis
address@hidden Y-axis-column
@appendixsubsec Create a Y Axis Column
The preceding functions provide all the tools needed to construct a
@@ -20297,7 +20155,7 @@
consists of the number one followed by a tic mark.
@need 2000
address@hidden print-Y-axis Penultimate, , Y-axis-column, print-Y-axis
address@hidden print-Y-axis Penultimate
@appendixsubsec The Not Quite Final Version of @code{print-Y-axis}
The list constructed by the @code{Y-axis-column} function is passed to
@@ -20373,7 +20231,7 @@
thereby getting rid of what might appear as a bug.)
@need 2000
address@hidden print-X-axis, Print Whole Graph, print-Y-axis, Full Graph
address@hidden print-X-axis
@appendixsec The @code{print-X-axis} Function
@cindex Axis, print horizontal
@cindex X axis printing
@@ -20409,8 +20267,8 @@
* X Axis Tic Marks:: Create tic marks for the horizontal axis.
@end menu
address@hidden Similarities differences, X Axis Tic Marks, print-X-axis,
print-X-axis
@ifnottex
address@hidden Similarities differences
@unnumberedsubsec Similarities and differences
@end ifnottex
@@ -20435,7 +20293,7 @@
@code{print-X-axis-numbered-line}.
@end enumerate
address@hidden X Axis Tic Marks, , Similarities differences, print-X-axis
address@hidden X Axis Tic Marks
@appendixsubsec X Axis Tic Marks
The first function should print the X axis tic marks. We must specify
@@ -20724,7 +20582,7 @@
@end group
@end smallexample
address@hidden Print Whole Graph, , print-X-axis, Full Graph
address@hidden Print Whole Graph
@appendixsec Printing the Whole Graph
@cindex Printing the whole graph
@cindex Whole graph printing
@@ -20763,8 +20621,8 @@
* Final printed graph:: The graph itself!
@end menu
address@hidden The final version, Test print-graph, Print Whole Graph, Print
Whole Graph
@ifnottex
address@hidden The final version
@unnumberedsubsec Changes for the Final Version
@end ifnottex
@@ -20915,7 +20773,7 @@
@end group
@end smallexample
address@hidden Test print-graph, Graphing words in defuns, The final version,
Print Whole Graph
address@hidden Test print-graph
@appendixsubsec Testing @code{print-graph}
@need 1250
@@ -21005,7 +20863,7 @@
feature? If you think it is a bug, and should be a `1' instead, (or
even a `0'), you can modify the sources.)
address@hidden Graphing words in defuns, lambda, Test print-graph, Print Whole
Graph
address@hidden Graphing words in defuns
@appendixsubsec Graphing Numbers of Words and Symbols
Now for the graph for which all this code was written: a graph that
@@ -21093,7 +20951,7 @@
@end group
@end smallexample
address@hidden lambda, mapcar, Graphing words in defuns, Print Whole Graph
address@hidden lambda
@appendixsubsec A @code{lambda} Expression: Useful Anonymity
@cindex Anonymous function
@findex lambda
@@ -21259,7 +21117,7 @@
Lisp Reference Manual}, for more about @code{lambda}. Lisp and lambda
expressions derive from the Lambda Calculus.
address@hidden mapcar, Another Bug, lambda, Print Whole Graph
address@hidden mapcar
@appendixsubsec The @code{mapcar} Function
@findex mapcar
@@ -21343,7 +21201,7 @@
50 defuns had that many words or symbols---but not necessarily meaning
that none had that many words or symbols.)
address@hidden Another Bug, Final printed graph, mapcar, Print Whole Graph
address@hidden Another Bug
@appendixsubsec Another Bug @dots{} Most Insidious
@cindex Bug, most insidious type
@cindex Insidious type of bug
@@ -22040,7 +21898,7 @@
@end ignore
@page
address@hidden Final printed graph, , Another Bug, Print Whole Graph
address@hidden Final printed graph
@appendixsubsec The Printed Graph
When made and installed, you can call the @code{print-graph} command
@@ -22090,7 +21948,7 @@
@noindent
The largest group of functions contain 10 -- 19 words and symbols each.
address@hidden Free Software and Free Manuals, GNU Free Documentation License,
Full Graph, Top
address@hidden Free Software and Free Manuals
@appendix Free Software and Free Manuals
@strong{by Richard M. Stallman}
@@ -22210,14 +22068,13 @@
that lists free books available from other publishers:@*
@uref{http://www.gnu.org/doc/other-free-books.html}
address@hidden GNU Free Documentation License, Index, Free Software and Free
Manuals, Top
address@hidden GNU Free Documentation License
@appendix GNU Free Documentation License
@cindex FDL, GNU Free Documentation License
@include doclicense.texi
address@hidden Index, About the Author, GNU Free Documentation License, Top
address@hidden node-name, next, previous, up
address@hidden Index
@unnumbered Index
@ignore
@@ -22256,7 +22113,7 @@
@end iftex
@ifnottex
address@hidden About the Author, , Index, Top
address@hidden About the Author
@unnumbered About the Author
@end ifnottex
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r108412: * doc/lispintro/emacs-lisp-intro.texi: Nuke hand-written node pointers.,
Glenn Morris <=