2007-03-31 Eli Zaretskii <eliz@gnu.org>
+ * intro.texi (nil and t):
+ * symbols.texi (Plists and Alists):
+ * variables.texi (Variable Aliases, Constant Variables):
+ * functions.texi (Defining Functions):
+ * advice.texi (Advising Primitives):
+ * debugging.texi (Syntax Errors, Compilation Errors):
+ * minibuf.texi (Minibuffer Windows):
+ * commands.texi (Adjusting Point):
+ * modes.texi (Syntactic Font Lock, Faces for Font Lock)
+ (Auto Major Mode, Major Mode Conventions):
+ * help.texi (Describing Characters):
+ * files.texi (Create/Delete Dirs, Information about Files)
+ (File Locks, Writing to Files, Reading from Files)
+ (Saving Buffers):
+ * windows.texi (Resizing Windows, Cyclic Window Ordering):
+ * frames.texi (Finding All Frames):
+ * positions.texi (Buffer End, Motion):
+ * markers.texi (The Region):
+ * text.texi (Deletion, Near Point):
+ * display.texi (Displaying Messages, Truncation):
+ * os.texi (Processor Run Time):
+ * tips.texi (Key Binding Conventions, Programming Tips)
+ (Warning Tips, Documentation Tips, Comment Tips):
+ * internals.texi (Memory Usage): Improve indexing.
+
* variables.texi (Frame-Local Variables):
* functions.texi (Argument List):
* loading.texi (Library Search):
@node Advising Primitives
@section Advising Primitives
+@cindex advising primitives
Advising a primitive function (also called a ``subr'') is risky.
Some primitive functions are used by the advice mechanism; advising
@node Adjusting Point
@section Adjusting Point After Commands
+@cindex adjust point
+@cindex invisible or intangible text, and point display
+@cindex @code{display} property, and point display
+@cindex @code{composition} property, and point display
It is not easy to display a value of point in the middle of a
sequence of text that has the @code{display}, @code{composition} or
@node Syntax Errors
@section Debugging Invalid Lisp Syntax
+@cindex debugging invalid Lisp syntax
The Lisp reader reports invalid syntax, but cannot say where the real
problem is. For example, the error ``End of file during parsing'' in
if it goes to the place where that defun appears to end. If it does
not, there is a problem in that defun.
+@cindex unbalanced parentheses
+@cindex parentheses mismatch
However, unmatched parentheses are the most common syntax errors in
Lisp, and we can give further advice for those cases. (In addition,
just moving point through the code with Show Paren mode enabled might
@node Compilation Errors
@section Debugging Problems in Compilation
+@cindex debugging byte compilation problems
When an error happens during byte compilation, it is normally due to
invalid syntax in the program you are compiling. The compiler prints a
@node Truncation
@section Truncation
@cindex line wrapping
+@cindex line truncation
@cindex continuation lines
@cindex @samp{$} in display
@cindex @samp{\} in display
@node Displaying Messages
@subsection Displaying Messages in the Echo Area
+@cindex display message in echo area
This section describes the functions for explicitly producing echo
area messages. Many other Emacs features display messages there, too.
@node Saving Buffers
@section Saving Buffers
+@cindex saving buffers
When you edit a file in Emacs, you are actually working on a buffer
that is visiting that file---that is, the contents of the file are
@node Reading from Files
@comment node-name, next, previous, up
@section Reading from Files
+@cindex reading from files
You can copy a file from the disk and insert it into a buffer
using the @code{insert-file-contents} function. Don't use the user-level
@node Writing to Files
@comment node-name, next, previous, up
@section Writing to Files
+@cindex writing to files
You can write the contents of a buffer, or part of a buffer, directly
to a file on disk using the @code{append-to-file} and
@node File Locks
@section File Locks
@cindex file locks
+@cindex lock file
When two users edit the same file at the same time, they are likely
to interfere with each other. Emacs tries to prevent this situation
@node Information about Files
@section Information about Files
+@cindex information about files
+@cindex file, information about
The functions described in this section all operate on strings that
designate file names. With a few exceptions, all the functions have
@node Create/Delete Dirs
@section Creating and Deleting Directories
+@cindex creating and deleting directories
@c Emacs 19 features
Most Emacs Lisp file-manipulation functions get errors when used on
@node Finding All Frames
@section Finding All Frames
+@cindex finding all frames
@defun frame-list
The function @code{frame-list} returns a list of all the frames that
deliberate redefinition from unintentional redefinition.
@end defspec
+@cindex function aliases
@defun defalias name definition &optional docstring
@anchor{Definition of defalias}
This special form defines the symbol @var{name} as a function, with
@node Describing Characters
@section Describing Characters for Help Messages
+@cindex describe characters and events
These functions convert events, key sequences, or characters to
textual descriptions. These descriptions are useful for including
@node Memory Usage
@section Memory Usage
+@cindex memory usage
These functions and variables give information about the total amount
of memory allocation that Emacs has done, broken down by data type.
@node nil and t
@subsection @code{nil} and @code{t}
-@cindex @code{nil}, uses of
@cindex truth value
@cindex boolean
-@cindex false
+@cindex @code{nil}
+@cindex false
In Lisp, the symbol @code{nil} has three separate meanings: it
is a symbol with the name @samp{nil}; it is the logical truth value
@var{false}; and it is the empty list---the list of zero elements.
(setq foo-flag nil) ; @r{Emphasize the truth value @var{false}}
@end example
-@cindex @code{t}, uses of
+@cindex @code{t}
@cindex true
In contexts where a truth value is expected, any non-@code{nil} value
is considered to be @var{true}. However, @code{t} is the preferred way
@node The Region
@section The Region
-@cindex region, the
+@cindex region between mark and point
The text between point and the mark is known as @dfn{the region}.
Various functions operate on text delimited by point and the mark, but
@node Minibuffer Windows
@section Minibuffer Windows
+@cindex minibuffer windows
These functions access and select minibuffer windows
and test whether they are active.
@node Major Mode Conventions
@subsection Major Mode Conventions
+@cindex major mode conventions
+@cindex conventions for writing major modes
The code for existing major modes follows various coding conventions,
including conventions for local keymap and syntax table initialization,
@node Auto Major Mode
@subsection How Emacs Chooses a Major Mode
+@cindex major mode, automatic selection
Based on information in the file name or in the file itself, Emacs
automatically selects a major mode for the new buffer when a file is
@node Faces for Font Lock
@subsection Faces for Font Lock
+@cindex faces for font lock
+@cindex font lock faces
You can make Font Lock mode use any face, but several faces are
defined specifically for Font Lock mode. Each of these symbols is both
@node Syntactic Font Lock
@subsection Syntactic Font Lock
+@cindex syntactic font lock
Syntactic fontification uses the syntax table to find comments and
string constants (@pxref{Syntax Tables}). It highlights them using
@node Processor Run Time
@section Processor Run time
+@cindex processor run time
@defun get-internal-run-time
This function returns the processor run time used by Emacs as a list
@node Motion
@section Motion
+@cindex motion by characters, words, lines, lists
Motion functions change the value of point, either relative to the
current value of point, relative to the beginning or end of the buffer,
@node Buffer End Motion
@subsection Motion to an End of the Buffer
+@cindex move to beginning or end of buffer
To move point to the beginning of the buffer, write:
@node Plists and Alists
@subsection Property Lists and Association Lists
+@cindex plist vs alist
+@cindex alist vs plist
@cindex property lists vs association lists
Association lists (@pxref{Association Lists}) are very similar to
@node Near Point
@section Examining Text Near Point
+@cindex text near point
Many functions are provided to look at the characters around point.
Several simple functions are described here. See also @code{looking-at}
@node Deletion
@section Deleting Text
+@cindex text deletion
@cindex deletion vs killing
Deletion means removing part of the text in a buffer, without saving
@node Key Binding Conventions
@section Key Binding Conventions
+@cindex key binding, conventions for
@itemize @bullet
@item
@node Programming Tips
@section Emacs Programming Tips
+@cindex programming conventions
Following these conventions will make your program fit better
into Emacs when it runs.
@node Warning Tips
@section Tips for Avoiding Compiler Warnings
+@cindex byte compiler warnings, how to avoid
@itemize @bullet
@item
@node Documentation Tips
@section Tips for Documentation Strings
+@cindex documentation strings, conventions and tips
@findex checkdoc-minor-mode
Here are some tips and conventions for the writing of documentation
@node Comment Tips
@section Tips on Writing Comments
+@cindex comments, convention for
We recommend these conventions for where to put comments and how to
indent them:
@node Constant Variables
@section Variables that Never Change
-@vindex nil
-@vindex t
@kindex setting-constant
@cindex keyword symbol
+@cindex constant variables
+@cindex symbols that evaluate to themselves
+@cindex symbols with constant values
In Emacs Lisp, certain symbols normally evaluate to themselves. These
include @code{nil} and @code{t}, as well as any symbol whose name starts
@node Variable Aliases
@section Variable Aliases
+@cindex variable aliases
It is sometimes useful to make two variables synonyms, so that both
variables always have the same value, and changing either one also
the order is left to right, or top to bottom.
@defun next-window &optional window minibuf all-frames
-@cindex minibuffer window
+@cindex minibuffer window, and @code{next-window}
This function returns the window following @var{window} in the cyclic
ordering of windows. This is the window that @kbd{C-x o} would select
if typed when @var{window} is selected. If @var{window} is the only
@node Resizing Windows
@section Changing the Size of a Window
@cindex window resizing
+@cindex resize window
@cindex changing window size
@cindex window size, changing