+2005-09-08 Chong Yidong <cyd@stupidchicken.com>
+
+ * locals.texi (Standard Buffer-Local Variables): Don't include
+ mode variables for minor modes.
+ Fix xrefs for buffer-display-count, buffer-display-table,
+ buffer-offer-save, buffer-saved-size, cache-long-line-scans,
+ enable-multibyte-characters, fill-column, header-line-format,
+ left-fringe-width, left-margin, and right-fringe-width.
+
+ * hooks.texi (Standard Hooks): All hooks should conform to the
+ standard naming convention now.
+ Fix xref for `echo-area-clear-hook'.
+
+ * display.texi (Usual Display): Note that indicate-empty-lines and
+ tab-width are buffer-local.
+
+ * files.texi (Saving Buffers): Add xref to `Killing Buffers'.
+
+ * modes.texi (Mode Help): Note that major-mode is buffer-local.
+
+ * nonascii.texi (Encoding and I/O): Note that
+ buffer-file-coding-system is buffer-local.
+
+ * positions.texi (List Motion): Note that defun-prompt-regexp is
+ buffer-local.
+
+ * text.texi (Auto Filling): Note that auto-fill-function is
+ buffer-local.
+ (Undo): Note that buffer-undo-list is buffer-local.
+
+ * windows.texi (Buffers and Windows): Document
+ buffer-display-count.
+
2005-09-06 Richard M. Stallman <rms@gnu.org>
* tips.texi (Coding Conventions): Sometimes it is ok to put the
@end defvar
@defopt tab-width
-The value of this variable is the spacing between tab stops used for
-displaying tab characters in Emacs buffers. The value is in units of
-columns, and the default is 8. Note that this feature is completely
-independent of the user-settable tab stops used by the command
-@code{tab-to-tab-stop}. @xref{Indent Tabs}.
+The value of this buffer-local variable is the spacing between tab
+stops used for displaying tab characters in Emacs buffers. The value
+is in units of columns, and the default is 8. Note that this feature
+is completely independent of the user-settable tab stops used by the
+command @code{tab-to-tab-stop}. @xref{Indent Tabs}.
@end defopt
@defopt indicate-empty-lines
When this is non-@code{nil}, Emacs displays a special glyph in the
fringe of each empty line at the end of the buffer, on terminals that
support it (window systems). @xref{Fringes}.
+This variable is automatically buffer-local in every buffer.
@end defopt
@defvar indicate-buffer-boundaries
If it is @code{nil}, that means to ask only about file-visiting buffers.
If it is @code{t}, that means also offer to save certain other non-file
buffers---those that have a non-@code{nil} buffer-local value of
-@code{buffer-offer-save}. (A user who says @samp{yes} to saving a
-non-file buffer is asked to specify the file name to use.) The
-@code{save-buffers-kill-emacs} function passes the value @code{t} for
-@var{pred}.
+@code{buffer-offer-save} (@pxref{Killing Buffers}). A user who says
+@samp{yes} to saving a non-file buffer is asked to specify the file
+name to use.) The @code{save-buffers-kill-emacs} function passes the
+value @code{t} for @var{pred}.
If @var{pred} is neither @code{t} nor @code{nil}, then it should be
a function of no arguments. It will be called in each buffer to decide
The variables whose names end in @samp{-hooks} or @samp{-functions} are
usually @dfn{abnormal hooks}; their values are lists of functions, but
these functions are called in a special way (they are passed arguments,
-or their values are used). A few of these variables are actually normal
-hooks which were named before we established the convention that normal
-hooks' names should end in @samp{-hook}.
+or their values are used). The variables whose names end in
+@samp{-function} have single functions as their values.
-The variables whose names end in @samp{-function} have single functions
-as their values. (In older Emacs versions, some of these variables had
-names ending in @samp{-hook} even though they were not normal hooks;
-however, we have renamed all of those.)
+(In older Emacs versions, some normal hooks had names ending in
+@samp{-hooks} or @samp{-functions}, and some abnormal hooks had names
+ending in @samp{-hook}. We have renamed all of these to conform to
+the above conventions.)
@c We need to xref to where each hook is documented or else document
@c it here.
@xref{Disabling Commands}.
@item echo-area-clear-hook
-@xref{The Echo Area}.
+@xref{Echo Area Customization}.
@item emacs-startup-hook
@xref{Init File}.
buffer. Many Lisp packages define such variables for their internal
use, but we don't try to list them all here.
-@table @code
-@item abbrev-mode
-@xref{Abbrevs}.
+Each minor modes defines a buffer-local variable named
+@samp{@var{modename}-mode}. @xref{Minor Mode Conventions}. Minor
+mode variables will not be listed here.
+@table @code
@item auto-fill-function
@xref{Auto Filling}.
@xref{Auto-Saving}.
@item buffer-backed-up
-@xref{Backup Files}.
+@xref{Making Backups}.
@item buffer-display-count
-@xref{Displaying Buffers}.
+@xref{Buffers and Windows}.
@item buffer-display-table
-@xref{Display Tables}.
+@xref{Active Display Table}.
@item buffer-display-time
@xref{Buffers and Windows}.
@xref{Invisible Text}.
@item buffer-offer-save
-@xref{Saving Buffers}.
+@xref{Killing Buffers}.
@item buffer-read-only
@xref{Read Only Buffers}.
@item buffer-saved-size
-@xref{Point}.
+@xref{Auto-Saving}.
@item buffer-undo-list
@xref{Undo}.
@item cache-long-line-scans
-@xref{Text Lines}.
+@xref{Truncation}.
@item case-fold-search
@xref{Searching and Case}.
@end ignore
@item enable-multibyte-characters
-@ref{Non-ASCII Characters}.
+@ref{Text Representations}.
@item fill-column
-@xref{Auto Filling}.
+@xref{Margins}.
@item fringes-outside-margins
@xref{Fringes}.
@xref{Moving Point,,, emacs, The GNU Emacs Manual}.
@item header-line-format
-@xref{Mode Line Data}.
+@xref{Header Lines}.
@item indicate-buffer-boundaries
@xref{Usual Display}.
@xref{Usual Display}.
@item left-fringe-width
-@xref{Fringes}.
+@xref{Fringe Size/Pos}.
@item left-margin
-@xref{Indentation}.
+@xref{Margins}.
@item left-margin-width
@xref{Display Margins}.
@xref{Line Height}.
@item local-abbrev-table
-@xref{Abbrevs}.
+@xref{Standard Abbrev Tables}.
@item major-mode
@xref{Mode Help}.
@item mode-name
@xref{Mode Line Variables}.
-@item overwrite-mode
-@xref{Insertion}.
-
@item point-before-scroll
Used for communication between mouse commands and scroll-bar commands.
@item right-fringe-width
-@xref{Fringes}.
+@xref{Fringe Size/Pos}.
@item right-margin-width
@xref{Display Margins}.
@item truncate-lines
@xref{Truncation}.
-@item vc-mode
-@xref{Mode Line Variables}.
-
@item vertical-scroll-bar
@xref{Scroll Bars}.
@end table
@end deffn
@defvar major-mode
-This variable holds the symbol for the current buffer's major mode.
-This symbol should have a function definition that is the command to
-switch to that major mode. The @code{describe-mode} function uses the
-documentation string of the function as the documentation of the major
-mode.
+This buffer-local variable holds the symbol for the current buffer's
+major mode. This symbol should have a function definition that is the
+command to switch to that major mode. The @code{describe-mode}
+function uses the documentation string of the function as the
+documentation of the major mode.
@end defvar
@node Derived Modes
you will want to find out afterwards which coding system was chosen.
@defvar buffer-file-coding-system
-This variable records the coding system that was used for visiting the
-current buffer. It is used for saving the buffer, and for writing part
+This buffer-local variable records the coding system that was used to visit
+the current buffer. It is used for saving the buffer, and for writing part
of the buffer with @code{write-region}. If the text to be written
cannot be safely encoded using the coding system specified by this
variable, these operations select an alternative encoding by calling
@end deffn
@defopt defun-prompt-regexp
-If non-@code{nil}, this variable holds a regular expression that
-specifies what text can appear before the open-parenthesis that starts a
-defun. That is to say, a defun begins on a line that starts with a
-match for this regular expression, followed by a character with
-open-parenthesis syntax.
+If non-@code{nil}, this buffer-local variable holds a regular
+expression that specifies what text can appear before the
+open-parenthesis that starts a defun. That is to say, a defun begins
+on a line that starts with a match for this regular expression,
+followed by a character with open-parenthesis syntax.
@end defopt
@defopt open-paren-in-column-0-is-defun-start
list, which is in the variable @code{buffer-undo-list}.
@defvar buffer-undo-list
-This variable's value is the undo list of the current buffer.
-A value of @code{t} disables the recording of undo information.
+This buffer-local variable's value is the undo list of the current
+buffer. A value of @code{t} disables the recording of undo information.
@end defvar
Here are the kinds of elements an undo list can have:
justification style to refill portions of the text. @xref{Margins}.
@defvar auto-fill-function
-The value of this variable should be a function (of no arguments) to be
-called after self-inserting a character from the table
+The value of this buffer-local variable should be a function (of no
+arguments) to be called after self-inserting a character from the table
@code{auto-fill-chars}. It may be @code{nil}, in which case nothing
special is done in that case.
widths of @var{window} remain unchanged. @xref{Fringes}.
@end defun
+@defvar buffer-display-count
+This buffer-local variable records the number of times a buffer is
+displayed in a window. It is incremented each time
+@code{set-window-buffer} is called for the buffer.
+@end defvar
+
@defun window-buffer &optional window
This function returns the buffer that @var{window} is displaying. If
@var{window} is omitted, this function returns the buffer for the