aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
diff options
context:
space:
mode:
authorJoakim Verona2012-03-06 09:23:09 +0100
committerJoakim Verona2012-03-06 09:23:09 +0100
commit28485daaf752ff5264ed2f6a32ec15588beaa929 (patch)
treea480205aa664c61b1d212833144c0a2d44f7ac01 /doc/lispref
parente8e42079e76ca6255bbd53312994ba8e1b3b0ee8 (diff)
parent2e86d8576c668e149cc100f3222bcf19b38019dc (diff)
downloademacs-28485daaf752ff5264ed2f6a32ec15588beaa929.tar.gz
emacs-28485daaf752ff5264ed2f6a32ec15588beaa929.zip
upstream
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/ChangeLog169
-rw-r--r--doc/lispref/Makefile.in3
-rw-r--r--doc/lispref/README25
-rw-r--r--doc/lispref/abbrevs.texi121
-rw-r--r--doc/lispref/advice.texi4
-rw-r--r--doc/lispref/anti.texi10
-rw-r--r--doc/lispref/backups.texi56
-rw-r--r--doc/lispref/buffers.texi61
-rw-r--r--doc/lispref/commands.texi9
-rw-r--r--doc/lispref/control.texi2
-rw-r--r--doc/lispref/display.texi32
-rw-r--r--doc/lispref/elisp.texi19
-rw-r--r--doc/lispref/errors.texi35
-rw-r--r--doc/lispref/files.texi234
-rw-r--r--doc/lispref/frames.texi388
-rw-r--r--doc/lispref/help.texi1
-rw-r--r--doc/lispref/hooks.texi367
-rw-r--r--doc/lispref/internals.texi305
-rw-r--r--doc/lispref/intro.texi17
-rw-r--r--doc/lispref/keymaps.texi4
-rw-r--r--doc/lispref/locals.texi217
-rw-r--r--doc/lispref/makefile.w32-in3
-rw-r--r--doc/lispref/maps.texi286
-rw-r--r--doc/lispref/modes.texi11
-rw-r--r--doc/lispref/objects.texi2
-rw-r--r--doc/lispref/os.texi16
-rw-r--r--doc/lispref/positions.texi19
-rw-r--r--doc/lispref/processes.texi2
-rw-r--r--doc/lispref/searching.texi1
-rw-r--r--doc/lispref/tips.texi273
-rw-r--r--doc/lispref/variables.texi4
-rw-r--r--doc/lispref/vol1.texi16
-rw-r--r--doc/lispref/vol2.texi16
-rw-r--r--doc/lispref/windows.texi10
34 files changed, 1328 insertions, 1410 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 575902336cd..7f11c65f9e1 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,172 @@
12012-03-05 Chong Yidong <cyd@gnu.org>
2
3 * positions.texi (Text Lines): Document count-words.
4
52012-03-04 Chong Yidong <cyd@gnu.org>
6
7 * frames.texi (Frames): Remove little-used "terminal frame" and
8 "window frame" terminology.
9 (Frame Parameters, Font and Color Parameters, Initial Parameters)
10 (Size and Position, Visibility of Frames): Callers changed.
11 (Frames): Clarify which terminals in framep are graphical.
12 (Initial Parameters): --geometry is not the only option which adds
13 to initial-frame-alist.
14 (Position Parameters): Note that icon-left and icon-top are for
15 old window managers only.
16 (Size Parameters): Sizes are in characters even on graphical
17 displays.
18 (Management Parameters): Note that window-id and outer-window-id
19 can't really be changed, and that auto-raise isn't always obeyed.
20 (Cursor Parameters): Document cursor-type explicitly.
21 (Size and Position): The aliases set-screen-height and
22 set-screen-width have been deleted.
23 (Visibility of Frames): Mention "minimization".
24
25 * os.texi (Startup Summary): Minor clarifications.
26 (Startup Summary, Suspending Emacs): Standardize on "text
27 terminal" terminology.
28
29 * windows.texi (Basic Windows, Coordinates and Windows)
30 (Coordinates and Windows):
31 * display.texi (Refresh Screen, Line Height, Face Attributes)
32 (Overlay Arrow, Beeping, Glyphless Chars): Likewise.
33
342012-03-04 Glenn Morris <rgm@gnu.org>
35
36 * abbrevs.texi: Small copyedits throughout.
37 (Abbrev Mode): Remove this section, folding it into the top-level.
38 (Abbrev Tables): Don't mention irrelevant return values.
39 (Abbrev Expansion): Add cross-ref for wrapper hooks.
40 (Standard Abbrev Tables): Emacs Lisp mode now has its own table.
41 (Abbrev Table Properties): Update nil :regexp description.
42
432012-03-03 Glenn Morris <rgm@gnu.org>
44
45 * internals.texi: Change @appendix section commands to @section.
46 (Building Emacs): Say less about CANNOT_DUMP platforms.
47 Replace deleted eval-at-startup with custom-initialize-delay.
48 (Pure Storage): Small changes.
49 (Memory Usage): Copyedit.
50 (Writing Emacs Primitives): Update Fcoordinates_in_window_p and For
51 example definitions. Give examples of things with non-nil
52 interactive args. Mention eval_sub. Remove old info about
53 strings and GCPRO. Mention cus-start.el.
54 (Buffer Internals, Window Internals, Process Internals):
55 Misc small updates and fixes for fields.
56
57 * tips.texi: Copyedits.
58 (Coding Conventions): Mention autoloads.
59 Combine partially duplicated macro items. Fix xref.
60 Refer to Library Headers for copyright notice.
61 (Programming Tips): edit-options is long-obsolete.
62 (Compilation Tips): Mention loading bytecomp for byte-compile props.
63 (Warning Tips): Mention declare-function.
64 (Documentation Tips): Remove old info.
65 (Comment Tips): Mention comment-dwim, not indent-for-comment.
66 (Library Headers): General update.
67
682012-03-02 Glenn Morris <rgm@gnu.org>
69
70 * backups.texi (Reverting): Un-duplicate revert-buffer-in-progress-p,
71 and relocate entry. Mention buffer-stale-function.
72
73 * elisp.texi, vol1.texi, vol2.texi: Standardize some menu entries.
74
75 * hooks.texi (Standard Hooks): General update.
76 Put related hooks together. Add and remove items.
77 * commands.texi (Keyboard Macros): Remove cross-ref to Standard Hooks.
78 * modes.texi (Hooks): Tweak cross-ref description.
79
802012-03-01 Michael Albinus <michael.albinus@gmx.de>
81
82 * files.texi (Kinds of Files): The return value of file-equal-p is
83 unspecified, if FILE1 or FILE2 does not exist.
84
852012-03-01 Glenn Morris <rgm@gnu.org>
86
87 * hooks.texi (Standard Hooks): Remove mode-specific hooks.
88
89 * maps.texi (Standard Keymaps): General update.
90 Remove mode-specific maps, talk about the more general keymaps.
91 * help.texi (Help Functions): Add vindex for Helper-help-map.
92 * keymaps.texi (Active Keymaps): Minor rephrasing.
93
942012-02-29 Glenn Morris <rgm@gnu.org>
95
96 * elisp.texi, vol1.texi, vol2.texi: Use "" quotes in menus.
97
982012-02-28 Thierry Volpiatto <thierry.volpiatto@gmail.com>
99
100 * files.texi (Kinds of Files): Rename files-equal-p to file-equal-p.
101 Update changed behavior of file-subdir-of-p.
102
1032012-02-28 Glenn Morris <rgm@gnu.org>
104
105 * advice.texi, anti.texi, display.texi, elisp.texi:
106 * processes.texi, variables.texi, vol1.texi, vol2.texi:
107 Standardize possessive apostrophe usage.
108
109 * locals.texi: Remove file.
110 * elisp.texi, vol1.texi, vol2.texi: Don't include locals.texi.
111 Remove menu entry.
112 * errors.texi, maps.texi: Adjust node pointers.
113 * internals.texi (Buffer Internals): Remove cross-refs to locals.texi.
114 * makefile.w32-in (srcs):
115 * Makefile.in (srcs): Remove locals.texi.
116
117 * frames.texi (Mouse Position): Fix cross-ref.
118
1192012-02-27 Chong Yidong <cyd@gnu.org>
120
121 * buffers.texi (Creating Buffers): Clarify that
122 generate-new-buffer uses generate-new-buffer-names.
123 (Killing Buffers): Remove bogus example duplicating buffer-live-p.
124
125 * files.texi (Directory Names): Index entry for file name abbreviations.
126 (Relative File Names, File Name Expansion): Refer to it.
127 (Locating Files): Move locate-user-emacs-file documentation to
128 Standard File Names.
129 (Standard File Names): Add locate-user-emacs-file; update examples.
130
1312012-02-26 Michael Albinus <michael.albinus@gmx.de>
132
133 * files.texi (Magic File Names): Add files-equal-p and file-subdir-of-p.
134
1352012-02-26 Chong Yidong <cyd@gnu.org>
136
137 * files.texi (Kinds of Files): Improve documentation of
138 files-equal-p and file-subdir-of-p.
139
1402012-02-26 Glenn Morris <rgm@gnu.org>
141
142 * intro.texi (Acknowledgements): Small changes.
143
1442012-02-25 Glenn Morris <rgm@gnu.org>
145
146 * errors.texi: Don't try to list _all_ the error symbols.
147 Add circular-list, cl-assertion-failed, compression-error.
148 * elisp.texi, vol1.texi, vol2.texi:
149 * control.texi (Error Symbols): Tweak "Standard Errors" description.
150
1512012-02-25 Thierry Volpiatto <thierry.volpiatto@gmail.com>
152
153 * files.texi (files-equal-p, file-subdir-of-p): New,
154 add initial documentation.
155
1562012-02-25 Chong Yidong <cyd@gnu.org>
157
158 * files.texi (File Attributes): Document file-selinux-context.
159 (Changing Files): Link to it.
160 (Changing Files): Document set-file-selinux-context.
161
162 * backups.texi (Making Backups): Return value of backup-buffer is
163 changed. Mention default value of backup-directory-alist.
164 (Rename or Copy): Note that backup-by-copying-when-mismatch is t.
165 (Auto-Saving): New minor mode behavior for auto-save-mode.
166 (Reverting): Add defvar for revert-buffer-in-progress-p.
167
168 * searching.texi (Regexp Backslash): Add index entry (Bug#10869).
169
12012-02-24 Glenn Morris <rgm@gnu.org> 1702012-02-24 Glenn Morris <rgm@gnu.org>
2 171
3 * errors.texi (Standard Errors): Mention dbus-error. 172 * errors.texi (Standard Errors): Mention dbus-error.
diff --git a/doc/lispref/Makefile.in b/doc/lispref/Makefile.in
index 4128eb06d7f..5094a3f8ab6 100644
--- a/doc/lispref/Makefile.in
+++ b/doc/lispref/Makefile.in
@@ -1,6 +1,6 @@
1# Makefile for the GNU Emacs Lisp Reference Manual. 1# Makefile for the GNU Emacs Lisp Reference Manual.
2 2
3# Copyright (C) 1990-1996, 1998-2012 Free Software Foundation, Inc. 3# Copyright (C) 1990-1996, 1998-2012 Free Software Foundation, Inc.
4 4
5# This file is part of GNU Emacs. 5# This file is part of GNU Emacs.
6 6
@@ -70,7 +70,6 @@ srcs = \
70 $(srcdir)/keymaps.texi \ 70 $(srcdir)/keymaps.texi \
71 $(srcdir)/lists.texi \ 71 $(srcdir)/lists.texi \
72 $(srcdir)/loading.texi \ 72 $(srcdir)/loading.texi \
73 $(srcdir)/locals.texi \
74 $(srcdir)/macros.texi \ 73 $(srcdir)/macros.texi \
75 $(srcdir)/maps.texi \ 74 $(srcdir)/maps.texi \
76 $(srcdir)/markers.texi \ 75 $(srcdir)/markers.texi \
diff --git a/doc/lispref/README b/doc/lispref/README
index df808e4bcab..0230f4718c8 100644
--- a/doc/lispref/README
+++ b/doc/lispref/README
@@ -1,37 +1,36 @@
1Copyright (C) 2001-2012 Free Software Foundation, Inc. 1Copyright (C) 2001-2012 Free Software Foundation, Inc. -*- outline -*-
2See the end of the file for license conditions. 2See the end of the file for license conditions.
3 3
4 4
5README for Edition 3.0 of the Emacs Lisp Reference Manual. 5README for the Emacs Lisp Reference Manual.
6 6
7* This directory contains the texinfo source files for the Emacs Lisp 7* This directory contains the texinfo source files for the Emacs Lisp
8Reference Manual. 8Reference Manual.
9 9
10* Report bugs in the Lisp Manual or in Emacs using M-x report-emacs-bug. 10* Report bugs in the Lisp Manual (or in Emacs) using M-x report-emacs-bug.
11To ask questions, use the newsgroup gnu.emacs.help. 11To ask questions, use the help-gnu-emacs mailing list.
12 12
13* The Emacs Lisp Reference Manual is quite large. It totals around 13* The Emacs Lisp Reference Manual is quite large. It totals around
141100 pages in smallbook format; the info files total around 3.0 megabytes. 141100 pages in smallbook format; the info files total around 3.0 megabytes.
15 15
16* You can format this manual either for Info or for printing hardcopy 16* You can format this manual for Info, for printing hardcopy using TeX,
17using TeX. 17or for HTML.
18 18
19* You can buy nicely printed copies from the Free Software Foundation. 19* You can buy nicely printed copies from the Free Software Foundation.
20Buying a manual from the Free Software Foundation helps support our GNU 20Buying a manual from the Free Software Foundation helps support our GNU
21development work. See <http://shop.fsf.org/>. 21development work. See <http://shop.fsf.org/>.
22(At time of writing, this manual is out of print.)
22 23
23* The master file for formatting this manual for Tex is called 24* The master file for formatting this manual for Tex is called `elisp.texi'.
24`elisp.texi'. It contains @include commands to include all the 25It contains @include commands to include all the chapters that make up
25chapters that make up the manual. In addition, `elisp.texi' has 26the manual.
26the title page in a new format designed by Karl Berry, using the
27@titlespec command.
28 27
29* This distribution contains a Makefile that you can use with GNU Make. 28* This distribution contains a Makefile that you can use with GNU Make.
30 29
31** To create a DVI file with a sorted index, run `make elisp.dvi'.
32
33** To make an Info file, you need to install Texinfo, then run `make info'. 30** To make an Info file, you need to install Texinfo, then run `make info'.
34 31
32** Use `make elisp.pdf' or `make elisp.html' to create PDF or HTML versions.
33
35 34
36This file is part of GNU Emacs. 35This file is part of GNU Emacs.
37 36
diff --git a/doc/lispref/abbrevs.texi b/doc/lispref/abbrevs.texi
index f7fd8b541ed..a64e8a0bd51 100644
--- a/doc/lispref/abbrevs.texi
+++ b/doc/lispref/abbrevs.texi
@@ -1,6 +1,6 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1994, 1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1994, 1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/abbrevs 5@setfilename ../../info/abbrevs
6@node Abbrevs, Processes, Syntax Tables, Top 6@node Abbrevs, Processes, Syntax Tables, Top
@@ -37,14 +37,15 @@ When abbrevs are saved to an abbrev file, system abbrevs are omitted.
37 Because the symbols used for abbrevs are not interned in the usual 37 Because the symbols used for abbrevs are not interned in the usual
38obarray, they will never appear as the result of reading a Lisp 38obarray, they will never appear as the result of reading a Lisp
39expression; in fact, normally they are never used except by the code 39expression; in fact, normally they are never used except by the code
40that handles abbrevs. Therefore, it is safe to use them in an 40that handles abbrevs. Therefore, it is safe to use them in a
41extremely nonstandard way. 41nonstandard way.
42 42
43 For the user-level commands for abbrevs, see @ref{Abbrevs,, Abbrev 43 If the minor mode Abbrev mode is enabled, the buffer-local variable
44Mode, emacs, The GNU Emacs Manual}. 44@code{abbrev-mode} is non-@code{nil}, and abbrevs are automatically
45expanded in the buffer. For the user-level commands for abbrevs, see
46@ref{Abbrevs,, Abbrev Mode, emacs, The GNU Emacs Manual}.
45 47
46@menu 48@menu
47* Abbrev Mode:: Setting up Emacs for abbreviation.
48* Tables: Abbrev Tables. Creating and working with abbrev tables. 49* Tables: Abbrev Tables. Creating and working with abbrev tables.
49* Defining Abbrevs:: Specifying abbreviations and their expansions. 50* Defining Abbrevs:: Specifying abbreviations and their expansions.
50* Files: Abbrev Files. Saving abbrevs in files. 51* Files: Abbrev Files. Saving abbrevs in files.
@@ -56,22 +57,7 @@ Mode, emacs, The GNU Emacs Manual}.
56 Which properties have which effect. 57 Which properties have which effect.
57@end menu 58@end menu
58 59
59@node Abbrev Mode, Abbrev Tables, Abbrevs, Abbrevs 60@node Abbrev Tables, Defining Abbrevs, Abbrevs, Abbrevs
60@comment node-name, next, previous, up
61@section Setting Up Abbrev Mode
62
63 Abbrev mode is a minor mode controlled by the variable
64@code{abbrev-mode}.
65
66@defopt abbrev-mode
67If this variable is non-@code{nil}, abbrevs are automatically expanded
68in the buffer. If the value is @code{nil}, abbrevs may be defined,
69but they are not expanded automatically.
70
71This variable automatically becomes buffer-local when set in any fashion.
72@end defopt
73
74@node Abbrev Tables, Defining Abbrevs, Abbrev Mode, Abbrevs
75@section Abbrev Tables 61@section Abbrev Tables
76 62
77 This section describes how to create and manipulate abbrev tables. 63 This section describes how to create and manipulate abbrev tables.
@@ -90,14 +76,15 @@ abbrev table.
90 76
91@defun clear-abbrev-table abbrev-table 77@defun clear-abbrev-table abbrev-table
92This function undefines all the abbrevs in @var{abbrev-table}, leaving 78This function undefines all the abbrevs in @var{abbrev-table}, leaving
93it empty. It always returns @code{nil}. 79it empty.
80@c Don't see why this needs saying.
81@c It always returns @code{nil}.
94@end defun 82@end defun
95 83
96@defun copy-abbrev-table abbrev-table 84@defun copy-abbrev-table abbrev-table
97This function returns a copy of @var{abbrev-table}---a new abbrev 85This function returns a copy of @var{abbrev-table}---a new abbrev
98table containing the same abbrev definitions. There is one difference 86table containing the same abbrev definitions. It does @emph{not} copy
99between the contents of @var{abbrev-table} and the returned copy: all 87any property lists; only the names, values, and functions.
100abbrevs in the latter have their property lists set to @code{nil}.
101@end defun 88@end defun
102 89
103@defun define-abbrev-table tabname definitions &optional docstring &rest props 90@defun define-abbrev-table tabname definitions &optional docstring &rest props
@@ -106,8 +93,7 @@ name, i.e., as a variable whose value is an abbrev table. It defines
106abbrevs in the table according to @var{definitions}, a list of 93abbrevs in the table according to @var{definitions}, a list of
107elements of the form @code{(@var{abbrevname} @var{expansion} 94elements of the form @code{(@var{abbrevname} @var{expansion}
108[@var{hook}] [@var{props}...])}. These elements are passed as 95[@var{hook}] [@var{props}...])}. These elements are passed as
109arguments to @code{define-abbrev}. The return value is always 96arguments to @code{define-abbrev}. @c The return value is always @code{nil}.
110@code{nil}.
111 97
112The optional string @var{docstring} is the documentation string of the 98The optional string @var{docstring} is the documentation string of the
113variable @var{tabname}. The property list @var{props} is applied to 99variable @var{tabname}. The property list @var{props} is applied to
@@ -115,7 +101,7 @@ the abbrev table (@pxref{Abbrev Table Properties}).
115 101
116If this function is called more than once for the same @var{tabname}, 102If this function is called more than once for the same @var{tabname},
117subsequent calls add the definitions in @var{definitions} to 103subsequent calls add the definitions in @var{definitions} to
118@var{tabname}, rather than overriding the entire original contents. 104@var{tabname}, rather than overwriting the entire original contents.
119(A subsequent call only overrides abbrevs explicitly redefined or 105(A subsequent call only overrides abbrevs explicitly redefined or
120undefined in @var{definitions}.) 106undefined in @var{definitions}.)
121@end defun 107@end defun
@@ -128,7 +114,7 @@ This is a list of symbols whose values are abbrev tables.
128@defun insert-abbrev-table-description name &optional human 114@defun insert-abbrev-table-description name &optional human
129This function inserts before point a description of the abbrev table 115This function inserts before point a description of the abbrev table
130named @var{name}. The argument @var{name} is a symbol whose value is an 116named @var{name}. The argument @var{name} is a symbol whose value is an
131abbrev table. The return value is always @code{nil}. 117abbrev table. @c The return value is always @code{nil}.
132 118
133If @var{human} is non-@code{nil}, the description is human-oriented. 119If @var{human} is non-@code{nil}, the description is human-oriented.
134System abbrevs are listed and identified as such. Otherwise the 120System abbrevs are listed and identified as such. Otherwise the
@@ -146,7 +132,7 @@ to add these to @var{name} separately.)
146abbrev in an abbrev table. 132abbrev in an abbrev table.
147 133
148 When a major mode defines a system abbrev, it should call 134 When a major mode defines a system abbrev, it should call
149@code{define-abbrev} and specify a @code{t} for the @code{:system} 135@code{define-abbrev} and specify @code{t} for the @code{:system}
150property. Be aware that any saved non-``system'' abbrevs are restored 136property. Be aware that any saved non-``system'' abbrevs are restored
151at startup, i.e. before some major modes are loaded. Therefore, major 137at startup, i.e. before some major modes are loaded. Therefore, major
152modes should not assume that their abbrev tables are empty when they 138modes should not assume that their abbrev tables are empty when they
@@ -177,12 +163,12 @@ property is non-@code{nil}, @var{hook} can explicitly control whether
177to insert the self-inserting input character that triggered the 163to insert the self-inserting input character that triggered the
178expansion. If @var{hook} returns non-@code{nil} in this case, that 164expansion. If @var{hook} returns non-@code{nil} in this case, that
179inhibits insertion of the character. By contrast, if @var{hook} 165inhibits insertion of the character. By contrast, if @var{hook}
180returns @code{nil}, @code{expand-abbrev} also returns @code{nil}, as 166returns @code{nil}, @code{expand-abbrev} (or @code{abbrev-insert})
181if expansion had not really occurred. 167also returns @code{nil}, as if expansion had not really occurred.
182 168
183Normally, @code{define-abbrev} sets the variable 169Normally, @code{define-abbrev} sets the variable
184@code{abbrevs-changed} to @code{t}, if it actually changes the abbrev. 170@code{abbrevs-changed} to @code{t}, if it actually changes the abbrev.
185(This is so that some commands will offer to save the abbrevs.) It 171This is so that some commands will offer to save the abbrevs. It
186does not do this for a system abbrev, since those aren't saved anyway. 172does not do this for a system abbrev, since those aren't saved anyway.
187@end defun 173@end defun
188 174
@@ -202,7 +188,8 @@ The abbrevs are saved in the form of a Lisp program to define the same
202abbrev tables with the same contents. Therefore, you can load the file 188abbrev tables with the same contents. Therefore, you can load the file
203with @code{load} (@pxref{How Programs Do Loading}). However, the 189with @code{load} (@pxref{How Programs Do Loading}). However, the
204function @code{quietly-read-abbrev-file} is provided as a more 190function @code{quietly-read-abbrev-file} is provided as a more
205convenient interface. 191convenient interface. Emacs automatically calls this function at
192startup.
206 193
207 User-level facilities such as @code{save-some-buffers} can save 194 User-level facilities such as @code{save-some-buffers} can save
208abbrevs in a file automatically, under the control of variables 195abbrevs in a file automatically, under the control of variables
@@ -216,17 +203,18 @@ This is the default file name for reading and saving abbrevs.
216This function reads abbrev definitions from a file named @var{filename}, 203This function reads abbrev definitions from a file named @var{filename},
217previously written with @code{write-abbrev-file}. If @var{filename} is 204previously written with @code{write-abbrev-file}. If @var{filename} is
218omitted or @code{nil}, the file specified in @code{abbrev-file-name} is 205omitted or @code{nil}, the file specified in @code{abbrev-file-name} is
219used. @code{save-abbrevs} is set to @code{t} so that changes will be 206used.
220saved.
221 207
222This function does not display any messages. It returns @code{nil}. 208As the name implies, this function does not display any messages.
209@c It returns @code{nil}.
223@end defun 210@end defun
224 211
225@defopt save-abbrevs 212@defopt save-abbrevs
226A non-@code{nil} value for @code{save-abbrevs} means that Emacs should 213A non-@code{nil} value for @code{save-abbrevs} means that Emacs should
227offer the user to save abbrevs when files are saved. If the value is 214offer to save abbrevs (if any have changed) when files are saved. If
228@code{silently}, Emacs saves the abbrevs without asking the user. 215the value is @code{silently}, Emacs saves the abbrevs without asking
229@code{abbrev-file-name} specifies the file to save the abbrevs in. 216the user. @code{abbrev-file-name} specifies the file to save the
217abbrevs in.
230@end defopt 218@end defopt
231 219
232@defvar abbrevs-changed 220@defvar abbrevs-changed
@@ -254,7 +242,7 @@ use for communication.
254 242
255@defun abbrev-symbol abbrev &optional table 243@defun abbrev-symbol abbrev &optional table
256This function returns the symbol representing the abbrev named 244This function returns the symbol representing the abbrev named
257@var{abbrev}. The value returned is @code{nil} if that abbrev is not 245@var{abbrev}. It returns @code{nil} if that abbrev is not
258defined. The optional second argument @var{table} is the abbrev table 246defined. The optional second argument @var{table} is the abbrev table
259in which to look it up. If @var{table} is @code{nil}, this function 247in which to look it up. If @var{table} is @code{nil}, this function
260tries first the current buffer's local abbrev table, and second the 248tries first the current buffer's local abbrev table, and second the
@@ -263,8 +251,8 @@ global abbrev table.
263 251
264@defun abbrev-expansion abbrev &optional table 252@defun abbrev-expansion abbrev &optional table
265This function returns the string that @var{abbrev} would expand into (as 253This function returns the string that @var{abbrev} would expand into (as
266defined by the abbrev tables used for the current buffer). If 254defined by the abbrev tables used for the current buffer). It returns
267@var{abbrev} is not a valid abbrev, the function returns @code{nil}. 255@code{nil} if @var{abbrev} is not a valid abbrev.
268The optional argument @var{table} specifies the abbrev table to use, 256The optional argument @var{table} specifies the abbrev table to use,
269as in @code{abbrev-symbol}. 257as in @code{abbrev-symbol}.
270@end defun 258@end defun
@@ -274,7 +262,7 @@ This command expands the abbrev before point, if any. If point does not
274follow an abbrev, this command does nothing. The command returns the 262follow an abbrev, this command does nothing. The command returns the
275abbrev symbol if it did expansion, @code{nil} otherwise. 263abbrev symbol if it did expansion, @code{nil} otherwise.
276 264
277If the abbrev symbol has a hook function which is a symbol whose 265If the abbrev symbol has a hook function that is a symbol whose
278@code{no-self-insert} property is non-@code{nil}, and if the hook 266@code{no-self-insert} property is non-@code{nil}, and if the hook
279function returns @code{nil} as its value, then @code{expand-abbrev} 267function returns @code{nil} as its value, then @code{expand-abbrev}
280returns @code{nil} even though expansion did occur. 268returns @code{nil} even though expansion did occur.
@@ -346,14 +334,14 @@ has already been unexpanded. This contains information left by
346@end defvar 334@end defvar
347 335
348@defvar abbrev-expand-functions 336@defvar abbrev-expand-functions
349This is a special hook run @emph{around} the @code{expand-abbrev} 337This is a wrapper hook (@pxref{Running Hooks}) run around the
350function. Each function on this hook is called with a single 338@code{expand-abbrev} function. Each function on this hook is called
351argument: a function that performs the normal abbrev expansion. The 339with a single argument: a function that performs the normal abbrev
352hook function can hence do anything it wants before and after 340expansion. The hook function can hence do anything it wants before
353performing the expansion. It can also choose not to call its 341and after performing the expansion. It can also choose not to call
354argument, thus overriding the default behavior; or it may even call it 342its argument, thus overriding the default behavior; or it may even
355several times. The function should return the abbrev symbol if 343call it several times. The function should return the abbrev symbol
356expansion took place. 344if expansion took place.
357@end defvar 345@end defvar
358 346
359 The following sample code shows a simple use of 347 The following sample code shows a simple use of
@@ -361,8 +349,7 @@ expansion took place.
361mode for editing certain files in which lines that start with @samp{#} 349mode for editing certain files in which lines that start with @samp{#}
362are comments. You want to use Text mode abbrevs for those lines. The 350are comments. You want to use Text mode abbrevs for those lines. The
363regular local abbrev table, @code{foo-mode-abbrev-table} is 351regular local abbrev table, @code{foo-mode-abbrev-table} is
364appropriate for all other lines. Then you can put the following code 352appropriate for all other lines. @xref{Standard Abbrev Tables}, for the
365in your @file{.emacs} file. @xref{Standard Abbrev Tables}, for the
366definitions of @code{local-abbrev-table} and @code{text-mode-abbrev-table}. 353definitions of @code{local-abbrev-table} and @code{text-mode-abbrev-table}.
367 354
368@smallexample 355@smallexample
@@ -419,14 +406,16 @@ This is the local abbrev table used in Text mode.
419@end defvar 406@end defvar
420 407
421@defvar lisp-mode-abbrev-table 408@defvar lisp-mode-abbrev-table
422This is the local abbrev table used in Lisp mode and Emacs Lisp mode. 409This is the local abbrev table used in Lisp mode. It is the parent
410of the local abbrev table used in Emacs Lisp mode. @xref{Abbrev Table
411Properties}.
423@end defvar 412@end defvar
424 413
425@node Abbrev Properties, Abbrev Table Properties, Standard Abbrev Tables, Abbrevs 414@node Abbrev Properties, Abbrev Table Properties, Standard Abbrev Tables, Abbrevs
426@section Abbrev Properties 415@section Abbrev Properties
427 416
428Abbrevs have properties, some of which influence the way they work. 417Abbrevs have properties, some of which influence the way they work.
429You can provide them as arguments to @code{define-abbrev} and you can 418You can provide them as arguments to @code{define-abbrev}, and
430manipulate them with the following functions: 419manipulate them with the following functions:
431 420
432@defun abbrev-put abbrev prop val 421@defun abbrev-put abbrev prop val
@@ -467,8 +456,7 @@ modifies the capitalization of the expansion.
467 456
468Like abbrevs, abbrev tables have properties, some of which influence 457Like abbrevs, abbrev tables have properties, some of which influence
469the way they work. You can provide them as arguments to 458the way they work. You can provide them as arguments to
470@code{define-abbrev-table} and you can manipulate them with the 459@code{define-abbrev-table}, and manipulate them with the functions:
471functions:
472 460
473@defun abbrev-table-put table prop val 461@defun abbrev-table-put table prop val
474Set the property @var{prop} of abbrev table @var{table} to value @var{val}. 462Set the property @var{prop} of abbrev table @var{table} to value @var{val}.
@@ -484,8 +472,8 @@ The following properties have special meaning:
484@table @code 472@table @code
485@item :enable-function 473@item :enable-function
486This is like the @code{:enable-function} abbrev property except that 474This is like the @code{:enable-function} abbrev property except that
487it applies to all abbrevs in the table and is used even before trying 475it applies to all abbrevs in the table. It is used before even trying
488to find the abbrev before point so it can dynamically modify the 476to find the abbrev before point, so it can dynamically modify the
489abbrev table. 477abbrev table.
490 478
491@item :case-fixed 479@item :case-fixed
@@ -494,15 +482,16 @@ applies to all abbrevs in the table.
494 482
495@item :regexp 483@item :regexp
496If non-@code{nil}, this property is a regular expression that 484If non-@code{nil}, this property is a regular expression that
497indicates how to extract the name of the abbrev before point before 485indicates how to extract the name of the abbrev before point, before
498looking it up in the table. When the regular expression matches 486looking it up in the table. When the regular expression matches
499before point, the abbrev name is expected to be in submatch 1. 487before point, the abbrev name is expected to be in submatch 1.
500If this property is @code{nil}, @code{expand-function} defaults to 488If this property is @code{nil}, the default is to use
501@code{"\\<\\(\\w+\\)\\W"}. This property allows the use of abbrevs 489@code{backward-word} and @code{forward-word} to find the name. This
502whose name contains characters of non-word syntax. 490property allows the use of abbrevs whose name contains characters of
491non-word syntax.
503 492
504@item :parents 493@item :parents
505This property holds the list of tables from which to inherit 494This property holds a list of tables from which to inherit
506other abbrevs. 495other abbrevs.
507 496
508@item :abbrev-table-modiff 497@item :abbrev-table-modiff
diff --git a/doc/lispref/advice.texi b/doc/lispref/advice.texi
index 78b4ac9aa2d..a2f59b2ddc9 100644
--- a/doc/lispref/advice.texi
+++ b/doc/lispref/advice.texi
@@ -1,6 +1,6 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1998-1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1998-1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/advising 5@setfilename ../../info/advising
6@node Advising Functions, Debugging, Byte Compilation, Top 6@node Advising Functions, Debugging, Byte Compilation, Top
@@ -31,7 +31,7 @@ who debug calls to the original function may not notice that it has
31been modified with advice. Therefore, if you have the possibility to 31been modified with advice. Therefore, if you have the possibility to
32change the code of that function to run a hook, please solve the 32change the code of that function to run a hook, please solve the
33problem that way. Advice should be reserved for the cases where you 33problem that way. Advice should be reserved for the cases where you
34cannot get the function changed. In particular, Emacs' own source 34cannot get the function changed. In particular, Emacs's own source
35files should not put advice on functions in Emacs. There are 35files should not put advice on functions in Emacs. There are
36currently a few exceptions to this convention, but we aim to correct 36currently a few exceptions to this convention, but we aim to correct
37them. 37them.
diff --git a/doc/lispref/anti.texi b/doc/lispref/anti.texi
index 6b9473e99d4..2463d6535fd 100644
--- a/doc/lispref/anti.texi
+++ b/doc/lispref/anti.texi
@@ -1,6 +1,6 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1999, 2002-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1999, 2002-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5 5
6@c This node must have no pointers. 6@c This node must have no pointers.
@@ -29,7 +29,7 @@ different scripts.
29The @code{^} interactive spec code, the function 29The @code{^} interactive spec code, the function
30@code{handle-shift-selection}, and the variable 30@code{handle-shift-selection}, and the variable
31@code{this-command-keys-shift-translated} have all been removed. 31@code{this-command-keys-shift-translated} have all been removed.
32Shift-translated keys are no longer treated specially, making Emacs' 32Shift-translated keys are no longer treated specially, making Emacs's
33handling of keybindings much more consistent. 33handling of keybindings much more consistent.
34 34
35@item 35@item
@@ -93,9 +93,9 @@ are always drawn using the X core font driver.
93@item 93@item
94Display terminals are no longer represented using a ``terminal'' data 94Display terminals are no longer represented using a ``terminal'' data
95type; this is not necessary, because we have removed the ability to 95type; this is not necessary, because we have removed the ability to
96display on graphical and text-only terminals simultaneously. For the 96display on graphical and text terminals simultaneously. For the same
97same reason, the @code{window-system} variable is no longer 97reason, the @code{window-system} variable is no longer frame-local,
98frame-local, and the @code{window-system} function has been removed. 98and the @code{window-system} function has been removed.
99 99
100@item 100@item
101The functions @code{list-system-processes} and 101The functions @code{list-system-processes} and
diff --git a/doc/lispref/backups.texi b/doc/lispref/backups.texi
index a4b3a0b9bef..a1c5f20f28c 100644
--- a/doc/lispref/backups.texi
+++ b/doc/lispref/backups.texi
@@ -57,12 +57,13 @@ buffer, if appropriate. It is called by @code{save-buffer} before
57saving the buffer the first time. 57saving the buffer the first time.
58 58
59If a backup was made by renaming, the return value is a cons cell of 59If a backup was made by renaming, the return value is a cons cell of
60the form (@var{modes} . @var{backupname}), where @var{modes} are the 60the form (@var{modes} @var{context} @var{backupname}), where
61mode bits of the original file, as returned by @code{file-modes} 61@var{modes} are the mode bits of the original file, as returned by
62(@pxref{File Attributes,, Other Information about Files}), and 62@code{file-modes} (@pxref{File Attributes,, Other Information about
63@var{backupname} is the name of the backup. In all other cases, that 63Files}), @var{context} is a list describing the original file's
64is, if a backup was made by copying or if no backup was made, this 64SELinux context (@pxref{File Attributes}), and @var{backupname} is the
65function returns @code{nil}. 65name of the backup. In all other cases, that is, if a backup was made
66by copying or if no backup was made, this function returns @code{nil}.
66@end defun 67@end defun
67 68
68@defvar buffer-backed-up 69@defvar buffer-backed-up
@@ -139,8 +140,8 @@ For the common case of all backups going into one directory, the alist
139should contain a single element pairing @samp{"."} with the appropriate 140should contain a single element pairing @samp{"."} with the appropriate
140directory name. 141directory name.
141 142
142If this variable is @code{nil}, or it fails to match a filename, the 143If this variable is @code{nil} (the default), or it fails to match a
143backup is made in the original file's directory. 144filename, the backup is made in the original file's directory.
144 145
145On MS-DOS filesystems without long names this variable is always 146On MS-DOS filesystems without long names this variable is always
146ignored. 147ignored.
@@ -191,7 +192,7 @@ significance). @xref{Saving Buffers}.
191 192
192@defopt backup-by-copying 193@defopt backup-by-copying
193If this variable is non-@code{nil}, Emacs always makes backup files by 194If this variable is non-@code{nil}, Emacs always makes backup files by
194copying. 195copying. The default is @code{nil}.
195@end defopt 196@end defopt
196 197
197 The following three variables, when non-@code{nil}, cause the second 198 The following three variables, when non-@code{nil}, cause the second
@@ -200,7 +201,7 @@ treatment of files that don't fall into the special cases.
200 201
201@defopt backup-by-copying-when-linked 202@defopt backup-by-copying-when-linked
202If this variable is non-@code{nil}, Emacs makes backups by copying for 203If this variable is non-@code{nil}, Emacs makes backups by copying for
203files with multiple names (hard links). 204files with multiple names (hard links). The default is @code{nil}.
204 205
205This variable is significant only if @code{backup-by-copying} is 206This variable is significant only if @code{backup-by-copying} is
206@code{nil}, since copying is always used when that variable is 207@code{nil}, since copying is always used when that variable is
@@ -208,8 +209,9 @@ non-@code{nil}.
208@end defopt 209@end defopt
209 210
210@defopt backup-by-copying-when-mismatch 211@defopt backup-by-copying-when-mismatch
211If this variable is non-@code{nil}, Emacs makes backups by copying in cases 212If this variable is non-@code{nil} (the default), Emacs makes backups
212where renaming would change either the owner or the group of the file. 213by copying in cases where renaming would change either the owner or
214the group of the file.
213 215
214The value has no effect when renaming would not alter the owner or 216The value has no effect when renaming would not alter the owner or
215group of the file; that is, for files which are owned by the user and 217group of the file; that is, for files which are owned by the user and
@@ -441,10 +443,11 @@ buffer-auto-save-file-name
441 443
442@deffn Command auto-save-mode arg 444@deffn Command auto-save-mode arg
443When used interactively without an argument, this command is a toggle 445When used interactively without an argument, this command is a toggle
444switch: it turns on auto-saving of the current buffer if it is off, and 446switch: it turns on auto-saving of the current buffer if it is off,
445vice versa. With an argument @var{arg}, the command turns auto-saving 447and vice versa. When called from Lisp with no argument, it turns
446on if the value of @var{arg} is @code{t}, a nonempty list, or a positive 448auto-saving on. With an argument @var{arg}, it turns auto-saving on
447integer. Otherwise, it turns auto-saving off. 449if the value of @var{arg} is @code{t}, a nonempty list, or a positive
450integer; otherwise, it turns auto-saving off.
448@end deffn 451@end deffn
449 452
450@defun auto-save-file-name-p filename 453@defun auto-save-file-name-p filename
@@ -696,11 +699,13 @@ operation, reverting preserves all the markers. If they are not
696identical, reverting does change the buffer; in that case, it preserves 699identical, reverting does change the buffer; in that case, it preserves
697the markers in the unchanged text (if any) at the beginning and end of 700the markers in the unchanged text (if any) at the beginning and end of
698the buffer. Preserving any additional markers would be problematical. 701the buffer. Preserving any additional markers would be problematical.
699
700This command binds @code{revert-buffer-in-progress-p} to a
701non-@code{nil} value while it operates.
702@end deffn 702@end deffn
703 703
704@defvar revert-buffer-in-progress-p
705@code{revert-buffer} binds this variable to a non-@code{nil} value
706while it is working.
707@end defvar
708
704You can customize how @code{revert-buffer} does its work by setting 709You can customize how @code{revert-buffer} does its work by setting
705the variables described in the rest of this section. 710the variables described in the rest of this section.
706 711
@@ -754,3 +759,16 @@ This normal hook is run by @code{revert-buffer} after inserting
754the modified contents---but only if @code{revert-buffer-function} is 759the modified contents---but only if @code{revert-buffer-function} is
755@code{nil}. 760@code{nil}.
756@end defvar 761@end defvar
762
763@c FIXME? Move this section from arevert-xtra to here?
764@defvar buffer-stale-function
765The value of this variable, if non-@code{nil}, specifies a function
766to call to check whether a non-file buffer needs reverting
767@iftex
768(@pxref{Supporting additional buffers,,, emacs-xtra, Specialized Emacs Features}).
769@end iftex
770@ifnottex
771(@pxref{Supporting additional buffers,,, emacs}).
772@end ifnottex
773@end defvar
774
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi
index c2e792cd585..125a886ecb2 100644
--- a/doc/lispref/buffers.texi
+++ b/doc/lispref/buffers.texi
@@ -417,7 +417,7 @@ This buffer-local variable holds the abbreviated truename of the file
417visited in the current buffer, or @code{nil} if no file is visited. 417visited in the current buffer, or @code{nil} if no file is visited.
418It is a permanent local, unaffected by 418It is a permanent local, unaffected by
419@code{kill-all-local-variables}. @xref{Truenames}, and 419@code{kill-all-local-variables}. @xref{Truenames}, and
420@ref{Definition of abbreviate-file-name}. 420@ref{abbreviate-file-name}.
421@end defvar 421@end defvar
422 422
423@defvar buffer-file-number 423@defvar buffer-file-number
@@ -502,9 +502,8 @@ buffer's recorded last file modification time as reported by
502last file modification time, after which @code{visited-file-modtime} 502last file modification time, after which @code{visited-file-modtime}
503returns zero. 503returns zero.
504 504
505@c Wordy to avoid overfull hbox. --rjc 16mar92 505When the function @code{set-visited-file-name} is called
506When the function @code{set-visited-file-name} is called interactively, it 506interactively, it prompts for @var{filename} in the minibuffer.
507prompts for @var{filename} in the minibuffer.
508@end deffn 507@end deffn
509 508
510@defvar list-buffers-directory 509@defvar list-buffers-directory
@@ -913,7 +912,7 @@ To replace a buffer in all the windows that display it, use
913This command switches to the last buffer in the local buffer list of 912This command switches to the last buffer in the local buffer list of
914the selected frame. More precisely, it calls the function 913the selected frame. More precisely, it calls the function
915@code{switch-to-buffer} (@pxref{Switching Buffers}), to display the 914@code{switch-to-buffer} (@pxref{Switching Buffers}), to display the
916buffer returned by @code{last-buffer}, see above, in the selected 915buffer returned by @code{last-buffer} (see above), in the selected
917window. 916window.
918@end deffn 917@end deffn
919 918
@@ -959,11 +958,12 @@ buffer initially disables undo information recording (@pxref{Undo}).
959 958
960@defun generate-new-buffer name 959@defun generate-new-buffer name
961This function returns a newly created, empty buffer, but does not make 960This function returns a newly created, empty buffer, but does not make
962it current. If there is no buffer named @var{name}, then that is the 961it current. The name of the buffer is generated by passing @var{name}
963name of the new buffer. If that name is in use, this function adds 962to the function @code{generate-new-buffer-name} (@pxref{Buffer
964suffixes of the form @samp{<@var{n}>} to @var{name}, where @var{n} is an 963Names}). Thus, if there is no buffer named @var{name}, then that is
965integer. It tries successive integers starting with 2 until it finds an 964the name of the new buffer; if that name is in use, a suffix of the
966available name. 965form @samp{<@var{n}>}, where @var{n} is an integer, is appended to
966@var{name}.
967 967
968An error is signaled if @var{name} is not a string. 968An error is signaled if @var{name} is not a string.
969 969
@@ -985,9 +985,6 @@ An error is signaled if @var{name} is not a string.
985The major mode for the new buffer is set to Fundamental mode. The default 985The major mode for the new buffer is set to Fundamental mode. The default
986value of the variable @code{major-mode} is handled at a higher level. 986value of the variable @code{major-mode} is handled at a higher level.
987@xref{Auto Major Mode}. 987@xref{Auto Major Mode}.
988
989See the related function @code{generate-new-buffer-name} in @ref{Buffer
990Names}.
991@end defun 988@end defun
992 989
993@node Killing Buffers 990@node Killing Buffers
@@ -1005,25 +1002,26 @@ their identity, however; if you kill two distinct buffers, they remain
1005distinct according to @code{eq} although both are dead. 1002distinct according to @code{eq} although both are dead.
1006 1003
1007 If you kill a buffer that is current or displayed in a window, Emacs 1004 If you kill a buffer that is current or displayed in a window, Emacs
1008automatically selects or displays some other buffer instead. This means 1005automatically selects or displays some other buffer instead. This
1009that killing a buffer can in general change the current buffer. 1006means that killing a buffer can change the current buffer. Therefore,
1010Therefore, when you kill a buffer, you should also take the precautions 1007when you kill a buffer, you should also take the precautions
1011associated with changing the current buffer (unless you happen to know 1008associated with changing the current buffer (unless you happen to know
1012that the buffer being killed isn't current). @xref{Current Buffer}. 1009that the buffer being killed isn't current). @xref{Current Buffer}.
1013 1010
1014 If you kill a buffer that is the base buffer of one or more indirect 1011 If you kill a buffer that is the base buffer of one or more indirect
1015buffers, the indirect buffers are automatically killed as well. 1012@iftex
1016 1013buffers,
1017 The @code{buffer-name} of a killed buffer is @code{nil}. You can use 1014@end iftex
1018this feature to test whether a buffer has been killed: 1015@ifnottex
1016buffers (@pxref{Indirect Buffers}),
1017@end ifnottex
1018the indirect buffers are automatically killed as well.
1019 1019
1020@example 1020@cindex live buffer
1021@group 1021 The @code{buffer-name} of a buffer is @code{nil} if, and only if,
1022(defun buffer-killed-p (buffer) 1022the buffer is killed. A buffer that has not been killed is called a
1023 "Return t if BUFFER is killed." 1023@dfn{live} buffer. To test whether a buffer is live or killed, use
1024 (not (buffer-name buffer))) 1024the function @code{buffer-live-p} (see below).
1025@end group
1026@end example
1027 1025
1028@deffn Command kill-buffer &optional buffer-or-name 1026@deffn Command kill-buffer &optional buffer-or-name
1029This function kills the buffer @var{buffer-or-name}, freeing all its 1027This function kills the buffer @var{buffer-or-name}, freeing all its
@@ -1032,9 +1030,8 @@ memory for other uses or to be returned to the operating system. If
1032buffer. 1030buffer.
1033 1031
1034Any processes that have this buffer as the @code{process-buffer} are 1032Any processes that have this buffer as the @code{process-buffer} are
1035sent the @code{SIGHUP} signal, which normally causes them to terminate. 1033sent the @code{SIGHUP} (``hangup'') signal, which normally causes them
1036(The basic meaning of @code{SIGHUP} is that a dialup line has been 1034to terminate. @xref{Signals to Processes}.
1037disconnected.) @xref{Signals to Processes}.
1038 1035
1039If the buffer is visiting a file and contains unsaved changes, 1036If the buffer is visiting a file and contains unsaved changes,
1040@code{kill-buffer} asks the user to confirm before the buffer is killed. 1037@code{kill-buffer} asks the user to confirm before the buffer is killed.
@@ -1099,8 +1096,8 @@ automatically becomes buffer-local when set for any reason.
1099@end defvar 1096@end defvar
1100 1097
1101@defun buffer-live-p object 1098@defun buffer-live-p object
1102This function returns @code{t} if @var{object} is a buffer which has 1099This function returns @code{t} if @var{object} is a live buffer (a
1103not been killed, @code{nil} otherwise. 1100buffer which has not been killed), @code{nil} otherwise.
1104@end defun 1101@end defun
1105 1102
1106@node Indirect Buffers 1103@node Indirect Buffers
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi
index f4e7c922331..617f050f498 100644
--- a/doc/lispref/commands.texi
+++ b/doc/lispref/commands.texi
@@ -1,7 +1,6 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc.
4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
6@setfilename ../../info/commands 5@setfilename ../../info/commands
7@node Command Loop, Keymaps, Minibuffers, Top 6@node Command Loop, Keymaps, Minibuffers, Top
@@ -3430,7 +3429,7 @@ buffer-local. @xref{Multiple Terminals}.
3430@end defvar 3429@end defvar
3431 3430
3432@defvar kbd-macro-termination-hook 3431@defvar kbd-macro-termination-hook
3433This normal hook (@pxref{Standard Hooks}) is run when a keyboard 3432This normal hook is run when a keyboard macro terminates, regardless
3434macro terminates, regardless of what caused it to terminate (reaching 3433of what caused it to terminate (reaching the macro end or an error
3435the macro end or an error which ended the macro prematurely). 3434which ended the macro prematurely).
3436@end defvar 3435@end defvar
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index c23c93300a6..8c45a1a4faf 100644
--- a/doc/lispref/control.texi
+++ b/doc/lispref/control.texi
@@ -1234,7 +1234,7 @@ make it possible to categorize errors at various levels of generality
1234when you write an error handler. Using error symbols alone would 1234when you write an error handler. Using error symbols alone would
1235eliminate all but the narrowest level of classification. 1235eliminate all but the narrowest level of classification.
1236 1236
1237 @xref{Standard Errors}, for a list of all the standard error symbols 1237 @xref{Standard Errors}, for a list of the main error symbols
1238and their conditions. 1238and their conditions.
1239 1239
1240@node Cleanups 1240@node Cleanups
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index ae8a5fde29f..281ddda9cec 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -1,6 +1,6 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/display 5@setfilename ../../info/display
6@node Display, System Interface, Processes, Top 6@node Display, System Interface, Processes, Top
@@ -28,7 +28,7 @@ that Emacs presents to the user.
28* Display Property:: Enabling special display features. 28* Display Property:: Enabling special display features.
29* Images:: Displaying images in Emacs buffers. 29* Images:: Displaying images in Emacs buffers.
30* Buttons:: Adding clickable buttons to Emacs buffers. 30* Buttons:: Adding clickable buttons to Emacs buffers.
31* Abstract Display:: Emacs' Widget for Object Collections. 31* Abstract Display:: Emacs's Widget for Object Collections.
32* Blinking:: How Emacs shows the matching open parenthesis. 32* Blinking:: How Emacs shows the matching open parenthesis.
33* Usual Display:: The usual conventions for displaying nonprinting chars. 33* Usual Display:: The usual conventions for displaying nonprinting chars.
34* Display Tables:: How to specify other conventions. 34* Display Tables:: How to specify other conventions.
@@ -62,7 +62,7 @@ you call these functions when input is available, they don't redisplay
62immediately, but the requested redisplay does happen 62immediately, but the requested redisplay does happen
63eventually---after all the input has been processed. 63eventually---after all the input has been processed.
64 64
65 On text-only terminals, suspending and resuming Emacs normally also 65 On text terminals, suspending and resuming Emacs normally also
66refreshes the screen. Some terminal emulators record separate 66refreshes the screen. Some terminal emulators record separate
67contents for display-oriented programs such as Emacs and for ordinary 67contents for display-oriented programs such as Emacs and for ordinary
68sequential display. If you are using such a terminal, you might want 68sequential display. If you are using such a terminal, you might want
@@ -1809,7 +1809,7 @@ into a Lisp value as described above. However, in this case the
1809numeric height value specifies the line spacing, rather than the line 1809numeric height value specifies the line spacing, rather than the line
1810height. 1810height.
1811 1811
1812 On text-only terminals, the line spacing cannot be altered. 1812 On text terminals, the line spacing cannot be altered.
1813 1813
1814@node Faces 1814@node Faces
1815@section Faces 1815@section Faces
@@ -2058,7 +2058,7 @@ floating point and function values are not allowed.
2058Font weight---one of the symbols (from densest to faintest) 2058Font weight---one of the symbols (from densest to faintest)
2059@code{ultra-bold}, @code{extra-bold}, @code{bold}, @code{semi-bold}, 2059@code{ultra-bold}, @code{extra-bold}, @code{bold}, @code{semi-bold},
2060@code{normal}, @code{semi-light}, @code{light}, @code{extra-light}, or 2060@code{normal}, @code{semi-light}, @code{light}, @code{extra-light}, or
2061@code{ultra-light}. On text-only terminals that support 2061@code{ultra-light}. On text terminals which support
2062variable-brightness text, any weight greater than normal is displayed 2062variable-brightness text, any weight greater than normal is displayed
2063as extra bright, and any weight less than normal is displayed as 2063as extra bright, and any weight less than normal is displayed as
2064half-bright. 2064half-bright.
@@ -2066,8 +2066,8 @@ half-bright.
2066@item :slant 2066@item :slant
2067Font slant---one of the symbols @code{italic}, @code{oblique}, 2067Font slant---one of the symbols @code{italic}, @code{oblique},
2068@code{normal}, @code{reverse-italic}, or @code{reverse-oblique}. On 2068@code{normal}, @code{reverse-italic}, or @code{reverse-oblique}. On
2069text-only terminals that support variable-brightness text, slanted 2069text terminals that support variable-brightness text, slanted text is
2070text is displayed as half-bright. 2070displayed as half-bright.
2071 2071
2072@item :foreground 2072@item :foreground
2073Foreground color, a string. The value can be a system-defined color 2073Foreground color, a string. The value can be a system-defined color
@@ -3649,9 +3649,9 @@ this list.
3649 3649
3650Each variable on this list can have properties 3650Each variable on this list can have properties
3651@code{overlay-arrow-string} and @code{overlay-arrow-bitmap} that 3651@code{overlay-arrow-string} and @code{overlay-arrow-bitmap} that
3652specify an overlay arrow string (for text-only terminals) or fringe 3652specify an overlay arrow string (for text terminals) or fringe bitmap
3653bitmap (for graphical terminals) to display at the corresponding 3653(for graphical terminals) to display at the corresponding overlay
3654overlay arrow position. If either property is not set, the default 3654arrow position. If either property is not set, the default
3655@code{overlay-arrow-string} or @code{overlay-arrow} fringe indicator 3655@code{overlay-arrow-string} or @code{overlay-arrow} fringe indicator
3656is used. 3656is used.
3657 3657
@@ -4941,7 +4941,7 @@ using @code{equal}. If @var{frame} is @code{nil}, it defaults to the
4941selected frame. If @var{frame} is @code{t}, the image is flushed on 4941selected frame. If @var{frame} is @code{t}, the image is flushed on
4942all existing frames. 4942all existing frames.
4943 4943
4944In Emacs' current implementation, each graphical terminal possesses an 4944In Emacs's current implementation, each graphical terminal possesses an
4945image cache, which is shared by all the frames on that terminal 4945image cache, which is shared by all the frames on that terminal
4946(@pxref{Multiple Terminals}). Thus, refreshing an image in one frame 4946(@pxref{Multiple Terminals}). Thus, refreshing an image in one frame
4947also refreshes it in all other frames on the same terminal. 4947also refreshes it in all other frames on the same terminal.
@@ -6043,8 +6043,8 @@ This is a synonym for @code{ding}.
6043 6043
6044@defopt visible-bell 6044@defopt visible-bell
6045This variable determines whether Emacs should flash the screen to 6045This variable determines whether Emacs should flash the screen to
6046represent a bell. Non-@code{nil} means yes, @code{nil} means no. This 6046represent a bell. Non-@code{nil} means yes, @code{nil} means no.
6047is effective on graphical displays, and on text-only terminals 6047This is effective on graphical displays, and on text terminals
6048provided the terminal's Termcap entry defines the visible bell 6048provided the terminal's Termcap entry defines the visible bell
6049capability (@samp{vb}). 6049capability (@samp{vb}).
6050@end defopt 6050@end defopt
@@ -6340,7 +6340,7 @@ such changes affect all of Emacs display.
6340they appear in a buffer, but in some special way (e.g. as a box 6340they appear in a buffer, but in some special way (e.g. as a box
6341containing a hexadecimal code). These include characters that cannot 6341containing a hexadecimal code). These include characters that cannot
6342be displayed with any available font (on a graphical display), or that 6342be displayed with any available font (on a graphical display), or that
6343cannot be encoded by the terminal's coding system (on a text-only 6343cannot be encoded by the terminal's coding system (on a text
6344terminal). Specific characters can also be defined to be glyphless. 6344terminal). Specific characters can also be defined to be glyphless.
6345 6345
6346@defvar glyphless-char-display 6346@defvar glyphless-char-display
@@ -6355,7 +6355,7 @@ Don't display the character.
6355 6355
6356@item @code{thin-space} 6356@item @code{thin-space}
6357Display a thin space, 1-pixel wide on graphical displays, or 6357Display a thin space, 1-pixel wide on graphical displays, or
63581-character wide on text-only terminals. 63581-character wide on text terminals.
6359 6359
6360@item @code{empty-box} 6360@item @code{empty-box}
6361Display an empty box. 6361Display an empty box.
@@ -6374,7 +6374,7 @@ Except for @code{zero-width}, these methods display using the
6374 6374
6375An entry can also be a cons cell @code{(@var{graphical} 6375An entry can also be a cons cell @code{(@var{graphical}
6376. @var{text})}, where @var{graphical} and @var{text} are the display 6376. @var{text})}, where @var{graphical} and @var{text} are the display
6377methods on graphical displays and text-only terminals respectively. 6377methods on graphical displays and text terminals respectively.
6378 6378
6379The char-table has one extra slot, which determines how to display any 6379The char-table has one extra slot, which determines how to display any
6380character that cannot be displayed with any available font, or cannot 6380character that cannot be displayed with any available font, or cannot
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index 05245331af2..7a444ee4039 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -44,8 +44,7 @@
44This is edition @value{VERSION} of the GNU Emacs Lisp Reference Manual,@* 44This is edition @value{VERSION} of the GNU Emacs Lisp Reference Manual,@*
45corresponding to Emacs version @value{EMACSVER}. 45corresponding to Emacs version @value{EMACSVER}.
46 46
47Copyright @copyright{} 1990-1996, 1998-2012 Free Software 47Copyright @copyright{} 1990-1996, 1998-2012 Free Software Foundation, Inc.
48Foundation, Inc.
49 48
50@quotation 49@quotation
51Permission is granted to copy, distribute and/or modify this document 50Permission is granted to copy, distribute and/or modify this document
@@ -170,11 +169,9 @@ Appendices
170* Tips:: Advice and coding conventions for Emacs Lisp. 169* Tips:: Advice and coding conventions for Emacs Lisp.
171* GNU Emacs Internals:: Building and dumping Emacs; 170* GNU Emacs Internals:: Building and dumping Emacs;
172 internal data structures. 171 internal data structures.
173* Standard Errors:: List of all error symbols. 172* Standard Errors:: List of some standard error symbols.
174* Standard Buffer-Local Variables:: 173* Standard Keymaps:: List of some standard keymaps.
175 List of variables buffer-local in all buffers. 174* Standard Hooks:: List of some standard hook variables.
176* Standard Keymaps:: List of standard keymaps.
177* Standard Hooks:: List of standard hook variables.
178 175
179* Index:: Index including concepts, functions, variables, 176* Index:: Index including concepts, functions, variables,
180 and other terms. 177 and other terms.
@@ -908,7 +905,7 @@ Buffers
908 is visited. 905 is visited.
909* Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved. 906* Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved.
910* Modification Time:: Determining whether the visited file was changed 907* Modification Time:: Determining whether the visited file was changed
911 ``behind Emacs's back''. 908 "behind Emacs's back".
912* Read Only Buffers:: Modifying text is not allowed in a 909* Read Only Buffers:: Modifying text is not allowed in a
913 read-only buffer. 910 read-only buffer.
914* The Buffer List:: How to look at all the existing buffers. 911* The Buffer List:: How to look at all the existing buffers.
@@ -975,7 +972,7 @@ Frames
975* Window System Selections::Transferring text to and from other X clients. 972* Window System Selections::Transferring text to and from other X clients.
976* Drag and Drop:: Internals of Drag-and-Drop implementation. 973* Drag and Drop:: Internals of Drag-and-Drop implementation.
977* Color Names:: Getting the definitions of color names. 974* Color Names:: Getting the definitions of color names.
978* Text Terminal Colors:: Defining colors for text-only terminals. 975* Text Terminal Colors:: Defining colors for text terminals.
979* Resources:: Getting resource values from the server. 976* Resources:: Getting resource values from the server.
980* Display Feature Testing:: Determining the features of a terminal. 977* Display Feature Testing:: Determining the features of a terminal.
981 978
@@ -1189,7 +1186,6 @@ Parsing Expressions
1189 1186
1190Abbrevs and Abbrev Expansion 1187Abbrevs and Abbrev Expansion
1191 1188
1192* Abbrev Mode:: Setting up Emacs for abbreviation.
1193* Abbrev Tables:: Creating and working with abbrev tables. 1189* Abbrev Tables:: Creating and working with abbrev tables.
1194* Defining Abbrevs:: Specifying abbreviations and their expansions. 1190* Defining Abbrevs:: Specifying abbreviations and their expansions.
1195* Abbrev Files:: Saving abbrevs in files. 1191* Abbrev Files:: Saving abbrevs in files.
@@ -1266,7 +1262,7 @@ Emacs Display
1266* Display Property:: Enabling special display features. 1262* Display Property:: Enabling special display features.
1267* Images:: Displaying images in Emacs buffers. 1263* Images:: Displaying images in Emacs buffers.
1268* Buttons:: Adding clickable buttons to Emacs buffers. 1264* Buttons:: Adding clickable buttons to Emacs buffers.
1269* Abstract Display:: Emacs' Widget for Object Collections. 1265* Abstract Display:: Emacs's Widget for Object Collections.
1270* Blinking:: How Emacs shows the matching open parenthesis. 1266* Blinking:: How Emacs shows the matching open parenthesis.
1271* Usual Display:: The usual conventions for displaying 1267* Usual Display:: The usual conventions for displaying
1272 nonprinting chars. 1268 nonprinting chars.
@@ -1512,7 +1508,6 @@ Object Internals
1512@include tips.texi 1508@include tips.texi
1513@include internals.texi 1509@include internals.texi
1514@include errors.texi 1510@include errors.texi
1515@include locals.texi
1516@include maps.texi 1511@include maps.texi
1517@include hooks.texi 1512@include hooks.texi
1518 1513
diff --git a/doc/lispref/errors.texi b/doc/lispref/errors.texi
index fcf4ec24af7..76ab8b235f5 100644
--- a/doc/lispref/errors.texi
+++ b/doc/lispref/errors.texi
@@ -3,11 +3,11 @@
3@c Copyright (C) 1990-1993, 1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1993, 1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/errors 5@setfilename ../../info/errors
6@node Standard Errors, Standard Buffer-Local Variables, GNU Emacs Internals, Top 6@node Standard Errors, Standard Keymaps, GNU Emacs Internals, Top
7@appendix Standard Errors 7@appendix Standard Errors
8@cindex standard errors 8@cindex standard errors
9 9
10 Here is the complete list of the error symbols in standard Emacs, 10 Here is a list of the more important error symbols in standard Emacs,
11grouped by concept. The list includes each symbol's message (on the 11grouped by concept. The list includes each symbol's message (on the
12@code{error-message} property of the symbol) and a cross reference to a 12@code{error-message} property of the symbol) and a cross reference to a
13description of how the error can occur. 13description of how the error can occur.
@@ -24,6 +24,15 @@ conditions, that means it has none.
24 As a special exception, the error symbol @code{quit} does not have the 24 As a special exception, the error symbol @code{quit} does not have the
25condition @code{error}, because quitting is not considered an error. 25condition @code{error}, because quitting is not considered an error.
26 26
27@c You can grep for "(put 'foo 'error-conditions ...) to find
28@c examples defined in Lisp. Eg soap-client.el, sasl.el.
29 Most of these error symbols are defined in C (mainly @file{data.c}),
30but some are defined in Lisp. For example, the file @file{userlock.el}
31defines the @code{file-locked} and @code{file-supersession} errors.
32Several of the specialized Lisp libraries distributed with Emacs
33define their own error symbols. We do not attempt to list of all
34those here.
35
27 @xref{Errors}, for an explanation of how errors are generated and 36 @xref{Errors}, for an explanation of how errors are generated and
28handled. 37handled.
29 38
@@ -54,10 +63,16 @@ sequence or buffer.@*
54@code{"Buffer is read-only"}@* 63@code{"Buffer is read-only"}@*
55@xref{Read Only Buffers}. 64@xref{Read Only Buffers}.
56 65
57@ignore
58@item circular-list 66@item circular-list
59@code{"List contains a loop"}@* 67@code{"List contains a loop"}@*
60@end ignore 68This happens when some operations (e.g. resolving face names)
69encounter circular structures.@*
70@xref{Circular Objects}.
71
72@item cl-assertion-failed
73@code{"Assertion failed"}@*
74This happens when the @code{assert} macro fails a test.@*
75@xref{Assertions,,, cl, Common Lisp Extensions}.
61 76
62@item coding-system-error 77@item coding-system-error
63@code{"Invalid coding system"}@* 78@code{"Invalid coding system"}@*
@@ -105,14 +120,23 @@ do have @code{error-message} properties, and if no data is provided,
105the @code{error-message} property @emph{is} used.@* 120the @code{error-message} property @emph{is} used.@*
106@xref{Files}. 121@xref{Files}.
107 122
123@c jka-compr.el
124@item compression-error
125This is a subcategory of @code{file-error}, which results from
126problems handling a compressed file.@*
127@xref{How Programs Do Loading}.
128
129@c userlock.el
108@item file-locked 130@item file-locked
109This is a subcategory of @code{file-error}.@* 131This is a subcategory of @code{file-error}.@*
110@xref{File Locks}. 132@xref{File Locks}.
111 133
134@c userlock.el
112@item file-supersession 135@item file-supersession
113This is a subcategory of @code{file-error}.@* 136This is a subcategory of @code{file-error}.@*
114@xref{Modification Time}. 137@xref{Modification Time}.
115 138
139@c net/ange-ftp.el
116@item ftp-error 140@item ftp-error
117This is a subcategory of @code{file-error}, which results from problems 141This is a subcategory of @code{file-error}, which results from problems
118in accessing a remote file using ftp.@* 142in accessing a remote file using ftp.@*
@@ -130,6 +154,7 @@ in accessing a remote file using ftp.@*
130@code{"Invalid regexp"}@* 154@code{"Invalid regexp"}@*
131@xref{Regular Expressions}. 155@xref{Regular Expressions}.
132 156
157@c simple.el
133@item mark-inactive 158@item mark-inactive
134@code{"The mark is not active now"}@* 159@code{"The mark is not active now"}@*
135@xref{The Mark}. 160@xref{The Mark}.
@@ -139,6 +164,7 @@ in accessing a remote file using ftp.@*
139@xref{Catch and Throw}. 164@xref{Catch and Throw}.
140 165
141@ignore 166@ignore
167@c Not actually used for anything? Probably definition should be removed.
142@item protected-field 168@item protected-field
143@code{"Attempt to modify a protected field"} 169@code{"Attempt to modify a protected field"}
144@end ignore 170@end ignore
@@ -160,6 +186,7 @@ and any symbols that start with @samp{:},
160may not be changed.@* 186may not be changed.@*
161@xref{Constant Variables, , Variables that Never Change}. 187@xref{Constant Variables, , Variables that Never Change}.
162 188
189@c simple.el
163@item text-read-only 190@item text-read-only
164@code{"Text is read-only"}@* 191@code{"Text is read-only"}@*
165This is a subcategory of @code{buffer-read-only}.@* 192This is a subcategory of @code{buffer-read-only}.@*
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 69e0003a46b..77c6766dc5d 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -1018,6 +1018,20 @@ a regular file (not a directory, named pipe, terminal, or
1018other I/O device). 1018other I/O device).
1019@end defun 1019@end defun
1020 1020
1021@defun file-equal-p file1 file2
1022This function returns @code{t} if the files @var{file1} and
1023@var{file2} name the same file. If @var{file1} or @var{file2} does
1024not exist, the return value is unspecified.
1025@end defun
1026
1027@defun file-subdir-of-p dir1 dir2
1028This function returns @code{t} if directory @var{dir1} is a
1029subdirectory of @var{dir2}, or if @var{dir1} and @var{dir2} are the
1030same directory. It compares the @code{file-truename} values of the
1031two directories (@pxref{Truenames}). If @var{dir2}
1032do not name an existing directory, the return value is @code{nil}.
1033@end defun
1034
1021@node Truenames 1035@node Truenames
1022@subsection Truenames 1036@subsection Truenames
1023@cindex truename (of file) 1037@cindex truename (of file)
@@ -1129,6 +1143,18 @@ both others and group, and that the sticky bit is set.
1129 1143
1130@xref{Changing Files}, for functions that change file permissions, 1144@xref{Changing Files}, for functions that change file permissions,
1131such as @code{set-file-modes}. 1145such as @code{set-file-modes}.
1146
1147@cindex MS-DOS and file modes
1148@cindex file modes and MS-DOS
1149@strong{MS-DOS note:} On MS-DOS, there is no such thing as an
1150``executable'' file mode bit. So @code{file-modes} considers a file
1151executable if its name ends in one of the standard executable
1152extensions, such as @file{.com}, @file{.bat}, @file{.exe}, and some
1153others. Files that begin with the Unix-standard @samp{#!} signature,
1154such as shell and Perl scripts, are also considered executable.
1155Directories are also reported as executable, for compatibility with
1156Unix. These conventions are also followed by @code{file-attributes},
1157below.
1132@end defun 1158@end defun
1133 1159
1134 If the @var{filename} argument to the next two functions is a 1160 If the @var{filename} argument to the next two functions is a
@@ -1304,16 +1330,26 @@ is on the file-system device whose number is 1014478468.
1304@end table 1330@end table
1305@end defun 1331@end defun
1306 1332
1307@cindex MS-DOS and file modes 1333@cindex SELinux context
1308@cindex file modes and MS-DOS 1334 SELinux is a Linux kernel feature which provides more sophisticated
1309 On MS-DOS, there is no such thing as an ``executable'' file mode bit. 1335file access controls than ordinary ``Unix-style'' file permissions.
1310So Emacs considers a file executable if its name ends in one of the 1336If Emacs has been compiled with SELinux support on a system with
1311standard executable extensions, such as @file{.com}, @file{.bat}, 1337SELinux enabled, you can use the function @code{file-selinux-context}
1312@file{.exe}, and some others. Files that begin with the Unix-standard 1338to retrieve a file's SELinux security context. For the function
1313@samp{#!} signature, such as shell and Perl scripts, are also considered 1339@code{set-file-selinux-context}, see @ref{Changing Files}.
1314as executable files. This is reflected in the values returned by 1340
1315@code{file-modes} and @code{file-attributes}. Directories are also 1341@defun file-selinux-context filename
1316reported with executable bit set, for compatibility with Unix. 1342This function returns the SELinux security context of the file
1343@var{filename}. This return value is a list of the form
1344@code{(@var{user} @var{role} @var{type} @var{range})}, whose elements
1345are the context's user, role, type, and range respectively, as Lisp
1346strings. See the SELinux documentation for details about what these
1347actually mean.
1348
1349If the file does not exist or is inaccessible, or if the system does
1350not support SELinux, or if Emacs was not compiled with SELinux
1351support, then the return value is @code{(nil nil nil nil)}.
1352@end defun
1317 1353
1318@node Locating Files 1354@node Locating Files
1319@subsection How to Locate Files in Standard Places 1355@subsection How to Locate Files in Standard Places
@@ -1322,8 +1358,10 @@ reported with executable bit set, for compatibility with Unix.
1322 1358
1323 This section explains how to search for a file in a list of 1359 This section explains how to search for a file in a list of
1324directories (a @dfn{path}), or for an executable file in the standard 1360directories (a @dfn{path}), or for an executable file in the standard
1325list of executable file directories, or for an Emacs-specific user 1361list of executable file directories.
1326configuration file. 1362
1363 To search for a user-specific configuration file, @xref{Standard
1364File Names}, for the @code{locate-user-emacs-file} function.
1327 1365
1328@defun locate-file filename path &optional suffixes predicate 1366@defun locate-file filename path &optional suffixes predicate
1329This function searches for a file whose name is @var{filename} in a 1367This function searches for a file whose name is @var{filename} in a
@@ -1370,32 +1408,6 @@ in @code{exec-path}, and tries all the file-name extensions in
1370@code{exec-suffixes} (@pxref{Subprocess Creation}). 1408@code{exec-suffixes} (@pxref{Subprocess Creation}).
1371@end defun 1409@end defun
1372 1410
1373@defun locate-user-emacs-file base-name &optional old-name
1374This function returns an absolute file name for an Emacs-specific
1375configuration or data file. The argument @file{base-name} should be a
1376relative file name. The return value is the absolute name of a file
1377in the directory specified by @code{user-emacs-directory}; if that
1378directory does not exist, this function creates it.
1379
1380If the optional argument @var{old-name} is non-@code{nil}, it
1381specifies a file in the user's home directory,
1382@file{~/@var{old-name}}. If such a file exists, the return value is
1383the absolute name of that file, instead of the file specified by
1384@var{base-name}. This argument is intended to be used by Emacs
1385packages to provide backward compatibility. For instance, prior to
1386the introduction of @code{user-emacs-directory}, the abbrev file was
1387located in @file{~/.abbrev_defs}, so the definition of
1388@code{abbrev-file-name} is
1389
1390@example
1391(defcustom abbrev-file-name
1392 (locate-user-emacs-file "abbrev_defs" ".abbrev_defs")
1393 "Default name of file from which to read abbrevs."
1394 @dots{}
1395 :type 'file)
1396@end example
1397@end defun
1398
1399@node Changing Files 1411@node Changing Files
1400@section Changing File Names and Attributes 1412@section Changing File Names and Attributes
1401@c @cindex renaming files Duplicates rename-file 1413@c @cindex renaming files Duplicates rename-file
@@ -1528,15 +1540,9 @@ non-@code{nil}, we attempt to copy the user and group ownership of the
1528file. This works only on some operating systems, and only if you have 1540file. This works only on some operating systems, and only if you have
1529the correct permissions to do so. 1541the correct permissions to do so.
1530 1542
1531@cindex SELinux 1543If the optional argument @var{preserve-selinux} is non-@code{nil}, and
1532If the optional argument @var{preserve-selinux} is non-@code{nil}, we 1544Emacs has been compiled with SELinux support, this function attempts
1533attempt to copy the SELinux@footnote{@samp{Security-Enhanced Linux} 1545to copy the file's SELinux context (@pxref{File Attributes}).
1534is a kernel feature that allows for finer access controls to be set on
1535files, and a system security policy to define who can access what.
1536The functions @code{file-selinux-context} and @code{set-file-selinux-context}
1537get and set, respectively, the SELinux properties of a file.}
1538context of the file. For this to work, Emacs must have been built
1539with libselinux support.
1540@end deffn 1546@end deffn
1541 1547
1542@deffn Command make-symbolic-link filename newname &optional ok-if-exists 1548@deffn Command make-symbolic-link filename newname &optional ok-if-exists
@@ -1667,6 +1673,16 @@ time and must be in the format returned by @code{current-time}
1667(@pxref{Time of Day}). 1673(@pxref{Time of Day}).
1668@end defun 1674@end defun
1669 1675
1676@defun set-file-selinux-context filename context
1677This function sets the SELinux security context of the file
1678@var{filename} to @var{context}. @xref{File Attributes}, for a brief
1679description of SELinux contexts. The @var{context} argument should be
1680a list @code{(@var{user} @var{role} @var{type} @var{range})}, like the
1681return value of @code{file-selinux-context}. The function does
1682nothing if SELinux is disabled, or if Emacs was compiled without
1683SELinux support.
1684@end defun
1685
1670@node File Names 1686@node File Names
1671@section File Names 1687@section File Names
1672@cindex file names 1688@cindex file names
@@ -1838,14 +1854,15 @@ not an extension.
1838 1854
1839 All the directories in the file system form a tree starting at the 1855 All the directories in the file system form a tree starting at the
1840root directory. A file name can specify all the directory names 1856root directory. A file name can specify all the directory names
1841starting from the root of the tree; then it is called an @dfn{absolute} 1857starting from the root of the tree; then it is called an
1842file name. Or it can specify the position of the file in the tree 1858@dfn{absolute} file name. Or it can specify the position of the file
1843relative to a default directory; then it is called a @dfn{relative} file 1859in the tree relative to a default directory; then it is called a
1844name. On Unix and GNU/Linux, an absolute file name starts with a slash 1860@dfn{relative} file name. On Unix and GNU/Linux, an absolute file
1845or a tilde (@samp{~}), and a relative one does not. On MS-DOS and 1861name starts with a @samp{/} or a @samp{~}
1846MS-Windows, an absolute file name starts with a slash or a backslash, or 1862(@pxref{abbreviate-file-name}), and a relative one does not. On
1847with a drive specification @samp{@var{x}:/}, where @var{x} is the 1863MS-DOS and MS-Windows, an absolute file name starts with a slash or a
1848@dfn{drive letter}. 1864backslash, or with a drive specification @samp{@var{x}:/}, where
1865@var{x} is the @dfn{drive letter}.
1849 1866
1850@defun file-name-absolute-p filename 1867@defun file-name-absolute-p filename
1851This function returns @code{t} if file @var{filename} is an absolute 1868This function returns @code{t} if file @var{filename} is an absolute
@@ -1981,8 +1998,10 @@ because this is not portable. Always use
1981 To convert a directory name to its abbreviation, use this 1998 To convert a directory name to its abbreviation, use this
1982function: 1999function:
1983 2000
2001@cindex file name abbreviations
2002@cindex abbreviated file names
1984@defun abbreviate-file-name filename 2003@defun abbreviate-file-name filename
1985@anchor{Definition of abbreviate-file-name} 2004@anchor{abbreviate-file-name}
1986This function returns an abbreviated form of @var{filename}. It 2005This function returns an abbreviated form of @var{filename}. It
1987applies the abbreviations specified in @code{directory-abbrev-alist} 2006applies the abbreviations specified in @code{directory-abbrev-alist}
1988(@pxref{File Aliases,,File Aliases, emacs, The GNU Emacs Manual}), 2007(@pxref{File Aliases,,File Aliases, emacs, The GNU Emacs Manual}),
@@ -2000,11 +2019,15 @@ because it recognizes abbreviations even as part of the name.
2000@subsection Functions that Expand Filenames 2019@subsection Functions that Expand Filenames
2001@cindex expansion of file names 2020@cindex expansion of file names
2002 2021
2003 @dfn{Expansion} of a file name means converting a relative file name 2022 @dfn{Expanding} a file name means converting a relative file name to
2004to an absolute one. Since this is done relative to a default directory, 2023an absolute one. Since this is done relative to a default directory,
2005you must specify the default directory name as well as the file name to 2024you must specify the default directory name as well as the file name
2006be expanded. Expansion also simplifies file names by eliminating 2025to be expanded. It also involves expanding abbreviations like
2007redundancies such as @file{./} and @file{@var{name}/../}. 2026@file{~/}
2027@ifnottex
2028(@pxref{abbreviate-file-name}),
2029@end ifnottex
2030and eliminating redundancies like @file{./} and @file{@var{name}/../}.
2008 2031
2009@defun expand-file-name filename &optional directory 2032@defun expand-file-name filename &optional directory
2010This function converts @var{filename} to an absolute file name. If 2033This function converts @var{filename} to an absolute file name. If
@@ -2369,49 +2392,60 @@ filter out a directory named @file{foo.elc}.
2369@node Standard File Names 2392@node Standard File Names
2370@subsection Standard File Names 2393@subsection Standard File Names
2371 2394
2372 Most of the file names used in Lisp programs are entered by the user. 2395 Sometimes, an Emacs Lisp program needs to specify a standard file
2373But occasionally a Lisp program needs to specify a standard file name 2396name for a particular use---typically, to hold configuration data
2374for a particular use---typically, to hold customization information 2397specified by the current user. Usually, such files should be located
2375about each user. For example, abbrev definitions are stored (by 2398in the directory specified by @code{user-emacs-directory}, which is
2376default) in the file @file{~/.abbrev_defs}; the @code{completion} 2399@file{~/.emacs.d} by default (@pxref{Init File}). For example, abbrev
2377package stores completions in the file @file{~/.completions}. These are 2400definitions are stored by default in @file{~/.emacs.d/abbrev_defs}.
2378two of the many standard file names used by parts of Emacs for certain 2401The easiest way to specify such a file name is to use the function
2379purposes. 2402@code{locate-user-emacs-file}.
2380
2381 Various operating systems have their own conventions for valid file
2382names and for which file names to use for user profile data. A Lisp
2383program which reads a file using a standard file name ought to use, on
2384each type of system, a file name suitable for that system. The function
2385@code{convert-standard-filename} makes this easy to do.
2386 2403
2387@defun convert-standard-filename filename 2404@defun locate-user-emacs-file base-name &optional old-name
2388This function alters the file name @var{filename} to fit the conventions 2405This function returns an absolute file name for an Emacs-specific
2389of the operating system in use, and returns the result as a new string. 2406configuration or data file. The argument @file{base-name} should be a
2390@end defun 2407relative file name. The return value is the absolute name of a file
2408in the directory specified by @code{user-emacs-directory}; if that
2409directory does not exist, this function creates it.
2391 2410
2392 The recommended way to specify a standard file name in a Lisp program 2411If the optional argument @var{old-name} is non-@code{nil}, it
2393is to choose a name which fits the conventions of GNU and Unix systems, 2412specifies a file in the user's home directory,
2394usually with a nondirectory part that starts with a period, and pass it 2413@file{~/@var{old-name}}. If such a file exists, the return value is
2395to @code{convert-standard-filename} instead of using it directly. Here 2414the absolute name of that file, instead of the file specified by
2396is an example from the @code{completion} package: 2415@var{base-name}. This argument is intended to be used by Emacs
2416packages to provide backward compatibility. For instance, prior to
2417the introduction of @code{user-emacs-directory}, the abbrev file was
2418located in @file{~/.abbrev_defs}. Here is the definition of
2419@code{abbrev-file-name}:
2397 2420
2398@example 2421@example
2399(defvar save-completions-file-name 2422(defcustom abbrev-file-name
2400 (convert-standard-filename "~/.completions") 2423 (locate-user-emacs-file "abbrev_defs" ".abbrev_defs")
2401 "*The file name to save completions to.") 2424 "Default name of file from which to read abbrevs."
2425 @dots{}
2426 :type 'file)
2402@end example 2427@end example
2428@end defun
2403 2429
2404 On GNU and Unix systems, and on some other systems as well, 2430 A lower-level function for standardizing file names, which
2405@code{convert-standard-filename} returns its argument unchanged. On 2431@code{locate-user-emacs-file} uses as a subroutine, is
2406some other systems, it alters the name to fit the system's conventions. 2432@code{convert-standard-filename}.
2407 2433
2408 For example, on MS-DOS the alterations made by this function include 2434@defun convert-standard-filename filename
2409converting a leading @samp{.} to @samp{_}, converting a @samp{_} in the 2435This function returns a file name based on @var{filename}, which fits
2410middle of the name to @samp{.} if there is no other @samp{.}, inserting 2436the conventions of the current operating system.
2411a @samp{.} after eight characters if there is none, and truncating to 2437
2412three characters after the @samp{.}. (It makes other changes as well.) 2438On GNU and Unix systems, this simply returns @var{filename}. On other
2413Thus, @file{.abbrev_defs} becomes @file{_abbrev.def}, and 2439operating systems, it may enforce system-specific file name
2414@file{.completions} becomes @file{_complet.ion}. 2440conventions; for example, on MS-DOS this function performs a variety
2441of changes to enforce MS-DOS file name limitations, including
2442converting any leading @samp{.} to @samp{_} and truncating to three
2443characters after the @samp{.}.
2444
2445The recommended way to use this function is to specify a name which
2446fits the conventions of GNU and Unix systems, and pass it to
2447@code{convert-standard-filename}.
2448@end defun
2415 2449
2416@node Contents of Directories 2450@node Contents of Directories
2417@section Contents of Directories 2451@section Contents of Directories
@@ -2684,9 +2718,9 @@ first, before handlers for jobs such as remote file access.
2684@code{file-name-nondirectory}, 2718@code{file-name-nondirectory},
2685@code{file-name-sans-versions}, @code{file-newer-than-file-p}, 2719@code{file-name-sans-versions}, @code{file-newer-than-file-p},
2686@code{file-ownership-preserved-p}, 2720@code{file-ownership-preserved-p},
2687@code{file-readable-p}, @code{file-regular-p}, @code{file-symlink-p}, 2721@code{file-readable-p}, @code{file-regular-p}, @code{file-subdir-of-p},
2688@code{file-truename}, @code{file-writable-p}, 2722@code{file-symlink-p}, @code{file-truename}, @code{file-writable-p},
2689@code{find-backup-file-name}, 2723@code{file-equal-p}, @code{find-backup-file-name},
2690@c Not sure why it was here: @code{find-file-noselect},@* 2724@c Not sure why it was here: @code{find-file-noselect},@*
2691@code{get-file-buffer}, 2725@code{get-file-buffer},
2692@code{insert-directory}, 2726@code{insert-directory},
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index 27303637e42..a01ad051489 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -1,7 +1,6 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc.
4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
6@setfilename ../../info/frames 5@setfilename ../../info/frames
7@node Frames, Positions, Windows, Top 6@node Frames, Positions, Windows, Top
@@ -24,26 +23,25 @@ into smaller windows. @xref{Splitting Windows}.
24more Emacs frames. In Emacs Lisp, a @dfn{terminal object} is a Lisp 23more Emacs frames. In Emacs Lisp, a @dfn{terminal object} is a Lisp
25object that represents a terminal. @xref{Terminal Type}. 24object that represents a terminal. @xref{Terminal Type}.
26 25
27@cindex terminal frame 26@cindex text terminal
28@cindex window frame 27@cindex graphical terminal
29 There are two classes of terminals: text-only terminals and 28@cindex graphical display
30graphical terminals. Text-only terminals are non-graphics-capable 29 There are two classes of terminals: @dfn{text terminals} and
31display devices, including ``terminal emulators'' such as xterm. On 30@dfn{graphical terminals}. Text terminals are non-graphics-capable
32text-only terminals, each frame occupies the entire terminal screen; 31displays, including @command{xterm} and other terminal emulators. On
33although you can create additional frames and switch between them, 32a text terminal, each Emacs frame occupies the terminal's entire
34only one frame can be shown at any given time. We refer to frames on 33screen; although you can create additional frames and switch between
35text-only terminals as @dfn{terminal frames}. Graphical terminals, on 34them, the terminal only shows one frame at a time. Graphical
36the other hand, are graphics-capable windowing systems, such as the X 35terminals, on the other hand, are managed by graphical display systems
37Window System. On a graphical terminal, Emacs can display multiple 36such as the X Window System, which allow Emacs to show multiple frames
38frames simultaneously. We refer to such frames as @dfn{window 37simultaneously on the same display.
39frames}.
40 38
41 On GNU and Unix systems, you can create additional frames on any 39 On GNU and Unix systems, you can create additional frames on any
42available terminal, within a single Emacs session, regardless of 40available terminal, within a single Emacs session, regardless of
43whether Emacs was started on a text-only or graphical terminal. Emacs 41whether Emacs was started on a text or graphical terminal. Emacs can
44can display on both graphical and text-only terminals simultaneously. 42display on both graphical and text terminals simultaneously. This
45This comes in handy, for instance, when you connect to the same 43comes in handy, for instance, when you connect to the same session
46session from several remote locations. @xref{Multiple Terminals}. 44from several remote locations. @xref{Multiple Terminals}.
47 45
48@defun framep object 46@defun framep object
49This predicate returns a non-@code{nil} value if @var{object} is a 47This predicate returns a non-@code{nil} value if @var{object} is a
@@ -51,14 +49,15 @@ frame, and @code{nil} otherwise. For a frame, the value indicates which
51kind of display the frame uses: 49kind of display the frame uses:
52 50
53@table @code 51@table @code
54@item x
55The frame is displayed in an X window.
56@item t 52@item t
57A terminal frame on a character display. 53The frame is displayed on a text terminal.
54@item x
55The frame is displayed on an X graphical terminal.
58@item w32 56@item w32
59The frame is displayed on MS-Windows 9X/NT. 57The frame is displayed on a MS-Windows graphical terminal.
60@item ns 58@item ns
61The frame is displayed on a GNUstep or Macintosh Cocoa display. 59The frame is displayed on a GNUstep or Macintosh Cocoa graphical
60terminal.
62@item pc 61@item pc
63The frame is displayed on an MS-DOS terminal. 62The frame is displayed on an MS-DOS terminal.
64@end table 63@end table
@@ -72,10 +71,10 @@ selected frame.
72 71
73@defun terminal-live-p object 72@defun terminal-live-p object
74This predicate returns a non-@code{nil} value if @var{object} is a 73This predicate returns a non-@code{nil} value if @var{object} is a
75terminal that is alive (i.e.@: was not deleted), and @code{nil} 74terminal that is live (i.e.@: not deleted), and @code{nil} otherwise.
76otherwise. For live terminals, the return value indicates what kind 75For live terminals, the return value indicates what kind of frames are
77of frames are displayed on that terminal; the list of possible values 76displayed on that terminal; the list of possible values is the same as
78is the same as for @code{framep} above. 77for @code{framep} above.
79@end defun 78@end defun
80 79
81@menu 80@menu
@@ -100,7 +99,7 @@ is the same as for @code{framep} above.
100* Window System Selections:: Transferring text to and from other X clients. 99* Window System Selections:: Transferring text to and from other X clients.
101* Drag and Drop:: Internals of Drag-and-Drop implementation. 100* Drag and Drop:: Internals of Drag-and-Drop implementation.
102* Color Names:: Getting the definitions of color names. 101* Color Names:: Getting the definitions of color names.
103* Text Terminal Colors:: Defining colors for text-only terminals. 102* Text Terminal Colors:: Defining colors for text terminals.
104* Resources:: Getting resource values from the server. 103* Resources:: Getting resource values from the server.
105* Display Feature Testing:: Determining the features of a terminal. 104* Display Feature Testing:: Determining the features of a terminal.
106@end menu 105@end menu
@@ -119,7 +118,7 @@ for the new frame. @xref{Frame Parameters}. If you specify the
119@code{terminal} parameter in @var{alist}, the new frame is created on 118@code{terminal} parameter in @var{alist}, the new frame is created on
120that terminal. Otherwise, if you specify the @code{window-system} 119that terminal. Otherwise, if you specify the @code{window-system}
121frame parameter in @var{alist}, that determines whether the frame 120frame parameter in @var{alist}, that determines whether the frame
122should be displayed on a text-only or graphical terminal. 121should be displayed on a text terminal or a graphical terminal.
123@xref{Window Systems}. If neither is specified, the new frame is 122@xref{Window Systems}. If neither is specified, the new frame is
124created in the same terminal as the selected frame. 123created in the same terminal as the selected frame.
125 124
@@ -164,15 +163,15 @@ frame.
164@cindex multiple X displays 163@cindex multiple X displays
165@cindex displays, multiple 164@cindex displays, multiple
166 165
167 Emacs represents each terminal, whether graphical or text-only, as a 166 Emacs represents each terminal as a @dfn{terminal object} data type
168@dfn{terminal object} data type (@pxref{Terminal Type}). On GNU and 167(@pxref{Terminal Type}). On GNU and Unix systems, Emacs can use
169Unix systems, Emacs can use multiple terminals simultaneously in each 168multiple terminals simultaneously in each session. On other systems,
170session. On other systems, it can only use a single terminal. Each 169it can only use a single terminal. Each terminal object has the
171terminal object has the following attributes: 170following attributes:
172 171
173@itemize @bullet 172@itemize @bullet
174@item 173@item
175The name of the device used by the terminal (e.g., @samp{:0.0} or 174The name of the device used by the terminal (e.g.@: @samp{:0.0} or
176@file{/dev/tty}). 175@file{/dev/tty}).
177 176
178@item 177@item
@@ -181,7 +180,7 @@ The terminal and keyboard coding systems used on the terminal.
181 180
182@item 181@item
183The kind of display associated with the terminal. This is the symbol 182The kind of display associated with the terminal. This is the symbol
184returned by the function @code{terminal-live-p} (i.e., @code{x}, 183returned by the function @code{terminal-live-p} (i.e.@: @code{x},
185@code{t}, @code{w32}, @code{ns}, or @code{pc}). @xref{Frames}. 184@code{t}, @code{w32}, @code{ns}, or @code{pc}). @xref{Frames}.
186 185
187@item 186@item
@@ -190,7 +189,7 @@ A list of terminal parameters. @xref{Terminal Parameters}.
190 189
191 There is no primitive for creating terminal objects. Emacs creates 190 There is no primitive for creating terminal objects. Emacs creates
192them as needed, such as when you call @code{make-frame-on-display} 191them as needed, such as when you call @code{make-frame-on-display}
193(which is described below). 192(described below).
194 193
195@defun terminal-name &optional terminal 194@defun terminal-name &optional terminal
196This function returns the file name of the device used by 195This function returns the file name of the device used by
@@ -200,7 +199,7 @@ a frame, meaning that frame's terminal.
200@end defun 199@end defun
201 200
202@defun terminal-list 201@defun terminal-list
203This function returns a list of all terminal objects currently in use. 202This function returns a list of all live terminal objects.
204@end defun 203@end defun
205 204
206@defun get-device-terminal device 205@defun get-device-terminal device
@@ -249,15 +248,15 @@ never be buffer-local (@pxref{Buffer-Local Variables}).
249 248
250 On GNU and Unix systems, each X display is a separate graphical 249 On GNU and Unix systems, each X display is a separate graphical
251terminal. When Emacs is started from within the X window system, it 250terminal. When Emacs is started from within the X window system, it
252uses the X display chosen with the @code{DISPLAY} environment 251uses the X display specified by the @env{DISPLAY} environment
253variable, or with the @samp{--display} option. @xref{Initial 252variable, or by the @samp{--display} option (@pxref{Initial Options,,,
254Options,,, emacs, The GNU Emacs Manual}. Emacs can connect to other X 253emacs, The GNU Emacs Manual}). Emacs can connect to other X displays
255displays via the command @code{make-frame-on-display}. Each X display 254via the command @code{make-frame-on-display}. Each X display has its
256has its own selected frame and its own minibuffer windows; however, 255own selected frame and its own minibuffer windows; however, only one
257only one of those frames is ``@emph{the} selected frame'' at any given 256of those frames is ``@emph{the} selected frame'' at any given moment
258moment (@pxref{Input Focus}). Emacs can even connect to other 257(@pxref{Input Focus}). Emacs can even connect to other text
259text-only terminals, by interacting with the @command{emacsclient} 258terminals, by interacting with the @command{emacsclient} program.
260program. @xref{Emacs Server,,, emacs, The GNU Emacs Manual}. 259@xref{Emacs Server,,, emacs, The GNU Emacs Manual}.
261 260
262 A single X server can handle more than one display. Each X display 261 A single X server can handle more than one display. Each X display
263has a three-part name, @samp{@var{host}:@var{server}.@var{screen}}. 262has a three-part name, @samp{@var{host}:@var{server}.@var{screen}}.
@@ -268,8 +267,8 @@ server, Emacs knows by the similarity in their names that they share a
268single keyboard. 267single keyboard.
269 268
270 On some ``multi-monitor'' setups, a single X display outputs to more 269 On some ``multi-monitor'' setups, a single X display outputs to more
271than one monitor. Currently, there is no way for Emacs to distinguish 270than one physical monitor. Currently, there is no way for Emacs to
272between the different physical monitors. 271distinguish between the different physical monitors.
273 272
274@deffn Command make-frame-on-display display &optional parameters 273@deffn Command make-frame-on-display display &optional parameters
275This function creates and returns a new frame on @var{display}, taking 274This function creates and returns a new frame on @var{display}, taking
@@ -278,8 +277,8 @@ the other frame parameters from the alist @var{parameters}.
278 277
279Before creating the frame, this function ensures that Emacs is ``set 278Before creating the frame, this function ensures that Emacs is ``set
280up'' to display graphics. For instance, if Emacs has not processed X 279up'' to display graphics. For instance, if Emacs has not processed X
281resources (e.g., if it was started on a text-only terminal), it does 280resources (e.g.@: if it was started on a text terminal), it does so at
282so at this time. In all other respects, this function behaves like 281this time. In all other respects, this function behaves like
283@code{make-frame} (@pxref{Creating Frames}). 282@code{make-frame} (@pxref{Creating Frames}).
284@end deffn 283@end deffn
285 284
@@ -325,15 +324,15 @@ on that display (@pxref{Deleting Frames}).
325Just what parameters a frame has depends on what display mechanism it 324Just what parameters a frame has depends on what display mechanism it
326uses. 325uses.
327 326
328 Frame parameters exist mostly for the sake of window systems. A 327 Frame parameters exist mostly for the sake of graphical displays.
329terminal frame has a few parameters, mostly for compatibility's sake; 328Most frame parameters have no effect when applied to a frame on a text
330only the @code{height}, @code{width}, @code{name}, @code{title}, 329terminal; only the @code{height}, @code{width}, @code{name},
331@code{menu-bar-lines}, @code{buffer-list} and @code{buffer-predicate} 330@code{title}, @code{menu-bar-lines}, @code{buffer-list} and
332parameters do something special. If the terminal supports colors, the 331@code{buffer-predicate} parameters do something special. If the
333parameters @code{foreground-color}, @code{background-color}, 332terminal supports colors, the parameters @code{foreground-color},
334@code{background-mode} and @code{display-type} are also meaningful. 333@code{background-color}, @code{background-mode} and
335If the terminal supports frame transparency, the parameter 334@code{display-type} are also meaningful. If the terminal supports
336@code{alpha} is also meaningful. 335frame transparency, the parameter @code{alpha} is also meaningful.
337 336
338@menu 337@menu
339* Parameter Access:: How to change a frame's parameters. 338* Parameter Access:: How to change a frame's parameters.
@@ -387,12 +386,13 @@ parameter values to frames that will be created henceforth.
387@node Initial Parameters 386@node Initial Parameters
388@subsection Initial Frame Parameters 387@subsection Initial Frame Parameters
389 388
390You can specify the parameters for the initial startup frame 389You can specify the parameters for the initial startup frame by
391by setting @code{initial-frame-alist} in your init file (@pxref{Init File}). 390setting @code{initial-frame-alist} in your init file (@pxref{Init
391File}).
392 392
393@defopt initial-frame-alist 393@defopt initial-frame-alist
394This variable's value is an alist of parameter values used when creating 394This variable's value is an alist of parameter values used when
395the initial window frame. You can set this variable to specify the 395creating the initial frame. You can set this variable to specify the
396appearance of the initial frame without altering subsequent frames. 396appearance of the initial frame without altering subsequent frames.
397Each element has the form: 397Each element has the form:
398 398
@@ -444,11 +444,13 @@ Functions that display a buffer in a separate frame can override the
444default parameters by supplying their own parameters. @xref{Definition 444default parameters by supplying their own parameters. @xref{Definition
445of special-display-frame-alist}. 445of special-display-frame-alist}.
446 446
447If you use options that specify window appearance when you invoke Emacs, 447If you invoke Emacs with command-line options that specify frame
448they take effect by adding elements to @code{default-frame-alist}. One 448appearance, those options take effect by adding elements to either
449exception is @samp{-geometry}, which adds the specified position to 449@code{initial-frame-alist} or @code{default-frame-alist}. Options
450@code{initial-frame-alist} instead. @xref{Emacs Invocation,, Command 450which affect just the initial frame, such as @samp{-geometry} and
451Line Arguments for Emacs Invocation, emacs, The GNU Emacs Manual}. 451@samp{--maximized}, add to @code{initial-frame-alist}; the others add
452to @code{default-frame-alist}. @pxref{Emacs Invocation,, Command Line
453Arguments for Emacs Invocation, emacs, The GNU Emacs Manual}.
452 454
453@node Window Frame Parameters 455@node Window Frame Parameters
454@subsection Window Frame Parameters 456@subsection Window Frame Parameters
@@ -459,8 +461,8 @@ it uses. This section describes the parameters that have special
459meanings on some or all kinds of terminals. Of these, @code{name}, 461meanings on some or all kinds of terminals. Of these, @code{name},
460@code{title}, @code{height}, @code{width}, @code{buffer-list} and 462@code{title}, @code{height}, @code{width}, @code{buffer-list} and
461@code{buffer-predicate} provide meaningful information in terminal 463@code{buffer-predicate} provide meaningful information in terminal
462frames, and @code{tty-color-mode} is meaningful @emph{only} in 464frames, and @code{tty-color-mode} is meaningful only for frames on
463terminal frames. 465text terminals.
464 466
465@menu 467@menu
466* Basic Parameters:: Parameters that are fundamental. 468* Basic Parameters:: Parameters that are fundamental.
@@ -524,7 +526,7 @@ named, this parameter will be @code{nil}.
524@cindex window position on display 526@cindex window position on display
525 527
526 Position parameters' values are normally measured in pixels, but on 528 Position parameters' values are normally measured in pixels, but on
527text-only terminals they count characters or lines instead. 529text terminals they count characters or lines instead.
528 530
529@table @code 531@table @code
530@vindex left, a frame parameter 532@vindex left, a frame parameter
@@ -561,19 +563,17 @@ to the top (or bottom) edge of the screen. It works just like
561 563
562@vindex icon-left, a frame parameter 564@vindex icon-left, a frame parameter
563@item icon-left 565@item icon-left
564The screen position of the left edge @emph{of the frame's icon}, in 566The screen position of the left edge of the frame's icon, in pixels,
565pixels, counting from the left edge of the screen. This takes effect if 567counting from the left edge of the screen. This takes effect when the
566and when the frame is iconified. 568frame is iconified, if the window manager supports this feature. If
567 569you specify a value for this parameter, then you must also specify a
568If you specify a value for this parameter, then you must also specify 570value for @code{icon-top} and vice versa.
569a value for @code{icon-top} and vice versa. The window manager may
570ignore these two parameters.
571 571
572@vindex icon-top, a frame parameter 572@vindex icon-top, a frame parameter
573@item icon-top 573@item icon-top
574The screen position of the top edge @emph{of the frame's icon}, in 574The screen position of the top edge of the frame's icon, in pixels,
575pixels, counting from the top edge of the screen. This takes effect if 575counting from the top edge of the screen. This takes effect when the
576and when the frame is iconified. 576frame is iconified, if the window manager supports this feature.
577 577
578@vindex user-position, a frame parameter 578@vindex user-position, a frame parameter
579@item user-position 579@item user-position
@@ -601,8 +601,9 @@ parameters represent the user's stated preference; otherwise, use
601@subsubsection Size Parameters 601@subsubsection Size Parameters
602@cindex window size on display 602@cindex window size on display
603 603
604 Size parameters' values are normally measured in pixels, but on 604 Frame parameters specify frame sizes in character units. On
605text-only terminals they count characters or lines instead. 605graphical displays, the @code{default} face determines the actual
606pixel sizes of these character units (@pxref{Face Attributes}).
606 607
607@table @code 608@table @code
608@vindex height, a frame parameter 609@vindex height, a frame parameter
@@ -757,8 +758,9 @@ If non-@code{nil}, this frame's window is never split automatically.
757@subsubsection Window Management Parameters 758@subsubsection Window Management Parameters
758@cindex window manager interaction, and frame parameters 759@cindex window manager interaction, and frame parameters
759 760
760 These frame parameters, meaningful only on window system displays, 761 The following frame parameters control various aspects of the
761interact with the window manager. 762frame's interaction with the window manager. They have no effect on
763text terminals.
762 764
763@table @code 765@table @code
764@vindex visibility, a frame parameter 766@vindex visibility, a frame parameter
@@ -769,11 +771,13 @@ iconified. @xref{Visibility of Frames}.
769 771
770@vindex auto-raise, a frame parameter 772@vindex auto-raise, a frame parameter
771@item auto-raise 773@item auto-raise
772Whether selecting the frame raises it (non-@code{nil} means yes). 774If non-@code{nil}, Emacs automatically raises the frame when it is
775selected. Some window managers do not allow this.
773 776
774@vindex auto-lower, a frame parameter 777@vindex auto-lower, a frame parameter
775@item auto-lower 778@item auto-lower
776Whether deselecting the frame lowers it (non-@code{nil} means yes). 779If non-@code{nil}, Emacs automatically lowers the frame when it is
780deselected. Some window managers do not allow this.
777 781
778@vindex icon-type, a frame parameter 782@vindex icon-type, a frame parameter
779@item icon-type 783@item icon-type
@@ -789,12 +793,15 @@ appears. If this is @code{nil}, the frame's title is used.
789 793
790@vindex window-id, a frame parameter 794@vindex window-id, a frame parameter
791@item window-id 795@item window-id
792The number of the window-system window used by the frame 796The ID number which the graphical display uses for this frame. Emacs
793to contain the actual Emacs windows. 797assigns this parameter when the frame is created; changing the
798parameter has no effect on the actual ID number.
794 799
795@vindex outer-window-id, a frame parameter 800@vindex outer-window-id, a frame parameter
796@item outer-window-id 801@item outer-window-id
797The number of the outermost window-system window used for the whole frame. 802The ID number of the outermost window-system window in which the frame
803exists. As with @code{window-id}, changing this parameter has no
804actual effect.
798 805
799@vindex wait-for-wm, a frame parameter 806@vindex wait-for-wm, a frame parameter
800@item wait-for-wm 807@item wait-for-wm
@@ -849,9 +856,26 @@ Display a horizontal bar @var{height} pixels high.
849@end table 856@end table
850 857
851@vindex cursor-type 858@vindex cursor-type
852The buffer-local variable @code{cursor-type} overrides the value of 859The @code{cursor-type} frame parameter may be overridden by the
853the @code{cursor-type} frame parameter, but if it is @code{t}, that 860variables @code{cursor-type} and
854means to use the cursor specified for the frame. 861@code{cursor-in-non-selected-windows}:
862
863@defvar cursor-type
864This buffer-local variable controls how the cursor looks in a selected
865window showing the buffer. If its value is @code{t}, that means to
866use the cursor specified by the @code{cursor-type} frame parameter.
867Otherwise, the value should be one of the cursor types listed above,
868and it overrides the @code{cursor-type} frame parameter.
869@end defvar
870
871@defopt cursor-in-non-selected-windows
872This buffer-local variable controls how the cursor looks in a window
873that is not selected. It supports the same values as the
874@code{cursor-type} frame parameter; also, @code{nil} means don't
875display a cursor in nonselected windows, and @code{t} (the default)
876means use a standard modification of the usual cursor type (solid box
877becomes hollow box, and bar becomes a narrower bar).
878@end defopt
855 879
856@defopt blink-cursor-alist 880@defopt blink-cursor-alist
857This variable specifies how to blink the cursor. Each element has the 881This variable specifies how to blink the cursor. Each element has the
@@ -867,15 +891,6 @@ variable do not take effect immediately, only when you specify the
867@code{cursor-type} frame parameter. 891@code{cursor-type} frame parameter.
868@end defopt 892@end defopt
869 893
870@defopt cursor-in-non-selected-windows
871This variable controls how the cursor looks in a window that is not
872selected. It supports the same values as the @code{cursor-type} frame
873parameter; also, @code{nil} means don't display a cursor in
874nonselected windows, and @code{t} (the default) means use a standard
875modification of the usual cursor type (solid box becomes hollow box,
876and bar becomes a narrower bar).
877@end defopt
878
879@node Font and Color Parameters 894@node Font and Color Parameters
880@subsubsection Font and Color Parameters 895@subsubsection Font and Color Parameters
881@cindex font and color, frame parameters 896@cindex font and color, frame parameters
@@ -904,7 +919,7 @@ to whether the background color is a light one or a dark one.
904@cindex standard colors for character terminals 919@cindex standard colors for character terminals
905This parameter overrides the terminal's color support as given by the 920This parameter overrides the terminal's color support as given by the
906system's terminal capabilities database in that this parameter's value 921system's terminal capabilities database in that this parameter's value
907specifies the color mode to use in terminal frames. The value can be 922specifies the color mode to use on a text terminal. The value can be
908either a symbol or a number. A number specifies the number of colors 923either a symbol or a number. A number specifies the number of colors
909to use (and, indirectly, what commands to issue to produce each 924to use (and, indirectly, what commands to issue to produce each
910color). For example, @code{(tty-color-mode . 8)} specifies use of the 925color). For example, @code{(tty-color-mode . 8)} specifies use of the
@@ -1048,17 +1063,17 @@ selected frame.
1048@defunx frame-pixel-width &optional frame 1063@defunx frame-pixel-width &optional frame
1049These functions return the height and width of the main display area 1064These functions return the height and width of the main display area
1050of @var{frame}, measured in pixels. If you don't supply @var{frame}, 1065of @var{frame}, measured in pixels. If you don't supply @var{frame},
1051they use the selected frame. For a text-only terminal, the results are 1066they use the selected frame. For a text terminal, the results are in
1052in characters rather than pixels. 1067characters rather than pixels.
1053 1068
1054These values include the internal borders, and windows' scroll bars and 1069These values include the internal borders, and windows' scroll bars
1055fringes (which belong to individual windows, not to the frame itself). 1070and fringes (which belong to individual windows, not to the frame
1056The exact value of the heights depends on the window-system and toolkit 1071itself). The exact value of the heights depends on the window-system
1057in use. With Gtk+, the height does not include any tool bar or menu 1072and toolkit in use. With Gtk+, the height does not include any tool
1058bar. With the Motif or Lucid toolkits, it includes the tool bar but 1073bar or menu bar. With the Motif or Lucid toolkits, it includes the
1059not the menu bar. In a graphical version with no toolkit, it includes 1074tool bar but not the menu bar. In a graphical version with no
1060both the tool bar and menu bar. For a text-only terminal, the result 1075toolkit, it includes both the tool bar and menu bar. For a text
1061includes the menu bar. 1076terminal, the result includes the menu bar.
1062@end defun 1077@end defun
1063 1078
1064@defun frame-char-height &optional frame 1079@defun frame-char-height &optional frame
@@ -1085,13 +1100,13 @@ fit.
1085 1100
1086If @var{pretend} is non-@code{nil}, then Emacs displays @var{lines} 1101If @var{pretend} is non-@code{nil}, then Emacs displays @var{lines}
1087lines of output in @var{frame}, but does not change its value for the 1102lines of output in @var{frame}, but does not change its value for the
1088actual height of the frame. This is only useful for a terminal frame. 1103actual height of the frame. This is only useful on text terminals.
1089Using a smaller height than the terminal actually implements may be 1104Using a smaller height than the terminal actually implements may be
1090useful to reproduce behavior observed on a smaller screen, or if the 1105useful to reproduce behavior observed on a smaller screen, or if the
1091terminal malfunctions when using its whole screen. Setting the frame 1106terminal malfunctions when using its whole screen. Setting the frame
1092height ``for real'' does not always work, because knowing the correct 1107height ``for real'' does not always work, because knowing the correct
1093actual size may be necessary for correct cursor positioning on a 1108actual size may be necessary for correct cursor positioning on
1094terminal frame. 1109text terminals.
1095@end defun 1110@end defun
1096 1111
1097@defun set-frame-width frame width &optional pretend 1112@defun set-frame-width frame width &optional pretend
@@ -1100,13 +1115,6 @@ The argument @var{pretend} has the same meaning as in
1100@code{set-frame-height}. 1115@code{set-frame-height}.
1101@end defun 1116@end defun
1102 1117
1103@findex set-screen-height
1104@findex set-screen-width
1105 The older functions @code{set-screen-height} and
1106@code{set-screen-width} were used to specify the height and width of the
1107screen, in Emacs versions that did not support multiple frames. They
1108are semi-obsolete, but still work; they apply to the selected frame.
1109
1110@node Geometry 1118@node Geometry
1111@subsection Geometry 1119@subsection Geometry
1112 1120
@@ -1231,9 +1239,10 @@ while processing @code{frame-title-format} or
1231@section Deleting Frames 1239@section Deleting Frames
1232@cindex deleting frames 1240@cindex deleting frames
1233 1241
1234Frames remain potentially visible until you explicitly @dfn{delete} 1242 A @dfn{live frame} is one that has not been deleted. When a frame
1235them. A deleted frame cannot appear on the screen, but continues to 1243is deleted, it is removed from its terminal display, although it may
1236exist as a Lisp object until there are no references to it. 1244continue to exist as a Lisp object until there are no more references
1245to it.
1237 1246
1238@deffn Command delete-frame &optional frame force 1247@deffn Command delete-frame &optional frame force
1239@vindex delete-frame-functions 1248@vindex delete-frame-functions
@@ -1264,25 +1273,25 @@ calls the function @code{delete-frame}. @xref{Misc Events}.
1264@cindex frames, scanning all 1273@cindex frames, scanning all
1265 1274
1266@defun frame-list 1275@defun frame-list
1267The function @code{frame-list} returns a list of all the live frames, 1276This function returns a list of all the live frames, i.e.@: those that
1268i.e.@: those that have not been deleted. It is analogous to 1277have not been deleted. It is analogous to @code{buffer-list} for
1269@code{buffer-list} for buffers, and includes frames on all terminals. 1278buffers, and includes frames on all terminals. The list that you get
1270The list that you get is newly created, so modifying the list doesn't 1279is newly created, so modifying the list doesn't have any effect on the
1271have any effect on the internals of Emacs. 1280internals of Emacs.
1272@end defun 1281@end defun
1273 1282
1274@defun visible-frame-list 1283@defun visible-frame-list
1275This function returns a list of just the currently visible frames. 1284This function returns a list of just the currently visible frames.
1276@xref{Visibility of Frames}. (Terminal frames always count as 1285@xref{Visibility of Frames}. Frames on text terminals always count as
1277``visible,'' even though only the selected one is actually displayed.) 1286``visible'', even though only the selected one is actually displayed.
1278@end defun 1287@end defun
1279 1288
1280@defun next-frame &optional frame minibuf 1289@defun next-frame &optional frame minibuf
1281The function @code{next-frame} lets you cycle conveniently through all 1290This function lets you cycle conveniently through all the frames on
1282the frames on the current display from an arbitrary starting point. It 1291the current display from an arbitrary starting point. It returns the
1283returns the ``next'' frame after @var{frame} in the cycle. If 1292``next'' frame after @var{frame} in the cycle. If @var{frame} is
1284@var{frame} is omitted or @code{nil}, it defaults to the selected frame 1293omitted or @code{nil}, it defaults to the selected frame (@pxref{Input
1285(@pxref{Input Focus}). 1294Focus}).
1286 1295
1287The second argument, @var{minibuf}, says which frames to consider: 1296The second argument, @var{minibuf}, says which frames to consider:
1288 1297
@@ -1370,20 +1379,20 @@ function @code{select-frame}. This does not alter the window system's
1370concept of focus; rather, it escapes from the window manager's control 1379concept of focus; rather, it escapes from the window manager's control
1371until that control is somehow reasserted. 1380until that control is somehow reasserted.
1372 1381
1373When using a text-only terminal, only one frame can be displayed at a 1382When using a text terminal, only one frame can be displayed at a time
1374time on the terminal, so after a call to @code{select-frame}, the next 1383on the terminal, so after a call to @code{select-frame}, the next
1375redisplay actually displays the newly selected frame. This frame 1384redisplay actually displays the newly selected frame. This frame
1376remains selected until a subsequent call to @code{select-frame}. Each 1385remains selected until a subsequent call to @code{select-frame}. Each
1377terminal frame has a number which appears in the mode line before the 1386frame on a text terminal has a number which appears in the mode line
1378buffer name (@pxref{Mode Line Variables}). 1387before the buffer name (@pxref{Mode Line Variables}).
1379 1388
1380@defun select-frame-set-input-focus frame &optional norecord 1389@defun select-frame-set-input-focus frame &optional norecord
1381This function selects @var{frame}, raises it (should it happen to be 1390This function selects @var{frame}, raises it (should it happen to be
1382obscured by other frames) and tries to give it the X server's focus. 1391obscured by other frames) and tries to give it the X server's focus.
1383On a text-only terminal, the next redisplay displays the new frame on 1392On a text terminal, the next redisplay displays the new frame on the
1384the entire terminal screen. The optional argument @var{norecord} has 1393entire terminal screen. The optional argument @var{norecord} has the
1385the same meaning as for @code{select-frame} (see below). The return 1394same meaning as for @code{select-frame} (see below). The return value
1386value of this function is not significant. 1395of this function is not significant.
1387@end defun 1396@end defun
1388 1397
1389@defun select-frame frame &optional norecord 1398@defun select-frame frame &optional norecord
@@ -1467,20 +1476,34 @@ position consistent with the new selected frame.
1467@cindex visible frame 1476@cindex visible frame
1468@cindex invisible frame 1477@cindex invisible frame
1469@cindex iconified frame 1478@cindex iconified frame
1479@cindex minimized frame
1470@cindex frame visibility 1480@cindex frame visibility
1471 1481
1472A window frame may be @dfn{visible}, @dfn{invisible}, or 1482A frame on a graphical display may be @dfn{visible}, @dfn{invisible},
1473@dfn{iconified}. If it is visible, you can see its contents, unless 1483or @dfn{iconified}. If it is visible, its contents are displayed in
1474other windows cover it. If it is iconified, the frame's contents do 1484the usual manner. If it is iconified, its contents are not displayed,
1475not appear on the screen, but an icon does. (Note: because of the 1485but there is a little icon somewhere to bring the frame back into view
1476way in which some window managers implement the concept of multiple 1486(some window managers refer to this state as @dfn{minimized} rather
1477workspaces, or desktops, all frames on other workspaces may appear to 1487than @dfn{iconified}, but from Emacs' point of view they are the same
1478Emacs to be iconified.) If the frame is invisible, it doesn't show on 1488thing). If a frame is invisible, it is not displayed at all.
1479the screen, not even as an icon.
1480 1489
1481Visibility is meaningless for terminal frames, since only the selected 1490 Visibility is meaningless on text terminals, since only the selected
1482one is actually displayed in any case. 1491one is actually displayed in any case.
1483 1492
1493@defun frame-visible-p frame
1494This function returns the visibility status of frame @var{frame}. The
1495value is @code{t} if @var{frame} is visible, @code{nil} if it is
1496invisible, and @code{icon} if it is iconified.
1497
1498On a text terminal, all frames are considered visible, whether they
1499are currently being displayed or not.
1500@end defun
1501
1502@deffn Command iconify-frame &optional frame
1503This function iconifies frame @var{frame}. If you omit @var{frame}, it
1504iconifies the selected frame.
1505@end deffn
1506
1484@deffn Command make-frame-visible &optional frame 1507@deffn Command make-frame-visible &optional frame
1485This function makes frame @var{frame} visible. If you omit 1508This function makes frame @var{frame} visible. If you omit
1486@var{frame}, it makes the selected frame visible. This does not raise 1509@var{frame}, it makes the selected frame visible. This does not raise
@@ -1496,29 +1519,12 @@ Unless @var{force} is non-@code{nil}, this function refuses to make
1496@var{frame} invisible if all other frames are invisible.. 1519@var{frame} invisible if all other frames are invisible..
1497@end deffn 1520@end deffn
1498 1521
1499@deffn Command iconify-frame &optional frame
1500This function iconifies frame @var{frame}. If you omit @var{frame}, it
1501iconifies the selected frame.
1502@end deffn
1503
1504@defun frame-visible-p frame
1505This returns the visibility status of frame @var{frame}. The value is
1506@code{t} if @var{frame} is visible, @code{nil} if it is invisible, and
1507@code{icon} if it is iconified.
1508
1509On a text-only terminal, all frames are considered visible, whether
1510they are currently being displayed or not, and this function returns
1511@code{t} for all frames.
1512@end defun
1513
1514 The visibility status of a frame is also available as a frame 1522 The visibility status of a frame is also available as a frame
1515parameter. You can read or change it as such. @xref{Management 1523parameter. You can read or change it as such. @xref{Management
1516Parameters}. 1524Parameters}. The user can also iconify and deiconify frames with the
1517 1525window manager. This happens below the level at which Emacs can exert
1518 The user can iconify and deiconify frames with the window manager. 1526any control, but Emacs does provide events that you can use to keep
1519This happens below the level at which Emacs can exert any control, but 1527track of such changes. @xref{Misc Events}.
1520Emacs does provide events that you can use to keep track of such
1521changes. @xref{Misc Events}.
1522 1528
1523@node Raising and Lowering 1529@node Raising and Lowering
1524@section Raising and Lowering Frames 1530@section Raising and Lowering Frames
@@ -1709,7 +1715,7 @@ displayed on @var{frame} is visible; otherwise it returns @code{nil}.
1709@var{frame} omitted or @code{nil} means the selected frame. This is 1715@var{frame} omitted or @code{nil} means the selected frame. This is
1710useful when @code{make-pointer-invisible} is set to @code{t}: it 1716useful when @code{make-pointer-invisible} is set to @code{t}: it
1711allows to know if the pointer has been hidden. 1717allows to know if the pointer has been hidden.
1712@xref{Mouse Avoidance,,,emacs}. 1718@xref{Mouse Avoidance,,,emacs, The Emacs Manual}.
1713@end defun 1719@end defun
1714 1720
1715@need 3000 1721@need 3000
@@ -2111,10 +2117,10 @@ and that name is still supported as an alias.
2111 2117
2112@node Text Terminal Colors 2118@node Text Terminal Colors
2113@section Text Terminal Colors 2119@section Text Terminal Colors
2114@cindex colors on text-only terminals 2120@cindex colors on text terminals
2115 2121
2116 Text-only terminals usually support only a small number of colors, 2122 Text terminals usually support only a small number of colors, and
2117and the computer uses small integers to select colors on the terminal. 2123the computer uses small integers to select colors on the terminal.
2118This means that the computer cannot reliably tell what the selected 2124This means that the computer cannot reliably tell what the selected
2119color looks like; instead, you have to inform your application which 2125color looks like; instead, you have to inform your application which
2120small integers correspond to which colors. However, Emacs does know 2126small integers correspond to which colors. However, Emacs does know
@@ -2128,10 +2134,10 @@ in @ref{Color Names}.
2128 2134
2129 These functions accept a display (either a frame or the name of a 2135 These functions accept a display (either a frame or the name of a
2130terminal) as an optional argument. We hope in the future to make 2136terminal) as an optional argument. We hope in the future to make
2131Emacs support different colors on different text-only terminals; then 2137Emacs support different colors on different text terminals; then this
2132this argument will specify which terminal to operate on (the default 2138argument will specify which terminal to operate on (the default being
2133being the selected frame's terminal; @pxref{Input Focus}). At 2139the selected frame's terminal; @pxref{Input Focus}). At present,
2134present, though, the @var{frame} argument has no effect. 2140though, the @var{frame} argument has no effect.
2135 2141
2136@defun tty-color-define name number &optional rgb frame 2142@defun tty-color-define name number &optional rgb frame
2137This function associates the color name @var{name} with 2143This function associates the color name @var{name} with
@@ -2145,12 +2151,12 @@ Emacs will not know what it looks like.
2145@end defun 2151@end defun
2146 2152
2147@defun tty-color-clear &optional frame 2153@defun tty-color-clear &optional frame
2148This function clears the table of defined colors for a text-only terminal. 2154This function clears the table of defined colors for a text terminal.
2149@end defun 2155@end defun
2150 2156
2151@defun tty-color-alist &optional frame 2157@defun tty-color-alist &optional frame
2152This function returns an alist recording the known colors supported by a 2158This function returns an alist recording the known colors supported by
2153text-only terminal. 2159a text terminal.
2154 2160
2155Each element has the form @code{(@var{name} @var{number} . @var{rgb})} 2161Each element has the form @code{(@var{name} @var{number} . @var{rgb})}
2156or @code{(@var{name} @var{number})}. Here, @var{name} is the color 2162or @code{(@var{name} @var{number})}. Here, @var{name} is the color
@@ -2266,8 +2272,8 @@ a mouse.
2266@defun display-graphic-p &optional display 2272@defun display-graphic-p &optional display
2267This function returns @code{t} if @var{display} is a graphic display 2273This function returns @code{t} if @var{display} is a graphic display
2268capable of displaying several frames and several different fonts at 2274capable of displaying several frames and several different fonts at
2269once. This is true for displays that use a window system such as X, and 2275once. This is true for displays that use a window system such as X,
2270false for text-only terminals. 2276and false for text terminals.
2271@end defun 2277@end defun
2272 2278
2273@defun display-mouse-p &optional display 2279@defun display-mouse-p &optional display
diff --git a/doc/lispref/help.texi b/doc/lispref/help.texi
index a98797f3618..537514d7fb9 100644
--- a/doc/lispref/help.texi
+++ b/doc/lispref/help.texi
@@ -636,6 +636,7 @@ in the minibuffer with the message @samp{Help (Type ? for further
636options)}, and then provides assistance in finding out what the key 636options)}, and then provides assistance in finding out what the key
637bindings are, and what the mode is intended for. It returns @code{nil}. 637bindings are, and what the mode is intended for. It returns @code{nil}.
638 638
639@vindex Helper-help-map
639This can be customized by changing the map @code{Helper-help-map}. 640This can be customized by changing the map @code{Helper-help-map}.
640@end deffn 641@end deffn
641 642
diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi
index 551d9141574..0d29c25c8b1 100644
--- a/doc/lispref/hooks.texi
+++ b/doc/lispref/hooks.texi
@@ -1,6 +1,6 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1993, 1998, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1993, 1998, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/hooks 5@setfilename ../../info/hooks
6@node Standard Hooks, Index, Standard Keymaps, Top 6@node Standard Hooks, Index, Standard Keymaps, Top
@@ -8,7 +8,7 @@
8@cindex standard hooks 8@cindex standard hooks
9@cindex hook variables, list of 9@cindex hook variables, list of
10 10
11The following is a list of hook variables that let you provide 11The following is a list of some hook variables that let you provide
12functions to be called from within Emacs on suitable occasions. 12functions to be called from within Emacs on suitable occasions.
13 13
14Most of these variables have names ending with @samp{-hook}. They are 14Most of these variables have names ending with @samp{-hook}. They are
@@ -18,117 +18,92 @@ arguments and their values are completely ignored. The recommended way
18to put a new function on such a hook is to call @code{add-hook}. 18to put a new function on such a hook is to call @code{add-hook}.
19@xref{Hooks}, for more information about using hooks. 19@xref{Hooks}, for more information about using hooks.
20 20
21Every major mode defines a mode hook named
22@samp{@var{modename}-mode-hook}. The major mode command runs this
23normal hook with @code{run-mode-hooks} as the very last thing it does.
24@xref{Mode Hooks}. Most minor modes have mode hooks too. Mode hooks
25are omitted in the list below.
26
27The variables whose names end in @samp{-hooks} or @samp{-functions} are 21The variables whose names end in @samp{-hooks} or @samp{-functions} are
28usually @dfn{abnormal hooks}; their values are lists of functions, but 22usually @dfn{abnormal hooks}; their values are lists of functions, but
29these functions are called in a special way (they are passed arguments, 23these functions are called in a special way (they are passed arguments,
30or their values are used). The variables whose names end in 24or their values are used). The variables whose names end in
31@samp{-function} have single functions as their values. 25@samp{-function} have single functions as their values.
32 26
27This is not an exhaustive list, it only covers the more general hooks.
28For example, every major mode defines a hook named
29@samp{@var{modename}-mode-hook}. The major mode command runs this
30normal hook with @code{run-mode-hooks} as the very last thing it does.
31@xref{Mode Hooks}. Most minor modes have mode hooks too.
32
33A special feature allows you to specify expressions to evaluate if and 33A special feature allows you to specify expressions to evaluate if and
34when a file is loaded (@pxref{Hooks for Loading}). That feature is 34when a file is loaded (@pxref{Hooks for Loading}). That feature is
35not exactly a hook, but does a similar job. 35not exactly a hook, but does a similar job.
36 36
37@c We need to xref to where each hook is documented or else document 37@c We need to xref to where each hook is documented or else document it here.
38@c it here. 38@c Add vindex for anything not indexed elsewhere.
39@c This list is in alphabetical order, grouped by topic.
40@c TODO It should probably be more thoroughly ordered by topic.
39 41
40@table @code 42@table @code
41@item abbrev-expand-functions
42@xref{Abbrev Expansion}.
43
44@item activate-mark-hook 43@item activate-mark-hook
44@itemx deactivate-mark-hook
45@xref{The Mark}. 45@xref{The Mark}.
46 46
47@item after-change-functions 47@item after-change-functions
48@itemx before-change-functions
49@itemx first-change-hook
48@xref{Change Hooks}. 50@xref{Change Hooks}.
49 51
50@item after-change-major-mode-hook 52@item after-change-major-mode-hook
53@itemx change-major-mode-after-body-hook
51@xref{Mode Hooks}. 54@xref{Mode Hooks}.
52 55
53@item after-init-hook 56@item after-init-hook
57@itemx before-init-hook
58@itemx emacs-startup-hook
54@xref{Init File}. 59@xref{Init File}.
55 60
56@item after-insert-file-functions 61@item after-insert-file-functions
62@itemx write-region-annotate-functions
63@itemx write-region-post-annotation-function
57@xref{Format Conversion}. 64@xref{Format Conversion}.
58 65
59@item after-make-frame-functions 66@item after-make-frame-functions
67@itemx before-make-frame-hook
60@xref{Creating Frames}. 68@xref{Creating Frames}.
61 69
70@c Not general enough?
71@ignore
62@item after-revert-hook 72@item after-revert-hook
73@itemx before-revert-hook
74@itemx buffer-stale-function
75@itemx revert-buffer-function
76@itemx revert-buffer-insert-file-contents-function
63@xref{Reverting}. 77@xref{Reverting}.
78@end ignore
64 79
65@item after-save-hook 80@item after-save-hook
81@itemx before-save-hook
82@itemx write-contents-functions
83@itemx write-file-functions
66@xref{Saving Buffers}. 84@xref{Saving Buffers}.
67 85
68@item auto-fill-function 86@item after-setting-font-hook
69@xref{Auto Filling}. 87@vindex after-setting-font-hook
88Hook run after a frame's font changes.
70 89
71@item auto-save-hook 90@item auto-save-hook
72@xref{Auto-Saving}. 91@xref{Auto-Saving}.
73 92
74@item before-change-functions
75@xref{Change Hooks}.
76
77@item before-hack-local-variables-hook 93@item before-hack-local-variables-hook
94@itemx hack-local-variables-hook
78@xref{File Local Variables}. 95@xref{File Local Variables}.
79 96
80@item before-init-hook
81@xref{Init File}.
82
83@item before-make-frame-hook
84@xref{Creating Frames}.
85
86@item before-revert-hook
87@xref{Reverting}.
88
89@item before-save-hook
90@xref{Saving Buffers}.
91
92@item blink-paren-function
93@xref{Blinking}.
94
95@item buffer-access-fontify-functions 97@item buffer-access-fontify-functions
96@xref{Lazy Properties}. 98@xref{Lazy Properties}.
97 99
98@item calendar-initial-window-hook 100@item buffer-list-update-hook
99@iftex 101@vindex buffer-list-update-hook
100@inforef{Calendar Customizing,, emacs-xtra}. 102Hook run when the buffer list changes.
101@end iftex 103
102@ifnottex 104@item buffer-quit-function
103@xref{Calendar Customizing,,, emacs}. 105@vindex buffer-quit-function
104@end ifnottex 106Function to call to ``quit'' the current buffer.
105
106@item calendar-load-hook
107@iftex
108@inforef{Calendar Customizing,, emacs-xtra}.
109@end iftex
110@ifnottex
111@xref{Calendar Customizing,,, emacs}.
112@end ifnottex
113
114@item calendar-today-invisible-hook
115@iftex
116@inforef{Calendar Customizing,, emacs-xtra}.
117@end iftex
118@ifnottex
119@xref{Calendar Customizing,,, emacs}.
120@end ifnottex
121
122@item calendar-today-visible-hook
123@iftex
124@inforef{Calendar Customizing,, emacs-xtra}.
125@end iftex
126@ifnottex
127@xref{Calendar Customizing,,, emacs}.
128@end ifnottex
129
130@item change-major-mode-after-body-hook
131@xref{Mode Hooks}.
132 107
133@item change-major-mode-hook 108@item change-major-mode-hook
134@xref{Creating Buffer-Local}. 109@xref{Creating Buffer-Local}.
@@ -136,217 +111,175 @@ not exactly a hook, but does a similar job.
136@item command-line-functions 111@item command-line-functions
137@xref{Command-Line Arguments}. 112@xref{Command-Line Arguments}.
138 113
139@item comment-indent-function 114@item delayed-warnings-hook
140@xref{Options for Comments,, Options Controlling Comments, emacs, the 115@vindex delayed-warnings-hook
141GNU Emacs Manual}. 116The command loop runs this soon after @code{post-command-hook} (q.v.).
142
143@item compilation-finish-functions
144Functions to call when a compilation process finishes.
145
146@item custom-define-hook
147Hook called after defining each customize option.
148
149@item deactivate-mark-hook
150@xref{The Mark}.
151 117
152@item delete-frame-functions 118@item delete-frame-functions
153Functions to call when Emacs deletes a frame. @xref{Deleting Frames}. 119@xref{Deleting Frames}.
154 120
155@item delete-terminal-functions 121@item delete-terminal-functions
156Functions to call when Emacs deletes a terminal. @xref{Multiple 122@xref{Multiple Terminals}.
157Terminals}.
158
159@item desktop-after-read-hook
160Normal hook run after a successful @code{desktop-read}. May be used
161to show a buffer list. @xref{Saving Emacs Sessions,, Saving Emacs
162Sessions, emacs, the GNU Emacs Manual}.
163
164@item desktop-no-desktop-file-hook
165Normal hook run when @code{desktop-read} can't find a desktop file.
166May be used to show a dired buffer. @xref{Saving Emacs Sessions,,
167Saving Emacs Sessions, emacs, the GNU Emacs Manual}.
168
169@item desktop-save-hook
170Normal hook run before the desktop is saved in a desktop file. This
171is useful for truncating history lists, for example. @xref{Saving
172Emacs Sessions,, Saving Emacs Sessions, emacs, the GNU Emacs Manual}.
173
174@item diary-hook
175List of functions called after the display of the diary. Can be used
176for appointment notification.
177
178@item diary-list-entries-hook
179@iftex
180@inforef{Fancy Diary Display,, emacs-xtra}.
181@end iftex
182@ifnottex
183@xref{Fancy Diary Display,,, emacs}.
184@end ifnottex
185
186@item diary-mark-entries-hook
187@iftex
188@inforef{Fancy Diary Display,, emacs-xtra}.
189@end iftex
190@ifnottex
191@xref{Fancy Diary Display,,, emacs}.
192@end ifnottex
193
194@item diary-nongregorian-listing-hook
195@iftex
196@inforef{Non-Gregorian Diary,, emacs-xtra}.
197@end iftex
198@ifnottex
199@xref{Non-Gregorian Diary,,, emacs}.
200@end ifnottex
201
202@item diary-nongregorian-marking-hook
203@iftex
204@inforef{Non-Gregorian Diary,, emacs-xtra}.
205@end iftex
206@ifnottex
207@xref{Non-Gregorian Diary,,, emacs}.
208@end ifnottex
209
210@item diary-print-entries-hook
211@iftex
212@inforef{Diary Display,, emacs-xtra}.
213@end iftex
214@ifnottex
215@xref{Diary Display,,, emacs}.
216@end ifnottex
217 123
124@ignore
218@item disabled-command-function 125@item disabled-command-function
219@xref{Disabling Commands}. 126@xref{Disabling Commands}.
127@end ignore
128
129@item display-buffer-function
130@itemx pop-up-frame-function
131@itemx special-display-function
132@itemx split-window-preferred-function
133@xref{Choosing Window Options}.
220 134
221@item echo-area-clear-hook 135@item echo-area-clear-hook
222@xref{Echo Area Customization}. 136@xref{Echo Area Customization}.
223 137
224@item emacs-startup-hook
225@xref{Init File}.
226
227@item find-file-hook 138@item find-file-hook
139@itemx find-file-not-found-functions
228@xref{Visiting Functions}. 140@xref{Visiting Functions}.
229 141
230@item find-file-not-found-functions 142@item font-lock-extend-after-change-region-function
231@xref{Visiting Functions}. 143@xref{Region to Refontify}.
232
233@item first-change-hook
234@xref{Change Hooks}.
235 144
236@item font-lock-beginning-of-syntax-function 145@item font-lock-extend-region-functions
237@xref{Syntactic Font Lock}. 146@xref{Multiline Font Lock}.
238 147
239@item font-lock-fontify-buffer-function 148@item font-lock-fontify-buffer-function
149@itemx font-lock-fontify-region-function
150@itemx font-lock-mark-block-function
151@itemx font-lock-unfontify-buffer-function
152@itemx font-lock-unfontify-region-function
240@xref{Other Font Lock Variables}. 153@xref{Other Font Lock Variables}.
241 154
242@item font-lock-fontify-region-function 155@item fontification-functions
243@xref{Other Font Lock Variables}. 156@xref{Auto Faces,, Automatic Face Assignment}.
244
245@item font-lock-mark-block-function
246@xref{Other Font Lock Variables}.
247
248@item font-lock-syntactic-face-function
249@xref{Syntactic Font Lock}.
250
251@item font-lock-unfontify-buffer-function
252@xref{Other Font Lock Variables}.
253
254@item hack-local-variables-hook
255@xref{File Local Variables}.
256
257@item font-lock-unfontify-region-function
258@xref{Other Font Lock Variables}.
259 157
260@item kbd-macro-termination-hook 158@item frame-auto-hide-function
261@xref{Keyboard Macros}. 159@xref{Quitting Windows}.
262 160
263@item kill-buffer-hook 161@item kill-buffer-hook
264@xref{Killing Buffers}. 162@itemx kill-buffer-query-functions
265
266@item kill-buffer-query-functions
267@xref{Killing Buffers}. 163@xref{Killing Buffers}.
268 164
269@item kill-emacs-hook 165@item kill-emacs-hook
166@itemx kill-emacs-query-functions
270@xref{Killing Emacs}. 167@xref{Killing Emacs}.
271 168
272@item kill-emacs-query-functions
273@xref{Killing Emacs}.
274
275@item lisp-indent-function
276
277@item mail-setup-hook
278@xref{Mail Misc,, Mail Miscellany, emacs, the GNU Emacs Manual}.
279
280@item menu-bar-update-hook 169@item menu-bar-update-hook
281@xref{Menu Bar}. 170@xref{Menu Bar}.
282 171
283@item minibuffer-setup-hook 172@item minibuffer-setup-hook
173@itemx minibuffer-exit-hook
284@xref{Minibuffer Misc}. 174@xref{Minibuffer Misc}.
285 175
286@item minibuffer-exit-hook 176@item mouse-leave-buffer-hook
287@xref{Minibuffer Misc}. 177@vindex mouse-leave-buffer-hook
178Hook run when about to switch windows with a mouse command.
288 179
289@item mouse-position-function 180@item mouse-position-function
290@xref{Mouse Position}. 181@xref{Mouse Position}.
291 182
292@item occur-hook
293
294@item post-command-hook 183@item post-command-hook
184@itemx pre-command-hook
295@xref{Command Overview}. 185@xref{Command Overview}.
296 186
187@item post-gc-hook
188@xref{Garbage Collection}.
189
297@item post-self-insert-hook 190@item post-self-insert-hook
298@xref{Keymaps and Minor Modes}. 191@xref{Keymaps and Minor Modes}.
299 192
300@item pre-command-hook 193@ignore
301@xref{Command Overview}.
302
303@item prog-mode-hook 194@item prog-mode-hook
195@itemx special-mode-hook
196@vindex special-mode-hook
304@xref{Basic Major Modes}. 197@xref{Basic Major Modes}.
305 198@end ignore
306@item resume-tty-functions
307@xref{Suspending Emacs}.
308
309@item scheme-indent-function
310 199
311@item suspend-hook 200@item suspend-hook
201@itemx suspend-resume-hook
202@itemx suspend-tty-functions
203@itemx resume-tty-functions
312@xref{Suspending Emacs}. 204@xref{Suspending Emacs}.
313 205
314@item suspend-resume-hook 206@item syntax-begin-function
315@xref{Suspending Emacs}. 207@itemx syntax-propertize-extend-region-functions
316 208@itemx syntax-propertize-function
317@item suspend-tty-functions 209@itemx font-lock-syntactic-face-function
318@xref{Suspending Emacs}. 210@xref{Syntactic Font Lock}. @xref{Syntax Properties}.
319 211
320@item temp-buffer-setup-hook 212@item temp-buffer-setup-hook
321@xref{Temporary Displays}. 213@itemx temp-buffer-show-function
322 214@itemx temp-buffer-show-hook
323@item temp-buffer-show-function
324@xref{Temporary Displays}.
325
326@item temp-buffer-show-hook
327@xref{Temporary Displays}. 215@xref{Temporary Displays}.
328 216
329@item term-setup-hook 217@item term-setup-hook
330@xref{Terminal-Specific}. 218@xref{Terminal-Specific}.
331 219
332@item window-configuration-change-hook 220@item window-configuration-change-hook
333@xref{Window Hooks}. 221@itemx window-scroll-functions
334 222@itemx window-size-change-functions
335@item window-scroll-functions
336@xref{Window Hooks}. 223@xref{Window Hooks}.
337 224
338@item window-setup-hook 225@item window-setup-hook
339@xref{Window Systems}. 226@xref{Window Systems}.
340 227
341@item window-size-change-functions 228@item window-text-change-functions
342@xref{Window Hooks}. 229@vindex window-text-change-functions
343 230Functions to call in redisplay when text in the window might change.
344@item write-contents-functions
345@xref{Saving Buffers}.
346
347@item write-file-functions
348@xref{Saving Buffers}.
349 231
350@item write-region-annotate-functions
351@xref{Format Conversion}.
352@end table 232@end table
233
234@ignore
235Some -hook, -function, -functions from preloaded Lisp or C files that
236I thought did not need to be mentioned here:
237
238Lisp:
239after-load-functions
240auto-coding-functions
241choose-completion-string-functions
242completing-read-function
243completion-annotate-function
244completion-at-point-functions
245completion-in-region-functions
246completion-list-insert-choice-function
247describe-current-input-method-function
248filter-buffer-substring-functions
249font-lock-function
250inactivate-current-input-method-function
251menu-bar-select-buffer-function
252read-file-name-function
253replace-re-search-function
254replace-search-function
255yank-undo-function
256
257C hooks:
258kbd-macro-termination-hook
259signal-hook-function
260
261C functions:
262redisplay-end-trigger-functions
263x-lost-selection-functions
264x-sent-selection-functions
265
266C function:
267auto-composition-function
268auto-fill-function
269command-error-function
270compose-chars-after-function
271composition-function-table
272deferred-action-function
273input-method-function
274load-read-function
275load-source-file-function
276macro-declaration-function
277read-buffer-function
278ring-bell-function
279select-safe-coding-system-function
280set-auto-coding-function
281show-help-function
282signal-hook-function
283undo-outer-limit-function
284
285@end ignore
diff --git a/doc/lispref/internals.texi b/doc/lispref/internals.texi
index df6193cf13b..83bbc140b13 100644
--- a/doc/lispref/internals.texi
+++ b/doc/lispref/internals.texi
@@ -1,6 +1,6 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1993, 1998-1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1993, 1998-1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/internals 5@setfilename ../../info/internals
6@node GNU Emacs Internals, Standard Errors, Tips, Top 6@node GNU Emacs Internals, Standard Errors, Tips, Top
@@ -21,7 +21,7 @@ internal aspects of GNU Emacs that may be of interest to C programmers.
21@end menu 21@end menu
22 22
23@node Building Emacs 23@node Building Emacs
24@appendixsec Building Emacs 24@section Building Emacs
25@cindex building Emacs 25@cindex building Emacs
26@pindex temacs 26@pindex temacs
27 27
@@ -44,7 +44,7 @@ environment, resulting in an Emacs that is still impure but no longer
44bare. 44bare.
45 45
46@cindex dumping Emacs 46@cindex dumping Emacs
47 It takes a substantial time to load the standard Lisp files. Luckily, 47 It takes some time to load the standard Lisp files. Luckily,
48you don't have to do this each time you run Emacs; @file{temacs} can 48you don't have to do this each time you run Emacs; @file{temacs} can
49dump out an executable program called @file{emacs} that has these files 49dump out an executable program called @file{emacs} that has these files
50preloaded. @file{emacs} starts more quickly because it does not need to 50preloaded. @file{emacs} starts more quickly because it does not need to
@@ -61,23 +61,22 @@ The argument @samp{dump} tells @file{loadup.el} to dump a new executable
61named @file{emacs}. The variable @code{preloaded-file-list} stores a 61named @file{emacs}. The variable @code{preloaded-file-list} stores a
62list of the Lisp files that were dumped with the @file{emacs} executable. 62list of the Lisp files that were dumped with the @file{emacs} executable.
63 63
64 Some operating systems don't support dumping. On those systems, you 64 If you port Emacs to a new operating system, and are not able to
65must start Emacs with the @samp{temacs -l loadup} command each time you 65implement dumping, then Emacs must load @file{loadup.el} each time it
66use it. This takes a substantial time, but since you need to start 66starts.
67Emacs once a day at most---or once a week if you never log out---the
68extra time is not too severe a problem.
69 67
70@cindex @file{site-load.el} 68@cindex @file{site-load.el}
71
72 You can specify additional files to preload by writing a library named 69 You can specify additional files to preload by writing a library named
73@file{site-load.el} that loads them. You may need to add a definition 70@file{site-load.el} that loads them. You may need to rebuild Emacs
71with an added definition
74 72
75@example 73@example
76#define SITELOAD_PURESIZE_EXTRA @var{n} 74#define SITELOAD_PURESIZE_EXTRA @var{n}
77@end example 75@end example
78 76
79@noindent 77@noindent
80to make @var{n} added bytes of pure space to hold the additional files. 78to make @var{n} added bytes of pure space to hold the additional files;
79see @file{src/puresize.h}.
81(Try adding increments of 20000 until it is big enough.) However, the 80(Try adding increments of 20000 until it is big enough.) However, the
82advantage of preloading additional files decreases as machines get 81advantage of preloading additional files decreases as machines get
83faster. On modern machines, it is usually not advisable. 82faster. On modern machines, it is usually not advisable.
@@ -108,11 +107,11 @@ Load the files with @file{site-init.el}, then copy the files into the
108installation directory for Lisp files when you install Emacs. 107installation directory for Lisp files when you install Emacs.
109 108
110@item 109@item
111Specify a non-@code{nil} value for 110Specify a @code{nil} value for @code{byte-compile-dynamic-docstrings}
112@code{byte-compile-dynamic-docstrings} as a local variable in each of these 111as a local variable in each of these files, and load them with either
113files, and load them with either @file{site-load.el} or 112@file{site-load.el} or @file{site-init.el}. (This method has the
114@file{site-init.el}. (This method has the drawback that the 113drawback that the documentation strings take up space in Emacs all the
115documentation strings take up space in Emacs all the time.) 114time.)
116@end itemize 115@end itemize
117 116
118 It is not advisable to put anything in @file{site-load.el} or 117 It is not advisable to put anything in @file{site-load.el} or
@@ -121,17 +120,27 @@ expect in an ordinary unmodified Emacs. If you feel you must override
121normal features for your site, do it with @file{default.el}, so that 120normal features for your site, do it with @file{default.el}, so that
122users can override your changes if they wish. @xref{Startup Summary}. 121users can override your changes if they wish. @xref{Startup Summary}.
123 122
124 In a package that can be preloaded, it is sometimes useful to 123 In a package that can be preloaded, it is sometimes necessary (or
125specify a computation to be done when Emacs subsequently starts up. 124useful) to delay certain evaluations until Emacs subsequently starts
126For this, use @code{eval-at-startup}: 125up. The vast majority of such cases relate to the values of
126customizable variables. For example, @code{tutorial-directory} is a
127variable defined in @file{startup.el}, which is preloaded. The default
128value is set based on @code{data-directory}. The variable needs to
129access the value of @code{data-directory} when Emacs starts, not when
130it is dumped, because the Emacs executable has probably been installed
131in a different location since it was dumped.
132
133@defun custom-initialize-delay symbol value
134This function delays the initialization of @var{symbol} to the next
135Emacs start. You normally use this function by specifying it as the
136@code{:initialize} property of a customizable variable. (The argument
137@var{value} is unused, and is provided only for compatiblity with the
138form Custom expects.)
139@end defun
127 140
128@defmac eval-at-startup body@dots{} 141In the unlikely event that you need a more general functionality than
129This evaluates the @var{body} forms, either immediately if running in 142@code{custom-initialize-delay} provides, you can use
130an Emacs that has already started up, or later when Emacs does start 143@code{before-init-hook} (@pxref{Startup Summary}).
131up. Since the value of the @var{body} forms is not necessarily
132available when the @code{eval-at-startup} form is run, that form
133always returns @code{nil}.
134@end defmac
135 144
136@defun dump-emacs to-file from-file 145@defun dump-emacs to-file from-file
137@cindex unexec 146@cindex unexec
@@ -144,15 +153,15 @@ you must run Emacs with @samp{-batch}.
144@end defun 153@end defun
145 154
146@node Pure Storage 155@node Pure Storage
147@appendixsec Pure Storage 156@section Pure Storage
148@cindex pure storage 157@cindex pure storage
149 158
150 Emacs Lisp uses two kinds of storage for user-created Lisp objects: 159 Emacs Lisp uses two kinds of storage for user-created Lisp objects:
151@dfn{normal storage} and @dfn{pure storage}. Normal storage is where 160@dfn{normal storage} and @dfn{pure storage}. Normal storage is where
152all the new data created during an Emacs session are kept; see the 161all the new data created during an Emacs session are kept
153following section for information on normal storage. Pure storage is 162(@pxref{Garbage Collection}). Pure storage is used for certain data
154used for certain data in the preloaded standard Lisp files---data that 163in the preloaded standard Lisp files---data that should never change
155should never change during actual use of Emacs. 164during actual use of Emacs.
156 165
157 Pure storage is allocated only while @file{temacs} is loading the 166 Pure storage is allocated only while @file{temacs} is loading the
158standard preloaded Lisp libraries. In the file @file{emacs}, it is 167standard preloaded Lisp libraries. In the file @file{emacs}, it is
@@ -161,14 +170,14 @@ the memory space can be shared by all the Emacs jobs running on the
161machine at once. Pure storage is not expandable; a fixed amount is 170machine at once. Pure storage is not expandable; a fixed amount is
162allocated when Emacs is compiled, and if that is not sufficient for 171allocated when Emacs is compiled, and if that is not sufficient for
163the preloaded libraries, @file{temacs} allocates dynamic memory for 172the preloaded libraries, @file{temacs} allocates dynamic memory for
164the part that didn't fit. If that happens, you should increase the 173the part that didn't fit. The resulting image will work, but garbage
165compilation parameter @code{PURESIZE} in the file 174collection (@pxref{Garbage Collection}) is disabled in this situation,
166@file{src/puresize.h} and rebuild Emacs, even though the resulting 175causing a memory leak. Such an overflow normally won't happen unless
167image will work: garbage collection is disabled in this situation, 176you try to preload additional libraries or add features to the
168causing a memory leak. Such an overflow normally won't happen unless you 177standard ones. Emacs will display a warning about the overflow when
169try to preload additional libraries or add features to the standard 178it starts. If this happens, you should increase the compilation
170ones. Emacs will display a warning about the overflow when it 179parameter @code{SYSTEM_PURESIZE_EXTRA} in the file
171starts. 180@file{src/puresize.h} and rebuild Emacs.
172 181
173@defun purecopy object 182@defun purecopy object
174This function makes a copy in pure storage of @var{object}, and returns 183This function makes a copy in pure storage of @var{object}, and returns
@@ -179,8 +188,7 @@ not make copies of other objects such as symbols, but just returns
179them unchanged. It signals an error if asked to copy markers. 188them unchanged. It signals an error if asked to copy markers.
180 189
181This function is a no-op except while Emacs is being built and dumped; 190This function is a no-op except while Emacs is being built and dumped;
182it is usually called only in the file @file{emacs/lisp/loaddefs.el}, but 191it is usually called only in preloaded Lisp files.
183a few packages call it just in case you decide to preload them.
184@end defun 192@end defun
185 193
186@defvar pure-bytes-used 194@defvar pure-bytes-used
@@ -205,7 +213,7 @@ You should not change this flag in a running Emacs.
205@end defvar 213@end defvar
206 214
207@node Garbage Collection 215@node Garbage Collection
208@appendixsec Garbage Collection 216@section Garbage Collection
209@cindex garbage collection 217@cindex garbage collection
210 218
211@cindex memory allocation 219@cindex memory allocation
@@ -354,7 +362,7 @@ object consists of a header and the storage for the string text
354itself; the latter is only allocated when the string is created.) 362itself; the latter is only allocated when the string is created.)
355@end table 363@end table
356 364
357If there was overflow in pure space (see the previous section), 365If there was overflow in pure space (@pxref{Pure Storage}),
358@code{garbage-collect} returns @code{nil}, because a real garbage 366@code{garbage-collect} returns @code{nil}, because a real garbage
359collection can not be done in this situation. 367collection can not be done in this situation.
360@end deffn 368@end deffn
@@ -362,7 +370,7 @@ collection can not be done in this situation.
362@defopt garbage-collection-messages 370@defopt garbage-collection-messages
363If this variable is non-@code{nil}, Emacs displays a message at the 371If this variable is non-@code{nil}, Emacs displays a message at the
364beginning and end of garbage collection. The default value is 372beginning and end of garbage collection. The default value is
365@code{nil}, meaning there are no such messages. 373@code{nil}.
366@end defopt 374@end defopt
367 375
368@defvar post-gc-hook 376@defvar post-gc-hook
@@ -381,7 +389,7 @@ that the subsequent garbage collection does not happen immediately when
381the threshold is exhausted, but only the next time the Lisp evaluator is 389the threshold is exhausted, but only the next time the Lisp evaluator is
382called. 390called.
383 391
384The initial threshold value is 400,000. If you specify a larger 392The initial threshold value is 800,000. If you specify a larger
385value, garbage collection will happen less often. This reduces the 393value, garbage collection will happen less often. This reduces the
386amount of time spent garbage collecting, but increases total memory use. 394amount of time spent garbage collecting, but increases total memory use.
387You may want to do this when running a program that creates lots of 395You may want to do this when running a program that creates lots of
@@ -448,7 +456,7 @@ point number.
448 These functions and variables give information about the total amount 456 These functions and variables give information about the total amount
449of memory allocation that Emacs has done, broken down by data type. 457of memory allocation that Emacs has done, broken down by data type.
450Note the difference between these and the values returned by 458Note the difference between these and the values returned by
451@code{(garbage-collect)}; those count objects that currently exist, but 459@code{garbage-collect}; those count objects that currently exist, but
452these count the number or size of all allocations, including those for 460these count the number or size of all allocations, including those for
453objects that have since been freed. 461objects that have since been freed.
454 462
@@ -494,7 +502,7 @@ Emacs session.
494@end defvar 502@end defvar
495 503
496@node Writing Emacs Primitives 504@node Writing Emacs Primitives
497@appendixsec Writing Emacs Primitives 505@section Writing Emacs Primitives
498@cindex primitive function internals 506@cindex primitive function internals
499@cindex writing Emacs primitives 507@cindex writing Emacs primitives
500 508
@@ -512,7 +520,7 @@ appearance.)
512@group 520@group
513DEFUN ("or", For, Sor, 0, UNEVALLED, 0, 521DEFUN ("or", For, Sor, 0, UNEVALLED, 0,
514 doc: /* Eval args until one of them yields non-nil, then return that 522 doc: /* Eval args until one of them yields non-nil, then return that
515value. The remaining args are not evalled at all. 523value. The remaining args are not evalled at all.
516If all args return nil, return nil. 524If all args return nil, return nil.
517@end group 525@end group
518@group 526@group
@@ -530,7 +538,7 @@ usage: (or CONDITIONS ...) */)
530@group 538@group
531 while (CONSP (args)) 539 while (CONSP (args))
532 @{ 540 @{
533 val = Feval (XCAR (args)); 541 val = eval_sub (XCAR (args));
534 if (!NILP (val)) 542 if (!NILP (val))
535 break; 543 break;
536 args = XCDR (args); 544 args = XCDR (args);
@@ -595,6 +603,8 @@ the argument of @code{interactive} in a Lisp function. In the case of
595called interactively. A value of @code{""} indicates a function that 603called interactively. A value of @code{""} indicates a function that
596should receive no arguments when called interactively. If the value 604should receive no arguments when called interactively. If the value
597begins with a @samp{(}, the string is evaluated as a Lisp form. 605begins with a @samp{(}, the string is evaluated as a Lisp form.
606For examples of the last two forms, see @code{widen} and
607@code{narrow-to-region} in @file{editfns.c}.
598 608
599@item doc 609@item doc
600This is the documentation string. It uses C comment syntax rather 610This is the documentation string. It uses C comment syntax rather
@@ -633,19 +643,22 @@ have types @code{int} and @w{@code{Lisp_Object *}}.
633``protect'' a variable from garbage collection---to inform the garbage 643``protect'' a variable from garbage collection---to inform the garbage
634collector that it must look in that variable and regard its contents 644collector that it must look in that variable and regard its contents
635as an accessible object. GC protection is necessary whenever you call 645as an accessible object. GC protection is necessary whenever you call
636@code{Feval} or anything that can directly or indirectly call 646@code{eval_sub} (or @code{Feval}) either directly or indirectly.
637@code{Feval}. At such a time, any Lisp object that this function may 647At such a time, any Lisp object that this function may refer to again
638refer to again must be protected somehow. 648must be protected somehow.
639 649
640 It suffices to ensure that at least one pointer to each object is 650 It suffices to ensure that at least one pointer to each object is
641GC-protected; that way, the object cannot be recycled, so all pointers 651GC-protected; that way, the object cannot be recycled, so all pointers
642to it remain valid. Thus, a particular local variable can do without 652to it remain valid. Thus, a particular local variable can do without
643protection if it is certain that the object it points to will be 653protection if it is certain that the object it points to will be
644preserved by some other pointer (such as another local variable which 654preserved by some other pointer (such as another local variable that
645has a @code{GCPRO})@footnote{Formerly, strings were a special 655has a @code{GCPRO}).
646exception; in older Emacs versions, every local variable that might 656@ignore
647point to a string needed a @code{GCPRO}.}. Otherwise, the local 657@footnote{Formerly, strings were a special exception; in older Emacs
648variable needs a @code{GCPRO}. 658versions, every local variable that might point to a string needed a
659@code{GCPRO}.}.
660@end ignore
661Otherwise, the local variable needs a @code{GCPRO}.
649 662
650 The macro @code{GCPRO1} protects just one local variable. If you 663 The macro @code{GCPRO1} protects just one local variable. If you
651want to protect two variables, use @code{GCPRO2} instead; repeating 664want to protect two variables, use @code{GCPRO2} instead; repeating
@@ -674,6 +687,7 @@ with initializers are allocated in an area of memory that becomes
674read-only (on certain operating systems) as a result of dumping Emacs. 687read-only (on certain operating systems) as a result of dumping Emacs.
675@xref{Pure Storage}. 688@xref{Pure Storage}.
676 689
690@c FIXME is this still true? I don't think so...
677 Do not use static variables within functions---place all static 691 Do not use static variables within functions---place all static
678variables at top level in the file. This is necessary because Emacs on 692variables at top level in the file. This is necessary because Emacs on
679some operating systems defines the keyword @code{static} as a null 693some operating systems defines the keyword @code{static} as a null
@@ -688,12 +702,11 @@ store a suitable subr object in its function cell. The code looks like
688this: 702this:
689 703
690@example 704@example
691defsubr (&@var{subr-structure-name}); 705defsubr (&@var{sname});
692@end example 706@end example
693 707
694@noindent 708@noindent
695Here @var{subr-structure-name} is the name you used as the third 709Here @var{sname} is the name you used as the third argument to @code{DEFUN}.
696argument to @code{DEFUN}.
697 710
698 If you add a new primitive to a file that already has Lisp primitives 711 If you add a new primitive to a file that already has Lisp primitives
699defined in it, find the function (near the end of the file) named 712defined in it, find the function (near the end of the file) named
@@ -718,6 +731,11 @@ with a value that is either @code{t} or @code{nil}. Note that variables
718defined with @code{DEFVAR_BOOL} are automatically added to the list 731defined with @code{DEFVAR_BOOL} are automatically added to the list
719@code{byte-boolean-vars} used by the byte compiler. 732@code{byte-boolean-vars} used by the byte compiler.
720 733
734@cindex defining customization variables in C
735 If you want to make a Lisp variables that is defined in C behave
736like one declared with @code{defcustom}, add an appropriate entry to
737@file{cus-start.el}.
738
721@cindex @code{staticpro}, protection from GC 739@cindex @code{staticpro}, protection from GC
722 If you define a file-scope C variable of type @code{Lisp_Object}, 740 If you define a file-scope C variable of type @code{Lisp_Object},
723you must protect it from garbage-collection by calling @code{staticpro} 741you must protect it from garbage-collection by calling @code{staticpro}
@@ -734,48 +752,53 @@ of macros and functions to manipulate Lisp objects.
734@smallexample 752@smallexample
735@group 753@group
736DEFUN ("coordinates-in-window-p", Fcoordinates_in_window_p, 754DEFUN ("coordinates-in-window-p", Fcoordinates_in_window_p,
737 Scoordinates_in_window_p, 2, 2, 755 Scoordinates_in_window_p, 2, 2, 0,
738 "xSpecify coordinate pair: \nXExpression which evals to window: ", 756 doc: /* Return non-nil if COORDINATES are in WINDOW.
739 "Return non-nil if COORDINATES is in WINDOW.\n\ 757 ...
740COORDINATES is a cons of the form (X . Y), X and Y being distances\n\
741...
742@end group 758@end group
743@group 759@group
744If they are on the border between WINDOW and its right sibling,\n\ 760 or `right-margin' is returned. */)
745 `vertical-line' is returned.") 761 (register Lisp_Object coordinates, Lisp_Object window)
746 (coordinates, window)
747 register Lisp_Object coordinates, window;
748@{ 762@{
763 struct window *w;
764 struct frame *f;
749 int x, y; 765 int x, y;
766 Lisp_Object lx, ly;
750@end group 767@end group
751 768
752@group 769@group
753 CHECK_LIVE_WINDOW (window, 0); 770 CHECK_LIVE_WINDOW (window);
754 CHECK_CONS (coordinates, 1); 771 w = XWINDOW (window);
755 x = XINT (Fcar (coordinates)); 772 f = XFRAME (w->frame);
756 y = XINT (Fcdr (coordinates)); 773 CHECK_CONS (coordinates);
774 lx = Fcar (coordinates);
775 ly = Fcdr (coordinates);
776 CHECK_NUMBER_OR_FLOAT (lx);
777 CHECK_NUMBER_OR_FLOAT (ly);
778 x = FRAME_PIXEL_X_FROM_CANON_X (f, lx) + FRAME_INTERNAL_BORDER_WIDTH(f);
779 y = FRAME_PIXEL_Y_FROM_CANON_Y (f, ly) + FRAME_INTERNAL_BORDER_WIDTH(f);
757@end group 780@end group
758 781
759@group 782@group
760 switch (coordinates_in_window (XWINDOW (window), &x, &y)) 783 switch (coordinates_in_window (w, x, y))
761 @{ 784 @{
762 case 0: /* NOT in window at all. */ 785 case ON_NOTHING: /* NOT in window at all. */
763 return Qnil; 786 return Qnil;
764@end group 787@end group
765 788
766@group 789 ...
767 case 1: /* In text part of window. */
768 return Fcons (make_number (x), make_number (y));
769@end group
770 790
771@group 791@group
772 case 2: /* In mode line of window. */ 792 case ON_MODE_LINE: /* In mode line of window. */
773 return Qmode_line; 793 return Qmode_line;
774@end group 794@end group
775 795
796 ...
797
776@group 798@group
777 case 3: /* On right border of window. */ 799 case ON_SCROLL_BAR: /* On scroll-bar of window. */
778 return Qvertical_line; 800 /* Historically we are supposed to return nil in this case. */
801 return Qnil;
779@end group 802@end group
780 803
781@group 804@group
@@ -806,14 +829,15 @@ number of arguments. They work by calling @code{Ffuncall}.
806functions. 829functions.
807 830
808 If you define a function which is side-effect free, update the code 831 If you define a function which is side-effect free, update the code
809in @file{byte-opt.el} which binds @code{side-effect-free-fns} and 832in @file{byte-opt.el} that binds @code{side-effect-free-fns} and
810@code{side-effect-and-error-free-fns} so that the compiler optimizer 833@code{side-effect-and-error-free-fns} so that the compiler optimizer
811knows about it. 834knows about it.
812 835
813@node Object Internals 836@node Object Internals
814@appendixsec Object Internals 837@section Object Internals
815@cindex object internals 838@cindex object internals
816 839
840@c FIXME Is this still true? Does --with-wide-int affect anything?
817 GNU Emacs Lisp manipulates many different types of data. The actual 841 GNU Emacs Lisp manipulates many different types of data. The actual
818data are stored in a heap and the only access that programs have to it 842data are stored in a heap and the only access that programs have to it
819is through pointers. Each pointer is 32 bits wide on 32-bit machines, 843is through pointers. Each pointer is 32 bits wide on 32-bit machines,
@@ -838,15 +862,15 @@ explicitly using a suitable predicate (@pxref{Type Predicates}).
838@end menu 862@end menu
839 863
840@node Buffer Internals 864@node Buffer Internals
841@appendixsubsec Buffer Internals 865@subsection Buffer Internals
842@cindex internals, of buffer 866@cindex internals, of buffer
843@cindex buffer internals 867@cindex buffer internals
844 868
845 Two structures are used to represent buffers in C. The 869 Two structures (see @file{buffer.h}) are used to represent buffers
846@code{buffer_text} structure contains fields describing the text of a 870in C. The @code{buffer_text} structure contains fields describing the
847buffer; the @code{buffer} structure holds other fields. In the case 871text of a buffer; the @code{buffer} structure holds other fields. In
848of indirect buffers, two or more @code{buffer} structures reference 872the case of indirect buffers, two or more @code{buffer} structures
849the same @code{buffer_text} structure. 873reference the same @code{buffer_text} structure.
850 874
851Here are some of the fields in @code{struct buffer_text}: 875Here are some of the fields in @code{struct buffer_text}:
852 876
@@ -904,8 +928,9 @@ The interval tree which records the text properties of this buffer.
904Some of the fields of @code{struct buffer} are: 928Some of the fields of @code{struct buffer} are:
905 929
906@table @code 930@table @code
907@item next 931@item header
908Points to the next buffer, in the chain of all buffers (including 932A @code{struct vectorlike_header} structure where @code{header.next}
933points to the next buffer, in the chain of all buffers (including
909killed buffers). This chain is used only for garbage collection, in 934killed buffers). This chain is used only for garbage collection, in
910order to collect killed buffers properly. Note that vectors, and most 935order to collect killed buffers properly. Note that vectors, and most
911kinds of objects allocated as vectors, are all on one chain, but 936kinds of objects allocated as vectors, are all on one chain, but
@@ -979,6 +1004,8 @@ after the current overlay center. @xref{Managing Overlays}.
979and @code{overlays_after} is sorted in order of increasing beginning 1004and @code{overlays_after} is sorted in order of increasing beginning
980position. 1005position.
981 1006
1007@c FIXME? the following are now all Lisp_Object BUFFER_INTERNAL_FIELD (foo).
1008
982@item name 1009@item name
983A Lisp string that names the buffer. It is guaranteed to be unique. 1010A Lisp string that names the buffer. It is guaranteed to be unique.
984@xref{Buffer Names}. 1011@xref{Buffer Names}.
@@ -1001,6 +1028,7 @@ the value of the buffer-local variable @code{buffer-file-name}
1001@item undo_list 1028@item undo_list
1002@itemx backed_up 1029@itemx backed_up
1003@itemx auto_save_file_name 1030@itemx auto_save_file_name
1031@itemx auto_save_file_format
1004@itemx read_only 1032@itemx read_only
1005@itemx file_format 1033@itemx file_format
1006@itemx file_truename 1034@itemx file_truename
@@ -1011,8 +1039,7 @@ These fields store the values of Lisp variables that are automatically
1011buffer-local (@pxref{Buffer-Local Variables}), whose corresponding 1039buffer-local (@pxref{Buffer-Local Variables}), whose corresponding
1012variable names have the additional prefix @code{buffer-} and have 1040variable names have the additional prefix @code{buffer-} and have
1013underscores replaced with dashes. For instance, @code{undo_list} 1041underscores replaced with dashes. For instance, @code{undo_list}
1014stores the value of @code{buffer-undo-list}. @xref{Standard 1042stores the value of @code{buffer-undo-list}.
1015Buffer-Local Variables}.
1016 1043
1017@item mark 1044@item mark
1018The mark for the buffer. The mark is a marker, hence it is also 1045The mark for the buffer. The mark is a marker, hence it is also
@@ -1068,15 +1095,15 @@ when the buffer is not current.
1068@itemx truncate_lines 1095@itemx truncate_lines
1069@itemx word_wrap 1096@itemx word_wrap
1070@itemx ctl_arrow 1097@itemx ctl_arrow
1098@itemx bidi_display_reordering
1099@itemx bidi_paragraph_direction
1071@itemx selective_display 1100@itemx selective_display
1072@itemx selective_display_ellipses 1101@itemx selective_display_ellipses
1073@itemx overwrite_mode 1102@itemx overwrite_mode
1074@itemx abbrev_mode 1103@itemx abbrev_mode
1075@itemx display_table
1076@itemx mark_active 1104@itemx mark_active
1077@itemx enable_multibyte_characters 1105@itemx enable_multibyte_characters
1078@itemx buffer_file_coding_system 1106@itemx buffer_file_coding_system
1079@itemx auto_save_file_format
1080@itemx cache_long_line_scans 1107@itemx cache_long_line_scans
1081@itemx point_before_scroll 1108@itemx point_before_scroll
1082@itemx left_fringe_width 1109@itemx left_fringe_width
@@ -1095,7 +1122,6 @@ These fields store the values of Lisp variables that are automatically
1095buffer-local (@pxref{Buffer-Local Variables}), whose corresponding 1122buffer-local (@pxref{Buffer-Local Variables}), whose corresponding
1096variable names have underscores replaced with dashes. For instance, 1123variable names have underscores replaced with dashes. For instance,
1097@code{mode_line_format} stores the value of @code{mode-line-format}. 1124@code{mode_line_format} stores the value of @code{mode-line-format}.
1098@xref{Standard Buffer-Local Variables}.
1099 1125
1100@item last_selected_window 1126@item last_selected_window
1101This is the last window that was selected with this buffer in it, or @code{nil} 1127This is the last window that was selected with this buffer in it, or @code{nil}
@@ -1103,11 +1129,12 @@ if that window no longer displays this buffer.
1103@end table 1129@end table
1104 1130
1105@node Window Internals 1131@node Window Internals
1106@appendixsubsec Window Internals 1132@subsection Window Internals
1107@cindex internals, of window 1133@cindex internals, of window
1108@cindex window internals 1134@cindex window internals
1109 1135
1110 Windows have the following accessible fields: 1136 The fields of a window (for a complete list, see the definition of
1137@code{struct window} in @file{window.h}) include:
1111 1138
1112@table @code 1139@table @code
1113@item frame 1140@item frame
@@ -1131,13 +1158,14 @@ leaves of the tree, which actually display buffers.
1131These fields contain the window's leftmost child and its topmost child 1158These fields contain the window's leftmost child and its topmost child
1132respectively. @code{hchild} is used if the window is subdivided 1159respectively. @code{hchild} is used if the window is subdivided
1133horizontally by child windows, and @code{vchild} if it is subdivided 1160horizontally by child windows, and @code{vchild} if it is subdivided
1134vertically. 1161vertically. In a live window, only one of @code{hchild}, @code{vchild},
1162and @code{buffer} (q.v.) is non-@code{nil}.
1135 1163
1136@item next 1164@item next
1137@itemx prev 1165@itemx prev
1138The next sibling and previous sibling of this window. @code{next} is 1166The next sibling and previous sibling of this window. @code{next} is
1139@code{nil} if the window is the rightmost or bottommost in its group; 1167@code{nil} if the window is the right-most or bottom-most in its group;
1140@code{prev} is @code{nil} if it is the leftmost or topmost in its 1168@code{prev} is @code{nil} if it is the left-most or top-most in its
1141group. 1169group.
1142 1170
1143@item left_col 1171@item left_col
@@ -1208,11 +1236,19 @@ window was last updated.
1208@item vertical_scroll_bar 1236@item vertical_scroll_bar
1209This window's vertical scroll bar. 1237This window's vertical scroll bar.
1210 1238
1211@item left_margin_width 1239@item left_margin_cols
1212@itemx right_margin_width 1240@itemx right_margin_cols
1213The widths of the left and right margins in this window. A value of 1241The widths of the left and right margins in this window. A value of
1214@code{nil} means to use the buffer's value of @code{left-margin-width} 1242@code{nil} means no margin.
1215or @code{right-margin-width}. 1243
1244@item left_fringe_width
1245@itemx right_fringe_width
1246The widths of the left and right fringes in this window. A value of
1247@code{nil} or @code{t} means use the values of the frame.
1248
1249@item fringes_outside_margins
1250A non-@code{nil} value means the fringes outside the display margins;
1251othersize they are between the margin and the text.
1216 1252
1217@item window_end_pos 1253@item window_end_pos
1218This is computed as @code{z} minus the buffer position of the last glyph 1254This is computed as @code{z} minus the buffer position of the last glyph
@@ -1228,7 +1264,7 @@ The window-relative vertical position of the line containing
1228 1264
1229@item window_end_valid 1265@item window_end_valid
1230This field is set to a non-@code{nil} value if @code{window_end_pos} is truly 1266This field is set to a non-@code{nil} value if @code{window_end_pos} is truly
1231valid. This is @code{nil} if nontrivial redisplay is preempted since in that 1267valid. This is @code{nil} if nontrivial redisplay is pre-empted, since in that
1232case the display that @code{window_end_pos} was computed for did not get 1268case the display that @code{window_end_pos} was computed for did not get
1233onto the screen. 1269onto the screen.
1234 1270
@@ -1242,13 +1278,19 @@ The value of @code{cursor} as of the last redisplay that finished.
1242A structure describing where the cursor of this window physically is. 1278A structure describing where the cursor of this window physically is.
1243 1279
1244@item phys_cursor_type 1280@item phys_cursor_type
1245The type of cursor that was last displayed on this window. 1281@c FIXME What is this?
1282@c itemx phys_cursor_ascent
1283@itemx phys_cursor_height
1284@itemx phys_cursor_width
1285The type, height, and width of the cursor that was last displayed on
1286this window.
1246 1287
1247@item phys_cursor_on_p 1288@item phys_cursor_on_p
1248This field is non-zero if the cursor is physically on. 1289This field is non-zero if the cursor is physically on.
1249 1290
1250@item cursor_off_p 1291@item cursor_off_p
1251Non-zero means the cursor in this window is logically on. 1292Non-zero means the cursor in this window is logically off. This is
1293used for blinking the cursor.
1252 1294
1253@item last_cursor_off_p 1295@item last_cursor_off_p
1254This field contains the value of @code{cursor_off_p} as of the time of 1296This field contains the value of @code{cursor_off_p} as of the time of
@@ -1279,7 +1321,8 @@ This is used for displaying the line number of point in the mode line.
1279 1321
1280@item base_line_pos 1322@item base_line_pos
1281The position in the buffer for which the line number is known, or 1323The position in the buffer for which the line number is known, or
1282@code{nil} meaning none is known. 1324@code{nil} meaning none is known. If it is a buffer, don't display
1325the line number as long as the window shows that buffer.
1283 1326
1284@item region_showing 1327@item region_showing
1285If the region (or part of it) is highlighted in this window, this field 1328If the region (or part of it) is highlighted in this window, this field
@@ -1291,18 +1334,17 @@ The column number currently displayed in this window's mode line, or @code{nil}
1291if column numbers are not being displayed. 1334if column numbers are not being displayed.
1292 1335
1293@item current_matrix 1336@item current_matrix
1294A glyph matrix describing the current display of this window. 1337@itemx desired_matrix
1295 1338Glyph matrices describing the current and desired display of this window.
1296@item desired_matrix
1297A glyph matrix describing the desired display of this window.
1298@end table 1339@end table
1299 1340
1300@node Process Internals 1341@node Process Internals
1301@appendixsubsec Process Internals 1342@subsection Process Internals
1302@cindex internals, of process 1343@cindex internals, of process
1303@cindex process internals 1344@cindex process internals
1304 1345
1305 The fields of a process are: 1346 The fields of a process (for a complete list, see the definition of
1347@code{struct Lisp_Process} in @file{process.h}) include:
1306 1348
1307@table @code 1349@table @code
1308@item name 1350@item name
@@ -1314,21 +1356,24 @@ process. For a network or serial process, it is @code{nil} if the
1314process is running or @code{t} if the process is stopped. 1356process is running or @code{t} if the process is stopped.
1315 1357
1316@item filter 1358@item filter
1317A function used to accept output from the process instead of a buffer, 1359If non-@code{nil}, a function used to accept output from the process
1318or @code{nil}. 1360instead of a buffer.
1319 1361
1320@item sentinel 1362@item sentinel
1321A function called whenever the process receives a signal, or @code{nil}. 1363If non-@code{nil}, a function called whenever the state of the process
1364changes.
1322 1365
1323@item buffer 1366@item buffer
1324The associated buffer of the process. 1367The associated buffer of the process.
1325 1368
1326@item pid 1369@item pid
1327An integer, the operating system's process @acronym{ID}. 1370An integer, the operating system's process @acronym{ID}.
1371Pseudo-processes such as network or serial connections use a value of 0.
1328 1372
1329@item childp 1373@item childp
1330A flag, non-@code{nil} if this is really a child process. 1374A flag, @code{t} if this is really a child process. For a network or
1331It is @code{nil} for a network or serial connection. 1375serial connection, it is a plist based on the arguments to
1376@code{make-network-process} or @code{make-serial-process}.
1332 1377
1333@item mark 1378@item mark
1334A marker indicating the position of the end of the last output from this 1379A marker indicating the position of the end of the last output from this
@@ -1339,10 +1384,8 @@ of the buffer.
1339If this is non-zero, killing Emacs while this process is still running 1384If this is non-zero, killing Emacs while this process is still running
1340does not ask for confirmation about killing the process. 1385does not ask for confirmation about killing the process.
1341 1386
1342@item raw_status_low 1387@item raw_status
1343@itemx raw_status_high 1388The raw process status, as returned by the @code{wait} system call.
1344These two fields record 16 bits each of the process status returned by
1345the @code{wait} system call.
1346 1389
1347@item status 1390@item status
1348The process status, as @code{process-status} should return it. 1391The process status, as @code{process-status} should return it.
@@ -1363,11 +1406,6 @@ The file descriptor for input from the process.
1363@item outfd 1406@item outfd
1364The file descriptor for output to the process. 1407The file descriptor for output to the process.
1365 1408
1366@item subtty
1367The file descriptor for the terminal that the subprocess is using. (On
1368some systems, there is no need to record this, so the value is
1369@code{nil}.)
1370
1371@item tty_name 1409@item tty_name
1372The name of the terminal that the subprocess is using, 1410The name of the terminal that the subprocess is using,
1373or @code{nil} if it is using pipes. 1411or @code{nil} if it is using pipes.
@@ -1387,15 +1425,14 @@ Coding-system for encoding the output to this process.
1387@item encoding_buf 1425@item encoding_buf
1388A working buffer for encoding. 1426A working buffer for encoding.
1389 1427
1390@item encoding_carryover
1391Size of carryover in encoding.
1392
1393@item inherit_coding_system_flag 1428@item inherit_coding_system_flag
1394Flag to set @code{coding-system} of the process buffer from the 1429Flag to set @code{coding-system} of the process buffer from the
1395coding system used to decode process output. 1430coding system used to decode process output.
1396 1431
1397@item type 1432@item type
1398Symbol indicating the type of process: @code{real}, @code{network}, 1433Symbol indicating the type of process: @code{real}, @code{network},
1399@code{serial} 1434@code{serial}.
1400 1435
1401@end table 1436@end table
1437
1438@c FIXME Mention src/globals.h somewhere in this file?
diff --git a/doc/lispref/intro.texi b/doc/lispref/intro.texi
index a68bcfa0fe7..365c5f3122e 100644
--- a/doc/lispref/intro.texi
+++ b/doc/lispref/intro.texi
@@ -522,16 +522,16 @@ The minor version number of Emacs, as an integer. For Emacs version
522@node Acknowledgements 522@node Acknowledgements
523@section Acknowledgements 523@section Acknowledgements
524 524
525 This manual was written by Robert Krawitz, Bil Lewis, Dan LaLiberte, 525 This manual was originally written by Robert Krawitz, Bil Lewis, Dan
526Richard@tie{}M. Stallman and Chris Welty, the volunteers of the GNU 526LaLiberte, Richard@tie{}M. Stallman and Chris Welty, the volunteers of
527manual group, in an effort extending over several years. 527the GNU manual group, in an effort extending over several years.
528Robert@tie{}J. Chassell helped to review and edit the manual, with the 528Robert@tie{}J. Chassell helped to review and edit the manual, with the
529support of the Defense Advanced Research Projects Agency, ARPA Order 529support of the Defense Advanced Research Projects Agency, ARPA Order
5306082, arranged by Warren@tie{}A. Hunt, Jr.@: of Computational Logic, 5306082, arranged by Warren@tie{}A. Hunt, Jr.@: of Computational Logic,
531Inc. Additional sections were written by Miles Bader, Lars Brinkhoff, 531Inc. Additional sections have since been written by Miles Bader, Lars
532Chong Yidong, Kenichi Handa, Lute Kamstra, Juri Linkov, Glenn Morris, 532Brinkhoff, Chong Yidong, Kenichi Handa, Lute Kamstra, Juri Linkov,
533Thien-Thi Nguyen, Dan Nicolaescu, Martin Rudalics, Kim F. Storm, Luc 533Glenn Morris, Thien-Thi Nguyen, Dan Nicolaescu, Martin Rudalics, Kim
534Teirlinck, and Eli Zaretskii. 534F. Storm, Luc Teirlinck, and Eli Zaretskii, and others.
535 535
536 Corrections were supplied by Drew Adams, Juanma Barranquero, Karl 536 Corrections were supplied by Drew Adams, Juanma Barranquero, Karl
537Berry, Jim Blandy, Bard Bloom, Stephane Boucher, David Boyes, Alan 537Berry, Jim Blandy, Bard Bloom, Stephane Boucher, David Boyes, Alan
@@ -546,3 +546,6 @@ Friedrich Pukelsheim, Arnold D. Robbins, Raul Rockwell, Jason Rumney,
546Per Starbäck, Shinichirou Sugou, Kimmo Suominen, Edward Tharp, Bill 546Per Starbäck, Shinichirou Sugou, Kimmo Suominen, Edward Tharp, Bill
547Trost, Rickard Westman, Jean White, Eduard Wiebe, Matthew Wilding, 547Trost, Rickard Westman, Jean White, Eduard Wiebe, Matthew Wilding,
548Carl Witty, Dale Worley, Rusty Wright, and David D. Zuhn. 548Carl Witty, Dale Worley, Rusty Wright, and David D. Zuhn.
549
550 For a more complete list of contributors, please see the relevant
551ChangeLog file in the Emacs sources.
diff --git a/doc/lispref/keymaps.texi b/doc/lispref/keymaps.texi
index 5652d94114e..669f058ef13 100644
--- a/doc/lispref/keymaps.texi
+++ b/doc/lispref/keymaps.texi
@@ -1,6 +1,6 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1994, 1998-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1994, 1998-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/keymaps 5@setfilename ../../info/keymaps
6@node Keymaps, Modes, Command Loop, Top 6@node Keymaps, Modes, Command Loop, Top
@@ -686,7 +686,7 @@ and exit commands. @xref{Intro to Minibuffers}.
686 Emacs has other keymaps that are used in a different way---translating 686 Emacs has other keymaps that are used in a different way---translating
687events within @code{read-key-sequence}. @xref{Translation Keymaps}. 687events within @code{read-key-sequence}. @xref{Translation Keymaps}.
688 688
689 @xref{Standard Keymaps}, for a list of standard keymaps. 689 @xref{Standard Keymaps}, for a list of some standard keymaps.
690 690
691@defun current-active-maps &optional olp position 691@defun current-active-maps &optional olp position
692This returns the list of active keymaps that would be used by the 692This returns the list of active keymaps that would be used by the
diff --git a/doc/lispref/locals.texi b/doc/lispref/locals.texi
deleted file mode 100644
index a075d955add..00000000000
--- a/doc/lispref/locals.texi
+++ /dev/null
@@ -1,217 +0,0 @@
1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1993, 1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/locals
6@node Standard Buffer-Local Variables, Standard Keymaps, Standard Errors, Top
7@appendix Buffer-Local Variables
8@c The title "Standard Buffer-Local Variables" is too long for
9@c smallbook. --rjc 30mar92
10@cindex buffer-local variables, general-purpose
11@cindex standard buffer-local variables
12
13 The table below lists the general-purpose Emacs variables that
14automatically become buffer-local in each buffer. Most become
15buffer-local only when set; a few of them are always local in every
16buffer. Many Lisp packages define such variables for their internal
17use, but we don't try to list them all here.
18
19 Every buffer-specific minor mode defines a buffer-local variable
20named @samp{@var{modename}-mode}. @xref{Minor Mode Conventions}.
21Minor mode variables will not be listed here.
22
23@table @code
24@item auto-fill-function
25@xref{Auto Filling}.
26
27@item buffer-auto-save-file-format
28@xref{Format Conversion}.
29
30@item buffer-auto-save-file-name
31@xref{Auto-Saving}.
32
33@item buffer-backed-up
34@xref{Making Backups}.
35
36@item buffer-display-count
37@xref{Buffers and Windows}.
38
39@item buffer-display-table
40@xref{Active Display Table}.
41
42@item buffer-display-time
43@xref{Buffers and Windows}.
44
45@item buffer-file-coding-system
46@xref{Encoding and I/O}.
47
48@item buffer-file-format
49@xref{Format Conversion}.
50
51@item buffer-file-name
52@xref{Buffer File Name}.
53
54@item buffer-file-number
55@xref{Buffer File Name}.
56
57@item buffer-file-truename
58@xref{Buffer File Name}.
59
60@item buffer-file-type
61@xref{MS-DOS File Types}.
62
63@item buffer-invisibility-spec
64@xref{Invisible Text}.
65
66@item buffer-offer-save
67@xref{Killing Buffers}.
68
69@item buffer-save-without-query
70@xref{Killing Buffers}.
71
72@item buffer-read-only
73@xref{Read Only Buffers}.
74
75@item buffer-saved-size
76@xref{Auto-Saving}.
77
78@item buffer-undo-list
79@xref{Undo}.
80
81@item cache-long-line-scans
82@xref{Truncation}.
83
84@item case-fold-search
85@xref{Searching and Case}.
86
87@item comment-column
88@xref{Comments,,, emacs, The GNU Emacs Manual}.
89
90@item ctl-arrow
91@xref{Usual Display}.
92
93@item cursor-in-non-selected-windows
94@xref{Basic Windows}.
95
96@item cursor-type
97@xref{Cursor Parameters}.
98
99@item default-directory
100@xref{File Name Expansion}.
101
102@item defun-prompt-regexp
103@xref{List Motion}.
104
105@item desktop-save-buffer
106@xref{Desktop Save Mode}.
107
108@item enable-multibyte-characters
109@ref{Text Representations}.
110
111@item fill-column
112@xref{Margins}.
113
114@item fill-prefix
115@xref{Margins}.
116
117@item font-lock-defaults
118@xref{Font Lock Basics}.
119
120@item fringe-cursor-alist
121@xref{Fringe Cursors}.
122
123@item fringe-indicator-alist
124@xref{Fringe Indicators}.
125
126@item fringes-outside-margins
127@xref{Fringes}.
128
129@item goal-column
130@xref{Moving Point,,, emacs, The GNU Emacs Manual}.
131
132@item header-line-format
133@xref{Header Lines}.
134
135@item indicate-buffer-boundaries
136@xref{Usual Display}.
137
138@item indicate-empty-lines
139@xref{Usual Display}.
140
141@item left-fringe-width
142@xref{Fringe Size/Pos}.
143
144@item left-margin
145@xref{Margins}.
146
147@item left-margin-width
148@xref{Display Margins}.
149
150@item line-spacing
151@xref{Line Height}.
152
153@item local-abbrev-table
154@xref{Standard Abbrev Tables}.
155
156@item major-mode
157@xref{Mode Help}.
158
159@item mark-active
160@xref{The Mark}.
161
162@item mark-ring
163@xref{The Mark}.
164
165@item mode-line-buffer-identification
166@xref{Mode Line Variables}.
167
168@item mode-line-format
169@xref{Mode Line Data}.
170
171@item mode-line-modified
172@xref{Mode Line Variables}.
173
174@item mode-line-process
175@xref{Mode Line Variables}.
176
177@item mode-name
178@xref{Mode Line Variables}.
179
180@item point-before-scroll
181Used for communication between mouse commands and scroll-bar commands.
182
183@item right-fringe-width
184@xref{Fringe Size/Pos}.
185
186@item right-margin-width
187@xref{Display Margins}.
188
189@item save-buffer-coding-system
190@xref{Encoding and I/O}.
191
192@item scroll-bar-width
193@xref{Scroll Bars}.
194
195@item scroll-down-aggressively
196@itemx scroll-up-aggressively
197@xref{Textual Scrolling}.
198
199@item selective-display
200@itemx selective-display-ellipses
201@xref{Selective Display}.
202
203@item tab-width
204@xref{Usual Display}.
205
206@item truncate-lines
207@xref{Truncation}.
208
209@item vertical-scroll-bar
210@xref{Scroll Bars}.
211
212@item window-size-fixed
213@xref{Resizing Windows}.
214
215@item write-contents-functions
216@xref{Saving Buffers}.
217@end table
diff --git a/doc/lispref/makefile.w32-in b/doc/lispref/makefile.w32-in
index 11b6beab84d..0a4aea2d7e0 100644
--- a/doc/lispref/makefile.w32-in
+++ b/doc/lispref/makefile.w32-in
@@ -1,6 +1,6 @@
1# -*- Makefile -*- for the GNU Emacs Lisp Reference Manual. 1# -*- Makefile -*- for the GNU Emacs Lisp Reference Manual.
2 2
3# Copyright (C) 2003-2012 Free Software Foundation, Inc. 3# Copyright (C) 2003-2012 Free Software Foundation, Inc.
4 4
5# This file is part of GNU Emacs. 5# This file is part of GNU Emacs.
6 6
@@ -72,7 +72,6 @@ srcs = \
72 $(srcdir)/keymaps.texi \ 72 $(srcdir)/keymaps.texi \
73 $(srcdir)/lists.texi \ 73 $(srcdir)/lists.texi \
74 $(srcdir)/loading.texi \ 74 $(srcdir)/loading.texi \
75 $(srcdir)/locals.texi \
76 $(srcdir)/macros.texi \ 75 $(srcdir)/macros.texi \
77 $(srcdir)/maps.texi \ 76 $(srcdir)/maps.texi \
78 $(srcdir)/markers.texi \ 77 $(srcdir)/markers.texi \
diff --git a/doc/lispref/maps.texi b/doc/lispref/maps.texi
index 24cd64a6b35..b303562028b 100644
--- a/doc/lispref/maps.texi
+++ b/doc/lispref/maps.texi
@@ -1,39 +1,40 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1993, 1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1993, 1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/maps 5@setfilename ../../info/maps
6@node Standard Keymaps, Standard Hooks, Standard Buffer-Local Variables, Top 6@node Standard Keymaps, Standard Hooks, Standard Errors, Top
7@appendix Standard Keymaps 7@appendix Standard Keymaps
8@cindex standard keymaps 8@cindex keymaps, standard
9 9
10The following symbols are used as the names for various keymaps. 10In this section we list some of the more general keymaps. Many of
11Some of these exist when Emacs is first started, others are 11these exist when Emacs is first started, but some are loaded only when
12loaded only when their respective mode is used. This is not 12the respective feature is accessed.
13an exhaustive list.
14 13
15Several keymaps are used in the minibuffer. @xref{Completion Commands}. 14There are many other, more specialized, maps than these; in particular
16 15those associated with major and minor modes. The minibuffer uses
17Almost all of these maps are used as local maps. Indeed, of the modes 16several keymaps (@pxref{Completion Commands}). For more details on
18that presently exist, only Vip mode and Terminal mode ever change the 17keymaps, @pxref{Keymaps}.
19global keymap.
20 18
19@c Don't list individual major mode keymaps here, only more general things.
20@c Only add vindex for things not covered elsewhere in this manual.
21@c Don't add xrefs to things covered in {Keymaps}.
21@table @code 22@table @code
22@item apropos-mode-map 23@item 2C-mode-map
23@vindex apropos-mode-map 24A sparse keymap for subcommands of the prefix @kbd{C-x 6}.@*
24A sparse keymap for @code{apropos} buffers. 25@xref{Two-Column,, Two-Column Editing, emacs, The GNU Emacs Manual}.
25 26
26@item Buffer-menu-mode-map 27@item abbrev-map
27@vindex Buffer-menu-mode-map 28@vindex abbrev-map
28A full keymap used by Buffer Menu mode. 29A sparse keymap for subcommands of the prefix @kbd{C-x a}.@*
30@xref{Defining Abbrevs,,, emacs, The GNU Emacs Manual}.
29 31
30@item c-mode-map 32@item button-buffer-map
31@vindex c-mode-map 33A sparse keymap useful for buffers containing buffers.@*
32A sparse keymap used by C mode. 34You may want to use this as a parent keymap. @xref{Buttons}.
33 35
34@item command-history-map 36@item button-map
35@vindex command-history-map 37A sparse keymap used by buttons.
36A full keymap used by Command History mode.
37 38
38@item ctl-x-4-map 39@item ctl-x-4-map
39A sparse keymap for subcommands of the prefix @kbd{C-x 4}. 40A sparse keymap for subcommands of the prefix @kbd{C-x 4}.
@@ -44,196 +45,155 @@ A sparse keymap for subcommands of the prefix @kbd{C-x 5}.
44@item ctl-x-map 45@item ctl-x-map
45A full keymap for @kbd{C-x} commands. 46A full keymap for @kbd{C-x} commands.
46 47
47@item custom-mode-map 48@item ctl-x-r-map
48A full keymap for Custom mode. 49@vindex ctl-x-r-map
49 50A sparse keymap for subcommands of the prefix @kbd{C-x r}.@*
50@item debugger-mode-map 51@xref{Registers,,, emacs, The GNU Emacs Manual}.
51@vindex debugger-mode-map
52A full keymap used by Debugger mode.
53
54@item dired-mode-map
55@vindex dired-mode-map
56A full keymap for @code{dired-mode} buffers.
57
58@item edit-abbrevs-map
59@vindex edit-abbrevs-map
60A sparse keymap used in @code{edit-abbrevs}.
61
62@item edit-tab-stops-map
63@vindex edit-tab-stops-map
64A sparse keymap used in @code{edit-tab-stops}.
65
66@item electric-buffer-menu-mode-map
67@vindex electric-buffer-menu-mode-map
68A full keymap used by Electric Buffer Menu mode.
69
70@item electric-history-map
71@vindex electric-history-map
72A full keymap used by Electric Command History mode.
73
74@item emacs-lisp-mode-map
75@vindex emacs-lisp-mode-map
76A sparse keymap used by Emacs Lisp mode.
77 52
78@item esc-map 53@item esc-map
79A full keymap for @kbd{ESC} (or @kbd{Meta}) commands. 54A full keymap for @kbd{ESC} (or @kbd{Meta}) commands.
80 55
81@item facemenu-menu 56@item facemenu-keymap
82@vindex facemenu-menu 57A sparse keymap used for the @kbd{M-o} prefix key.
83The sparse keymap that displays the Text Properties menu.
84
85@item facemenu-background-menu
86@vindex facemenu-background-menu
87The sparse keymap that displays the Background Color submenu of the Text
88Properties menu.
89
90@item facemenu-face-menu
91@vindex facemenu-face-menu
92The sparse keymap that displays the Face submenu of the Text Properties menu.
93 58
94@item facemenu-foreground-menu 59@item function-key-map
95@vindex facemenu-foreground-menu 60The parent keymap of all @code{local-function-key-map} (q.v.) instances.
96The sparse keymap that displays the Foreground Color submenu of the Text
97Properties menu.
98
99@item facemenu-indentation-menu
100@vindex facemenu-indentation-menu
101The sparse keymap that displays the Indentation submenu of the Text
102Properties menu.
103
104@item facemenu-justification-menu
105@vindex facemenu-justification-menu
106The sparse keymap that displays the Justification submenu of the Text
107Properties menu.
108
109@item facemenu-special-menu
110@vindex facemenu-special-menu
111The sparse keymap that displays the Special Props submenu of the Text
112Properties menu.
113
114@item local-function-key-map
115The keymap for translating key sequences to preferred alternatives.@*
116If there are none, then it contains an empty sparse keymap.
117@xref{Translation Keymaps}.
118 61
62@ignore
63@c Doesn't exist.
119@item fundamental-mode-map 64@item fundamental-mode-map
120@vindex fundamental-mode-map 65@vindex fundamental-mode-map
121The sparse keymap for Fundamental mode.@* 66The sparse keymap for Fundamental mode.@*
122It is empty and should not be changed. 67It is empty and should not be changed.
68@end ignore
123 69
124@item global-map 70@item global-map
125The full keymap containing default global key bindings.@* 71The full keymap containing default global key bindings.@*
126Modes should not modify the Global map. 72Modes should not modify the Global map.
127 73
128@item grep-mode-map 74@item goto-map
129@vindex grep-mode-map 75A sparse keymap used for the @kbd{M-g} prefix key.
130The keymap for @code{grep-mode} buffers.
131 76
132@item help-map 77@item help-map
133The sparse keymap for the keys that follow the help character @kbd{C-h}. 78A sparse keymap for the keys following the help character @kbd{C-h}.@*
134 79@xref{Help Functions}.
135@item help-mode-map
136@vindex help-mode-map
137The sparse keymap for Help mode.
138 80
139@item Helper-help-map 81@item Helper-help-map
140@vindex Helper-help-map
141A full keymap used by the help utility package.@* 82A full keymap used by the help utility package.@*
142It has the same keymap in its value cell and in its function 83It has the same keymap in its value cell and in its function cell.
143cell.
144
145@item Info-edit-map
146@vindex Info-edit-map
147A sparse keymap used by the @code{Info-edit} command.
148
149@item Info-mode-map
150@vindex Info-mode-map
151A sparse keymap containing Info commands.
152 84
153@item input-decode-map 85@item input-decode-map
154The keymap for translating keypad and function keys.@* 86The keymap for translating keypad and function keys.@*
155If there are none, then it contains an empty sparse keymap. 87If there are none, then it contains an empty sparse keymap.
156@xref{Translation Keymaps}. 88@xref{Translation Keymaps}.
157 89
158@item isearch-mode-map
159@vindex isearch-mode-map
160A keymap that defines the characters you can type within incremental
161search.
162
163@item key-translation-map 90@item key-translation-map
164A keymap for translating keys. This one overrides ordinary key 91A keymap for translating keys. This one overrides ordinary key
165bindings, unlike @code{local-function-key-map}. @xref{Translation 92bindings, unlike @code{local-function-key-map}. @xref{Translation
166Keymaps}. 93Keymaps}.
167 94
168@item kmacro-map 95@item kmacro-keymap
169@vindex kmacro-map 96@vindex kmacro-keymap
170A sparse keymap for keys that follows the @kbd{C-x C-k} prefix 97A sparse keymap for keys that follows the @kbd{C-x C-k} prefix search.@*
171search. 98@xref{Keyboard Macros,,, emacs, The GNU Emacs Manual}.
172
173@item lisp-interaction-mode-map
174@vindex lisp-interaction-mode-map
175A sparse keymap used by Lisp Interaction mode.
176 99
177@item lisp-mode-map 100@item local-function-key-map
178@vindex lisp-mode-map 101The keymap for translating key sequences to preferred alternatives.@*
179A sparse keymap used by Lisp mode. 102If there are none, then it contains an empty sparse keymap.
180 103@xref{Translation Keymaps}.
181@item menu-bar-edit-menu
182@vindex menu-bar-edit-menu
183The keymap which displays the Edit menu in the menu bar.
184 104
185@item menu-bar-file-menu 105@item menu-bar-file-menu
106@itemx menu-bar-edit-menu
107@itemx menu-bar-options-menu
108@itemx global-buffers-menu-map
109@itemx menu-bar-tools-menu
110@itemx menu-bar-help-menu
111@cindex menu bar keymaps
186@vindex menu-bar-file-menu 112@vindex menu-bar-file-menu
187The keymap which displays the File menu in the menu bar. 113@vindex menu-bar-options-menu
188 114@vindex global-buffers-menu-map
189@item menu-bar-help-menu
190@vindex menu-bar-help-menu
191The keymap which displays the Help menu in the menu bar.
192
193@item menu-bar-mule-menu
194@vindex menu-bar-mule-menu
195The keymap which displays the Mule menu in the menu bar.
196
197@item menu-bar-search-menu
198@vindex menu-bar-search-menu
199The keymap which displays the Search menu in the menu bar.
200
201@item menu-bar-tools-menu
202@vindex menu-bar-tools-menu 115@vindex menu-bar-tools-menu
203The keymap which displays the Tools menu in the menu bar. 116@vindex menu-bar-help-menu
117These keymaps display the main, top-level menus in the menu bar.@*
118Some of them contain sub-menus. For example, the Edit menu contains
119@code{menu-bar-search-menu}, etc. @xref{Menu Bar}.
120@ignore
121TODO list all submenus?
122There are probably too many, and it would not be useful to do so, eg:
123The Edit menu includes @code{yank-menu}, @code{menu-bar-search-menu},
124@code{menu-bar-replace-menu}, @code{menu-bar-goto-menu},
125@code{menu-bar-bookmark-map}, and @code{facemenu-menu}.
126There is also mule-menu-keymap, set-coding-system-map,
127setup-language-environment-map, describe-language-environment-map,
128menu-bar-epatch-menu, menu-bar-ediff-merge-menu, menu-bar-ediff-menu, etc.
129@end ignore
130
131@item minibuffer-inactive-mode-map
132A full keymap used in the minibuffer when it is not active.@*
133@xref{Minibuffer Edit,, Editing in the Minibuffer, emacs, The GNU Emacs Manual}.
134
135@item mode-line-coding-system-map
136@itemx mode-line-input-method-map
137@itemx mode-line-column-line-number-mode-map
138@vindex mode-line-coding-system-map
139@vindex mode-line-input-method-map
140@vindex mode-line-column-line-number-mode-map
141These keymaps control various areas of the mode line.@*
142@xref{Mode Line Format}.
204 143
205@item mode-specific-map 144@item mode-specific-map
206The keymap for characters following @kbd{C-c}. Note, this is in the 145The keymap for characters following @kbd{C-c}. Note, this is in the
207global map. This map is not actually mode specific: its name was chosen 146global map. This map is not actually mode-specific: its name was chosen
208to be informative for the user in @kbd{C-h b} (@code{display-bindings}), 147to be informative in @kbd{C-h b} (@code{display-bindings}),
209where it describes the main use of the @kbd{C-c} prefix key. 148where it describes the main use of the @kbd{C-c} prefix key.
210 149
211@item multi-query-replace-map 150@c FIXME - don't mention this one?
212A sparse keymap that extends @code{query-replace-map} for multi-buffer 151@item mouse-appearance-menu-map
213replacements. @xref{Search and Replace, query-replace-map}. 152@vindex mouse-appearance-menu-map
153A sparse keymap used for the @kbd{S-mouse-1} key.
154
155@item mule-keymap
156The global keymap used for the @kbd{C-x @key{RET}} prefix key.
214 157
215@item occur-mode-map 158@item narrow-map
216@vindex occur-mode-map 159@vindex narrow-map
217A sparse keymap used by Occur mode. 160A sparse keymap for subcommands of the prefix @kbd{C-x n}.
161
162@item prog-mode-map
163The keymap used by Prog mode.@*
164@xref{Basic Major Modes}.
218 165
219@item query-replace-map 166@item query-replace-map
167@itemx multi-query-replace-map
220A sparse keymap used for responses in @code{query-replace} and related 168A sparse keymap used for responses in @code{query-replace} and related
221commands; also for @code{y-or-n-p} and @code{map-y-or-n-p}. The functions 169commands; also for @code{y-or-n-p} and @code{map-y-or-n-p}. The functions
222that use this map do not support prefix keys; they look up one event at a 170that use this map do not support prefix keys; they look up one event at a
223time. 171time. @code{multi-query-replace-map} extends @code{query-replace-map}
172for multi-buffer replacements. @xref{Search and Replace, query-replace-map}.
224 173
225@item search-map 174@item search-map
226A sparse keymap that provides global bindings for search-related 175A sparse keymap that provides global bindings for search-related commands.
227commands.
228 176
229@item text-mode-map 177@item special-mode-map
230@vindex text-mode-map 178The keymap used by Special mode.@*
231A sparse keymap used by Text mode. 179@xref{Basic Major Modes}.
232 180
233@item tool-bar-map 181@item tool-bar-map
234The keymap defining the contents of the tool bar. 182The keymap defining the contents of the tool bar.@*
183@xref{Tool Bar}.
184
185@item universal-argument-map
186@vindex universal-argument-map
187A sparse keymap used while processing @kbd{C-u}.@*
188@xref{Prefix Command Arguments}.
189
190@item vc-prefix-map
191The global keymap used for the @kbd{C-x v} prefix key.
192
193@item x-alternatives-map
194@vindex x-alternatives-map
195@findex x-setup-function-keys
196A sparse keymap used to map certain keys under graphical frames.@*
197The function @code{x-setup-function-keys} uses this.
235 198
236@item view-mode-map
237@vindex view-mode-map
238A full keymap used by View mode.
239@end table 199@end table
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index a4ee6f8327f..b0e9d4a3139 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -1,6 +1,6 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1995, 1998-1999, 2001-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/modes 5@setfilename ../../info/modes
6@node Modes, Documentation, Keymaps, Top 6@node Modes, Documentation, Keymaps, Top
@@ -38,7 +38,7 @@ user. For related topics such as keymaps and syntax tables, see
38to be called on a particular occasion by an existing program. Emacs 38to be called on a particular occasion by an existing program. Emacs
39provides hooks for the sake of customization. Most often, hooks are set 39provides hooks for the sake of customization. Most often, hooks are set
40up in the init file (@pxref{Init File}), but Lisp programs can set them also. 40up in the init file (@pxref{Init File}), but Lisp programs can set them also.
41@xref{Standard Hooks}, for a list of standard hook variables. 41@xref{Standard Hooks}, for a list of some standard hook variables.
42 42
43@cindex normal hook 43@cindex normal hook
44 Most of the hooks in Emacs are @dfn{normal hooks}. These variables 44 Most of the hooks in Emacs are @dfn{normal hooks}. These variables
@@ -1596,7 +1596,7 @@ where @var{get} is an expression that returns the current state,
1596and @var{set} is a function of one argument (a state) that sets it. 1596and @var{set} is a function of one argument (a state) that sets it.
1597 1597
1598@item :after-hook @var{after-hook} 1598@item :after-hook @var{after-hook}
1599This defines a single lisp form which is evaluated after the mode hooks 1599This defines a single Lisp form which is evaluated after the mode hooks
1600have run. It should not be quoted. 1600have run. It should not be quoted.
1601@end table 1601@end table
1602 1602
@@ -4030,8 +4030,3 @@ Here @var{desktop-buffer-misc} is the value returned by the function
4030optionally bound to @code{desktop-save-buffer}. 4030optionally bound to @code{desktop-save-buffer}.
4031@end defvar 4031@end defvar
4032 4032
4033@ignore
4034 Local Variables:
4035 fill-column: 72
4036 End:
4037@end ignore
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index 995a4d89352..ba4803c73f2 100644
--- a/doc/lispref/objects.texi
+++ b/doc/lispref/objects.texi
@@ -370,7 +370,7 @@ with other programming languages. Unlike some other languages, Emacs
370Lisp supports this syntax only in character literals and strings. 370Lisp supports this syntax only in character literals and strings.
371 371
372@cindex @samp{\} in character constant 372@cindex @samp{\} in character constant
373@cindex backslash in character constant 373@cindex backslash in character constants
374@cindex octal character code 374@cindex octal character code
375 The most general read syntax for a character represents the 375 The most general read syntax for a character represents the
376character code in either octal or hex. To use octal, write a question 376character code in either octal or hex. To use octal, write a question
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index e63300cfac4..f7df5f4bf87 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -101,8 +101,8 @@ even earlier than this.)
101It runs the normal hook @code{before-init-hook}. 101It runs the normal hook @code{before-init-hook}.
102 102
103@item 103@item
104It initializes the window frame and faces, if appropriate, and turns 104It initializes the initial frame's faces, and turns on the menu bar
105on the menu bar and tool bar, if the initial frame needs them. 105and tool bar if needed.
106 106
107@item 107@item
108It loads the library @file{site-start}, if it exists. This is not 108It loads the library @file{site-start}, if it exists. This is not
@@ -144,7 +144,7 @@ If the buffer @samp{*scratch*} exists and is still in Fundamental mode
144@code{initial-major-mode}. 144@code{initial-major-mode}.
145 145
146@item 146@item
147If started on a text-only terminal, it loads the terminal-specific 147If started on a text terminal, it loads the terminal-specific
148Lisp library, which is specified by the variable 148Lisp library, which is specified by the variable
149@code{term-file-prefix} (@pxref{Terminal-Specific}). This is not done 149@code{term-file-prefix} (@pxref{Terminal-Specific}). This is not done
150in @code{--batch} mode, nor if @code{term-file-prefix} is @code{nil}. 150in @code{--batch} mode, nor if @code{term-file-prefix} is @code{nil}.
@@ -600,7 +600,7 @@ directly does not run this hook.
600@subsection Suspending Emacs 600@subsection Suspending Emacs
601@cindex suspending Emacs 601@cindex suspending Emacs
602 602
603 On text-only terminals, it is possible to @dfn{suspend Emacs}, which 603 On text terminals, it is possible to @dfn{suspend Emacs}, which
604means stopping Emacs temporarily and returning control to its superior 604means stopping Emacs temporarily and returning control to its superior
605process, which is usually the shell. This allows you to resume 605process, which is usually the shell. This allows you to resume
606editing later in the same Emacs process, with the same buffers, the 606editing later in the same Emacs process, with the same buffers, the
@@ -740,10 +740,10 @@ terminal object, a frame (meaning the terminal for that frame), or
740 740
741@deffn Command suspend-frame 741@deffn Command suspend-frame
742This command @dfn{suspends} a frame. For GUI frames, it calls 742This command @dfn{suspends} a frame. For GUI frames, it calls
743@code{iconify-frame} (@pxref{Visibility of Frames}); for text-only 743@code{iconify-frame} (@pxref{Visibility of Frames}); for frames on
744frames, it calls either @code{suspend-emacs} or @code{suspend-tty}, 744text terminals, it calls either @code{suspend-emacs} or
745depending on whether the frame is displayed on the controlling 745@code{suspend-tty}, depending on whether the frame is displayed on the
746terminal device or not. 746controlling terminal device or not.
747@end deffn 747@end deffn
748 748
749@node System Environment 749@node System Environment
diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi
index 29b338369e5..99722c93902 100644
--- a/doc/lispref/positions.texi
+++ b/doc/lispref/positions.texi
@@ -372,18 +372,17 @@ This function returns the number of lines between the positions
3721, even if @var{start} and @var{end} are on the same line. This is 3721, even if @var{start} and @var{end} are on the same line. This is
373because the text between them, considered in isolation, must contain at 373because the text between them, considered in isolation, must contain at
374least one line unless it is empty. 374least one line unless it is empty.
375@end defun
375 376
376Here is an example of using @code{count-lines}: 377@deffn Command count-words start end
378@cindex words in region
379This function returns the number of words between the positions
380@var{start} and @var{end} in the current buffer.
377 381
378@example 382This function can also be called interactively. In that case, it
379@group 383prints a message reporting the number of lines, words, and characters
380(defun current-line () 384in the buffer, or in the region if the region is active.
381 "Return the vertical position of point@dots{}" 385@end deffn
382 (+ (count-lines (window-start) (point))
383 (if (= (current-column) 0) 1 0)))
384@end group
385@end example
386@end defun
387 386
388@defun line-number-at-pos &optional pos 387@defun line-number-at-pos &optional pos
389@cindex line number 388@cindex line number
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index 8b25868cfe9..04aa50ebc84 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -2712,7 +2712,7 @@ Unsigned integer in network byte order, with length 3.
2712@itemx dword 2712@itemx dword
2713@itemx long 2713@itemx long
2714Unsigned integer in network byte order, with length 4. 2714Unsigned integer in network byte order, with length 4.
2715Note: These values may be limited by Emacs' integer implementation limits. 2715Note: These values may be limited by Emacs's integer implementation limits.
2716 2716
2717@item u16r 2717@item u16r
2718@itemx u24r 2718@itemx u24r
diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi
index 3dc777897c1..5bda1940b51 100644
--- a/doc/lispref/searching.texi
+++ b/doc/lispref/searching.texi
@@ -559,6 +559,7 @@ through @samp{f} and @samp{A} through @samp{F}.
559 559
560@node Regexp Backslash 560@node Regexp Backslash
561@subsubsection Backslash Constructs in Regular Expressions 561@subsubsection Backslash Constructs in Regular Expressions
562@cindex backslash in regular expressions
562 563
563 For the most part, @samp{\} followed by any character matches only 564 For the most part, @samp{\} followed by any character matches only
564that character. However, there are several exceptions: certain 565that character. However, there are several exceptions: certain
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi
index ad1f622bfac..5874a848807 100644
--- a/doc/lispref/tips.texi
+++ b/doc/lispref/tips.texi
@@ -58,7 +58,7 @@ Separate the prefix from the rest of the name with a hyphen, @samp{-}.
58This practice helps avoid name conflicts, since all global variables 58This practice helps avoid name conflicts, since all global variables
59in Emacs Lisp share the same name space, and all functions share 59in Emacs Lisp share the same name space, and all functions share
60another name space@footnote{The benefits of a Common Lisp-style 60another name space@footnote{The benefits of a Common Lisp-style
61package system are considered not to outweigh the costs.} 61package system are considered not to outweigh the costs.}.
62 62
63Occasionally, for a command name intended for users to use, it is more 63Occasionally, for a command name intended for users to use, it is more
64convenient if some words come before the package's name prefix. And 64convenient if some words come before the package's name prefix. And
@@ -110,6 +110,17 @@ called before the first use of the macro in the file. @xref{Compiling
110Macros}. 110Macros}.
111 111
112@item 112@item
113Avoid loading additional libraries at run time unless they are really
114needed. If your file simply cannot work without some other library,
115then just @code{require} that library at the top-level and be done
116with it. But if your file contains several independent features, and
117only one or two require the extra library, then consider putting
118@code{require} statements inside the relevant functions rather than at
119the top-level. Or use @code{autoload} statements to load the extra
120library when needed. This way people who don't use those aspects of
121your file do not need to load the extra library.
122
123@item
113Please don't require the @code{cl} package of Common Lisp extensions at 124Please don't require the @code{cl} package of Common Lisp extensions at
114run time. Use of this package is optional, and it is not part of the 125run time. Use of this package is optional, and it is not part of the
115standard Emacs namespace. If your package loads @code{cl} at run time, 126standard Emacs namespace. If your package loads @code{cl} at run time,
@@ -194,11 +205,8 @@ replacements differs from that of the originals.
194 205
195@item 206@item
196Constructs that define a function or variable should be macros, 207Constructs that define a function or variable should be macros,
197not functions, and their names should start with @samp{def}. 208not functions, and their names should start with @samp{define-}.
198 209The macro should receive the name to be
199@item
200A macro that defines a function or variable should have a name that
201starts with @samp{define-}. The macro should receive the name to be
202defined as the first argument. That will help various tools find the 210defined as the first argument. That will help various tools find the
203definition automatically. Avoid constructing the names in the macro 211definition automatically. Avoid constructing the names in the macro
204itself, since that would confuse these tools. 212itself, since that would confuse these tools.
@@ -207,7 +215,7 @@ itself, since that would confuse these tools.
207In some other systems there is a convention of choosing variable names 215In some other systems there is a convention of choosing variable names
208that begin and end with @samp{*}. We don't use that convention in Emacs 216that begin and end with @samp{*}. We don't use that convention in Emacs
209Lisp, so please don't use it in your programs. (Emacs uses such names 217Lisp, so please don't use it in your programs. (Emacs uses such names
210only for special-purpose buffers.) The users will find Emacs more 218only for special-purpose buffers.) People will find Emacs more
211coherent if all libraries use the same conventions. 219coherent if all libraries use the same conventions.
212 220
213@item 221@item
@@ -216,7 +224,7 @@ constants, you should make sure Emacs always decodes these characters
216the same way, regardless of the user's settings. The easiest way to 224the same way, regardless of the user's settings. The easiest way to
217do this is to use the coding system @code{utf-8-emacs} (@pxref{Coding 225do this is to use the coding system @code{utf-8-emacs} (@pxref{Coding
218System Basics}), and specify that coding in the @samp{-*-} line or the 226System Basics}), and specify that coding in the @samp{-*-} line or the
219local variables list. @xref{File variables, , Local Variables in 227local variables list. @xref{File Variables, , Local Variables in
220Files, emacs, The GNU Emacs Manual}. 228Files, emacs, The GNU Emacs Manual}.
221 229
222@example 230@example
@@ -224,8 +232,7 @@ Files, emacs, The GNU Emacs Manual}.
224@end example 232@end example
225 233
226@item 234@item
227Indent each function with @kbd{C-M-q} (@code{indent-sexp}) using the 235Indent the file using the default indentation parameters.
228default indentation parameters.
229 236
230@item 237@item
231Don't make a habit of putting close-parentheses on lines by 238Don't make a habit of putting close-parentheses on lines by
@@ -233,29 +240,8 @@ themselves; Lisp programmers find this disconcerting.
233 240
234@item 241@item
235Please put a copyright notice and copying permission notice on the 242Please put a copyright notice and copying permission notice on the
236file if you distribute copies. Use a notice like this one: 243file if you distribute copies. @xref{Library Headers}.
237
238@smallexample
239;; Copyright (C) @var{year} @var{name}
240
241;; This program is free software: you can redistribute it and/or
242;; modify it under the terms of the GNU General Public License as
243;; published by the Free Software Foundation, either version 3 of
244;; the License, or (at your option) any later version.
245 244
246;; This program is distributed in the hope that it will be useful,
247;; but WITHOUT ANY WARRANTY; without even the implied warranty of
248;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
249;; GNU General Public License for more details.
250
251;; You should have received a copy of the GNU General Public License
252;; along with this program. If not, see
253;; <http://www.gnu.org/licenses/>.
254@end smallexample
255
256If you have signed papers to assign the copyright to the Foundation,
257then use @samp{Free Software Foundation, Inc.} as @var{name}.
258Otherwise, use your name. @xref{Library Headers}.
259@end itemize 245@end itemize
260 246
261@node Key Binding Conventions 247@node Key Binding Conventions
@@ -324,11 +310,11 @@ Similarly, don't bind a key sequence ending in @key{C-g}, since that
324is commonly used to cancel a key sequence. 310is commonly used to cancel a key sequence.
325 311
326@item 312@item
327Anything which acts like a temporary mode or state which the user can 313Anything that acts like a temporary mode or state that the user can
328enter and leave should define @kbd{@key{ESC} @key{ESC}} or 314enter and leave should define @kbd{@key{ESC} @key{ESC}} or
329@kbd{@key{ESC} @key{ESC} @key{ESC}} as a way to escape. 315@kbd{@key{ESC} @key{ESC} @key{ESC}} as a way to escape.
330 316
331For a state which accepts ordinary Emacs commands, or more generally any 317For a state that accepts ordinary Emacs commands, or more generally any
332kind of state in which @key{ESC} followed by a function key or arrow key 318kind of state in which @key{ESC} followed by a function key or arrow key
333is potentially meaningful, then you must not define @kbd{@key{ESC} 319is potentially meaningful, then you must not define @kbd{@key{ESC}
334@key{ESC}}, since that would preclude recognizing an escape sequence 320@key{ESC}}, since that would preclude recognizing an escape sequence
@@ -398,8 +384,8 @@ An error message should start with a capital letter but should not end
398with a period. 384with a period.
399 385
400@item 386@item
401A question asked in the minibuffer with @code{y-or-n-p} or 387A question asked in the minibuffer with @code{yes-or-no-p} or
402@code{yes-or-no-p} should start with a capital letter and end with 388@code{y-or-n-p} should start with a capital letter and end with
403@samp{? }. 389@samp{? }.
404 390
405@item 391@item
@@ -457,10 +443,9 @@ to generate such messages.
457 443
458@item 444@item
459Try to avoid using recursive edits. Instead, do what the Rmail @kbd{e} 445Try to avoid using recursive edits. Instead, do what the Rmail @kbd{e}
460command does: use a new local keymap that contains one command defined 446command does: use a new local keymap that contains a command defined
461to switch back to the old local keymap. Or do what the 447to switch back to the old local keymap. Or simply switch to another
462@code{edit-options} command does: switch to another buffer and let the 448buffer and let the user switch back at will. @xref{Recursive Editing}.
463user switch back at will. @xref{Recursive Editing}.
464@end itemize 449@end itemize
465 450
466@node Compilation Tips 451@node Compilation Tips
@@ -515,6 +500,10 @@ compiled specially (@pxref{Array Functions}):
515@end group 500@end group
516@end example 501@end example
517 502
503@noindent
504Note that in this case (and many others), you must first load the
505@file{bytecomp} library, which defines the @code{byte-compile} property.
506
518@item 507@item
519If calling a small function accounts for a substantial part of your 508If calling a small function accounts for a substantial part of your
520program's running time, make the function inline. This eliminates 509program's running time, make the function inline. This eliminates
@@ -541,6 +530,11 @@ Such a definition has no effect except to tell the compiler
541not to warn about uses of the variable @code{foo} in this file. 530not to warn about uses of the variable @code{foo} in this file.
542 531
543@item 532@item
533Similarly, to avoid a compiler warning about an undefined function
534that you know @emph{will} be defined, use a @code{declare-function}
535statement (@pxref{Declaring Functions}).
536
537@item
544If you use many functions and variables from a certain file, you can 538If you use many functions and variables from a certain file, you can
545add a @code{require} for that package to avoid compilation warnings 539add a @code{require} for that package to avoid compilation warnings
546for them. For instance, 540for them. For instance,
@@ -561,8 +555,8 @@ functions and variables in your package.
561 555
562@item 556@item
563The last resort for avoiding a warning, when you want to do something 557The last resort for avoiding a warning, when you want to do something
564that usually is a mistake but it's not a mistake in this one case, 558that is usually a mistake but you know is not a mistake in your usage,
565is to put a call to @code{with-no-warnings} around it. 559is to put it inside @code{with-no-warnings}. @xref{Compiler Errors}.
566@end itemize 560@end itemize
567 561
568@node Documentation Tips 562@node Documentation Tips
@@ -580,11 +574,9 @@ Every command, function, or variable intended for users to know about
580should have a documentation string. 574should have a documentation string.
581 575
582@item 576@item
583An internal variable or subroutine of a Lisp program might as well have 577An internal variable or subroutine of a Lisp program might as well
584a documentation string. In earlier Emacs versions, you could save space 578have a documentation string. Documentation strings take up very
585by using a comment instead of a documentation string, but that is no 579little space in a running Emacs.
586longer the case---documentation strings now take up very little space in
587a running Emacs.
588 580
589@item 581@item
590Format the documentation string so that it fits in an Emacs window on an 582Format the documentation string so that it fits in an Emacs window on an
@@ -595,14 +587,14 @@ or it will look bad in the output of @code{apropos}.
595You can fill the text if that looks good. However, rather than blindly 587You can fill the text if that looks good. However, rather than blindly
596filling the entire documentation string, you can often make it much more 588filling the entire documentation string, you can often make it much more
597readable by choosing certain line breaks with care. Use blank lines 589readable by choosing certain line breaks with care. Use blank lines
598between topics if the documentation string is long. 590between sections if the documentation string is long.
599 591
600@item 592@item
601The first line of the documentation string should consist of one or two 593The first line of the documentation string should consist of one or two
602complete sentences that stand on their own as a summary. @kbd{M-x 594complete sentences that stand on their own as a summary. @kbd{M-x
603apropos} displays just the first line, and if that line's contents don't 595apropos} displays just the first line, and if that line's contents don't
604stand on their own, the result looks bad. In particular, start the 596stand on their own, the result looks bad. In particular, start the
605first line with a capital letter and end with a period. 597first line with a capital letter and end it with a period.
606 598
607For a function, the first line should briefly answer the question, 599For a function, the first line should briefly answer the question,
608``What does this function do?'' For a variable, the first line should 600``What does this function do?'' For a variable, the first line should
@@ -630,7 +622,7 @@ important arguments.
630When a function's documentation string mentions the value of an argument 622When a function's documentation string mentions the value of an argument
631of the function, use the argument name in capital letters as if it were 623of the function, use the argument name in capital letters as if it were
632a name for that value. Thus, the documentation string of the function 624a name for that value. Thus, the documentation string of the function
633@code{eval} refers to its second argument as @samp{FORM}, because the 625@code{eval} refers to its first argument as @samp{FORM}, because the
634actual argument name is @code{form}: 626actual argument name is @code{form}:
635 627
636@example 628@example
@@ -654,7 +646,7 @@ string. If the symbol's name is @code{foo}, write ``foo,'' not
654 646
655This might appear to contradict the policy of writing function 647This might appear to contradict the policy of writing function
656argument values, but there is no real contradiction; the argument 648argument values, but there is no real contradiction; the argument
657@emph{value} is not the same thing as the @emph{symbol} which the 649@emph{value} is not the same thing as the @emph{symbol} that the
658function uses to hold the value. 650function uses to hold the value.
659 651
660If this puts a lower-case letter at the beginning of a sentence 652If this puts a lower-case letter at the beginning of a sentence
@@ -825,8 +817,8 @@ In Dired, visit the file or directory named on this line.
825@end example 817@end example
826 818
827@item 819@item
828When you define a variable that users ought to set interactively, you 820When you define a variable that represents an option users might want
829should use @code{defcustom}. @xref{Defining Variables}. 821to set, use @code{defcustom}. @xref{Defining Variables}.
830 822
831@item 823@item
832The documentation string for a variable that is a yes-or-no flag should 824The documentation string for a variable that is a yes-or-no flag should
@@ -839,19 +831,14 @@ all non-@code{nil} values are equivalent and indicate explicitly what
839@section Tips on Writing Comments 831@section Tips on Writing Comments
840@cindex comments, Lisp convention for 832@cindex comments, Lisp convention for
841 833
842 We recommend these conventions for where to put comments and how to 834 We recommend these conventions for comments:
843indent them:
844 835
845@table @samp 836@table @samp
846@item ; 837@item ;
847Comments that start with a single semicolon, @samp{;}, should all be 838Comments that start with a single semicolon, @samp{;}, should all be
848aligned to the same column on the right of the source code. Such 839aligned to the same column on the right of the source code. Such
849comments usually explain how the code on the same line does its job. In 840comments usually explain how the code on that line does its job.
850Lisp mode and related modes, the @kbd{M-;} (@code{indent-for-comment}) 841For example:
851command automatically inserts such a @samp{;} in the right place, or
852aligns such a comment if it is already present.
853
854This and following examples are taken from the Emacs sources.
855 842
856@smallexample 843@smallexample
857@group 844@group
@@ -873,7 +860,7 @@ at that point. For example:
873(prog1 (setq auto-fill-function 860(prog1 (setq auto-fill-function
874 @dots{} 861 @dots{}
875 @dots{} 862 @dots{}
876 ;; update mode line 863 ;; Update mode line.
877 (force-mode-line-update))) 864 (force-mode-line-update)))
878@end group 865@end group
879@end smallexample 866@end smallexample
@@ -882,17 +869,17 @@ We also normally use two semicolons for comments outside functions.
882 869
883@smallexample 870@smallexample
884@group 871@group
885;; This Lisp code is run in Emacs 872;; This Lisp code is run in Emacs when it is to operate as
886;; when it is to operate as a server 873;; a server for other processes.
887;; for other processes.
888@end group 874@end group
889@end smallexample 875@end smallexample
890 876
891Every function that has no documentation string (presumably one that is 877If a function has no documentation string, it should instead have a
892used only internally within the package it belongs to), should instead 878two-semicolon comment right before the function, explaining what the
893have a two-semicolon comment right before the function, explaining what 879function does and how to call it properly. Explain precisely what
894the function does and how to call it properly. Explain precisely what 880each argument means and how the function interprets its possible
895each argument means and how the function interprets its possible values. 881values. It is much better to convert such comments to documentation
882strings, though.
896 883
897@item ;;; 884@item ;;;
898Comments that start with three semicolons, @samp{;;;}, should start at 885Comments that start with three semicolons, @samp{;;;}, should start at
@@ -903,7 +890,7 @@ semicolons depends on whether the comment should be considered a
903``heading'' by Outline minor mode. By default, comments starting with 890``heading'' by Outline minor mode. By default, comments starting with
904at least three semicolons (followed by a single space and a 891at least three semicolons (followed by a single space and a
905non-whitespace character) are considered headings, comments starting 892non-whitespace character) are considered headings, comments starting
906with two or less are not. 893with two or fewer are not.
907 894
908Another use for triple-semicolon comments is for commenting out lines 895Another use for triple-semicolon comments is for commenting out lines
909within a function. We use three semicolons for this precisely so that 896within a function. We use three semicolons for this precisely so that
@@ -934,11 +921,11 @@ program. For example:
934@end table 921@end table
935 922
936@noindent 923@noindent
937The indentation commands of the Lisp modes in Emacs, such as @kbd{M-;} 924Generally speaking, the @kbd{M-;} (@code{comment-dwim}) command
938(@code{indent-for-comment}) and @key{TAB} (@code{lisp-indent-line}), 925automatically starts a comment of the appropriate type; or indents an
939automatically indent comments according to these conventions, 926existing comment to the right place, depending on the number of
940depending on the number of semicolons. @xref{Comments,, 927semicolons.
941Manipulating Comments, emacs, The GNU Emacs Manual}. 928@xref{Comments,, Manipulating Comments, emacs, The GNU Emacs Manual}.
942 929
943@node Library Headers 930@node Library Headers
944@section Conventional Headers for Emacs Libraries 931@section Conventional Headers for Emacs Libraries
@@ -947,39 +934,28 @@ Manipulating Comments, emacs, The GNU Emacs Manual}.
947 934
948 Emacs has conventions for using special comments in Lisp libraries 935 Emacs has conventions for using special comments in Lisp libraries
949to divide them into sections and give information such as who wrote 936to divide them into sections and give information such as who wrote
950them. This section explains these conventions. 937them. Using a standard format for these items makes it easier for
951 938tools (and people) to extract the relevant information. This section
952 We'll start with an example, a package that is included in the Emacs 939explains these conventions, starting with an example:
953distribution.
954
955 Parts of this example reflect its status as part of Emacs; for
956example, the copyright notice lists the Free Software Foundation as the
957copyright holder, and the copying permission says the file is part of
958Emacs. When you write a package and post it, the copyright holder would
959be you (unless your employer claims to own it instead), and you should
960get the suggested copying permission from the end of the GNU General
961Public License itself. Don't say your file is part of Emacs
962if we haven't installed it in Emacs yet!
963
964 With that warning out of the way, on to the example:
965 940
966@smallexample 941@smallexample
967@group 942@group
968;;; lisp-mnt.el --- minor mode for Emacs Lisp maintainers 943;;; foo.el --- Support for the Foo programming language
969 944
970;; Copyright (C) 1992 Free Software Foundation, Inc. 945;; Copyright (C) 2010-2012 Your Name
971@end group 946@end group
972 947
973;; Author: Eric S. Raymond <esr@@snark.thyrsus.com> 948;; Author: Your Name <yourname@@example.com>
974;; Maintainer: Eric S. Raymond <esr@@snark.thyrsus.com> 949;; Maintainer: Someone Else <someone@@example.com>
975;; Created: 14 Jul 1992 950;; Created: 14 Jul 2010
976;; Version: 1.2
977@group 951@group
978;; Keywords: docs 952;; Keywords: languages
979 953
980;; This file is part of GNU Emacs. 954;; This file is not part of GNU Emacs.
955
956;; This file is free software@dots{}
981@dots{} 957@dots{}
982;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. 958;; along with this file. If not, see <http://www.gnu.org/licenses/>.
983@end group 959@end group
984@end smallexample 960@end smallexample
985 961
@@ -990,8 +966,19 @@ if we haven't installed it in Emacs yet!
990@end example 966@end example
991 967
992@noindent 968@noindent
993The description should be complete in one line. If the file 969The description should be contained in one line. If the file
994needs a @samp{-*-} specification, put it after @var{description}. 970needs a @samp{-*-} specification, put it after @var{description}.
971If this would make the first line too long, use a Local Variables
972section at the end of the file.
973
974 The copyright notice usually lists your name (if you wrote the
975file). If you have an employer who claims copyright on your work, you
976might need to list them instead. Do not say that the copyright holder
977is the Free Software Foundation (or that the file is part of GNU
978Emacs) unless your file has been accepted into the Emacs distribution.
979For more information on the form of copyright and license notices, see
980@uref{http://www.gnu.org/licenses/gpl-howto.html, the guide on the GNU
981website}.
995 982
996 After the copyright notice come several @dfn{header comment} lines, 983 After the copyright notice come several @dfn{header comment} lines,
997each beginning with @samp{;; @var{header-name}:}. Here is a table of 984each beginning with @samp{;; @var{header-name}:}. Here is a table of
@@ -999,55 +986,55 @@ the conventional possibilities for @var{header-name}:
999 986
1000@table @samp 987@table @samp
1001@item Author 988@item Author
1002This line states the name and net address of at least the principal 989This line states the name and email address of at least the principal
1003author of the library. 990author of the library. If there are multiple authors, list them on
1004 991continuation lines led by @code{;;} and whitespace (this is easier
1005If there are multiple authors, you can list them on continuation lines 992for tools to parse than having more than one author on one line).
1006led by @code{;;} and a tab character, like this: 993We recommend including a contact email address, of the form
994@samp{<@dots{}>}. For example:
1007 995
1008@smallexample 996@smallexample
1009@group 997@group
1010;; Author: Ashwin Ram <Ram-Ashwin@@cs.yale.edu> 998;; Author: Your Name <yourname@@example.com>
1011;; Dave Sill <de5@@ornl.gov> 999;; Someone Else <someone@@example.com>
1012;; Dave Brennan <brennan@@hal.com> 1000;; Another Person <another@@example.com>
1013;; Eric Raymond <esr@@snark.thyrsus.com>
1014@end group 1001@end group
1015@end smallexample 1002@end smallexample
1016 1003
1017@item Maintainer 1004@item Maintainer
1018This line should contain a single name/address as in the Author line, or 1005This header has the same format as the Author header. It lists the
1019an address only, or the string @samp{FSF}. If there is no maintainer 1006person(s) who currently maintain(s) the file (respond to bug reports,
1020line, the person(s) in the Author field are presumed to be the 1007etc.).
1021maintainers. The example above is mildly bogus because the maintainer
1022line is redundant.
1023
1024The idea behind the @samp{Author} and @samp{Maintainer} lines is to make
1025possible a Lisp function to ``send mail to the maintainer'' without
1026having to mine the name out by hand.
1027 1008
1028Be sure to surround the network address with @samp{<@dots{}>} if 1009If there is no maintainer line, the person(s) in the Author field
1029you include the person's full name as well as the network address. 1010is/are presumed to be the maintainers. Some files in Emacs use
1011@samp{FSF} for the maintainer. This means that the original author is
1012no longer responsible for the file, and that it is maintained as part
1013of Emacs.
1030 1014
1031@item Created 1015@item Created
1032This optional line gives the original creation date of the 1016This optional line gives the original creation date of the file, and
1033file. For historical interest only. 1017is for historical interest only.
1034 1018
1035@item Version 1019@item Version
1036If you wish to record version numbers for the individual Lisp program, put 1020If you wish to record version numbers for the individual Lisp program,
1037them in this line. 1021put them in this line. Lisp files distributed with Emacs generally do
1038 1022not have a @samp{Version} header, since the version number of Emacs
1039@item Adapted-By 1023itself serves the same purpose. If you are distributing a collection
1040In this header line, place the name of the person who adapted the 1024of multiple files, we recommend not writing the version in every file,
1041library for installation (to make it fit the style conventions, for 1025but only the main one.
1042example).
1043 1026
1044@item Keywords 1027@item Keywords
1045This line lists keywords for the @code{finder-by-keyword} help command. 1028This line lists keywords for the @code{finder-by-keyword} help command.
1046Please use that command to see a list of the meaningful keywords. 1029Please use that command to see a list of the meaningful keywords.
1047 1030
1048This field is important; it's how people will find your package when 1031This field is how people will find your package when they're looking
1049they're looking for things by topic area. To separate the keywords, you 1032for things by topic. To separate the keywords, you can use spaces,
1050can use spaces, commas, or both. 1033commas, or both.
1034
1035The name of this field is unfortunate, since people often assume it is
1036the place to write arbitrary keywords that describe their package,
1037rather than just the relevant Finder keywords.
1051 1038
1052@item Package-Version 1039@item Package-Version
1053If @samp{Version} is not suitable for use by the package manager, then 1040If @samp{Version} is not suitable for use by the package manager, then
@@ -1060,7 +1047,7 @@ If this exists, it names packages on which the current package depends
1060for proper operation. @xref{Packaging Basics}. This is used by the 1047for proper operation. @xref{Packaging Basics}. This is used by the
1061package manager both at download time (to ensure that a complete set 1048package manager both at download time (to ensure that a complete set
1062of packages is downloaded) and at activation time (to ensure that a 1049of packages is downloaded) and at activation time (to ensure that a
1063package is activated if and only if all its dependencies have been). 1050package is only activated if all its dependencies have been).
1064 1051
1065Its format is a list of lists. The @code{car} of each sub-list is the 1052Its format is a list of lists. The @code{car} of each sub-list is the
1066name of a package, as a symbol. The @code{cadr} of each sub-list is 1053name of a package, as a symbol. The @code{cadr} of each sub-list is
@@ -1081,8 +1068,8 @@ appropriate. You can also put in header lines with other header
1081names---they have no standard meanings, so they can't do any harm. 1068names---they have no standard meanings, so they can't do any harm.
1082 1069
1083 We use additional stylized comments to subdivide the contents of the 1070 We use additional stylized comments to subdivide the contents of the
1084library file. These should be separated by blank lines from anything 1071library file. These should be separated from anything else by blank
1085else. Here is a table of them: 1072lines. Here is a table of them:
1086 1073
1087@table @samp 1074@table @samp
1088@item ;;; Commentary: 1075@item ;;; Commentary:
@@ -1092,16 +1079,12 @@ It should come right after the copying permissions, terminated by a
1092text is used by the Finder package, so it should make sense in that 1079text is used by the Finder package, so it should make sense in that
1093context. 1080context.
1094 1081
1095@item ;;; Documentation:
1096This was used in some files in place of @samp{;;; Commentary:},
1097but it is deprecated.
1098
1099@item ;;; Change Log: 1082@item ;;; Change Log:
1100This begins change log information stored in the library file (if you 1083This begins an optional log of changes to the file over time. Don't
1101store the change history there). For Lisp files distributed with Emacs, 1084put too much information in this section---it is better to keep the
1102the change history is kept in the file @file{ChangeLog} and not in the 1085detailed logs in a separate @file{ChangeLog} file (as Emacs does),
1103source file at all; these files generally do not have a @samp{;;; Change 1086and/or to use a version control system. @samp{History} is an
1104Log:} line. @samp{History} is an alternative to @samp{Change Log}. 1087alternative to @samp{Change Log}.
1105 1088
1106@item ;;; Code: 1089@item ;;; Code:
1107This begins the actual code of the program. 1090This begins the actual code of the program.
diff --git a/doc/lispref/variables.texi b/doc/lispref/variables.texi
index 94e71c96d0a..548d2e99414 100644
--- a/doc/lispref/variables.texi
+++ b/doc/lispref/variables.texi
@@ -1,6 +1,6 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc. 3@c Copyright (C) 1990-1995, 1998-2012 Free Software Foundation, Inc.
4@c See the file elisp.texi for copying conditions. 4@c See the file elisp.texi for copying conditions.
5@setfilename ../../info/variables 5@setfilename ../../info/variables
6@node Variables, Functions, Control Structures, Top 6@node Variables, Functions, Control Structures, Top
@@ -479,7 +479,7 @@ not the buffer-local value. (But you should not be making
479buffer-local bindings for a symbol that is defined with 479buffer-local bindings for a symbol that is defined with
480@code{defconst}.) 480@code{defconst}.)
481 481
482An example of the use of @code{defconst} is Emacs' definition of 482An example of the use of @code{defconst} is Emacs's definition of
483@code{float-pi}---the mathematical constant @math{pi}, which ought not 483@code{float-pi}---the mathematical constant @math{pi}, which ought not
484to be changed by anyone (attempts by the Indiana State Legislature 484to be changed by anyone (attempts by the Indiana State Legislature
485notwithstanding). As the second form illustrates, however, 485notwithstanding). As the second form illustrates, however,
diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi
index addc4bd6d69..a92a807b747 100644
--- a/doc/lispref/vol1.texi
+++ b/doc/lispref/vol1.texi
@@ -187,11 +187,9 @@ Appendices
187* Tips:: Advice and coding conventions for Emacs Lisp. 187* Tips:: Advice and coding conventions for Emacs Lisp.
188* GNU Emacs Internals:: Building and dumping Emacs; 188* GNU Emacs Internals:: Building and dumping Emacs;
189 internal data structures. 189 internal data structures.
190* Standard Errors:: List of all error symbols. 190* Standard Errors:: List of some standard error symbols.
191* Standard Buffer-Local Variables:: 191* Standard Keymaps:: List of some standard keymaps.
192 List of variables buffer-local in all buffers. 192* Standard Hooks:: List of some standard hook variables.
193* Standard Keymaps:: List of standard keymaps.
194* Standard Hooks:: List of standard hook variables.
195 193
196* Index:: Index including concepts, functions, variables, 194* Index:: Index including concepts, functions, variables,
197 and other terms. 195 and other terms.
@@ -929,7 +927,7 @@ Buffers
929 is visited. 927 is visited.
930* Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved. 928* Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved.
931* Modification Time:: Determining whether the visited file was changed 929* Modification Time:: Determining whether the visited file was changed
932 ``behind Emacs's back''. 930 "behind Emacs's back".
933* Read Only Buffers:: Modifying text is not allowed in a 931* Read Only Buffers:: Modifying text is not allowed in a
934 read-only buffer. 932 read-only buffer.
935* The Buffer List:: How to look at all the existing buffers. 933* The Buffer List:: How to look at all the existing buffers.
@@ -996,7 +994,7 @@ Frames
996* Window System Selections::Transferring text to and from other X clients. 994* Window System Selections::Transferring text to and from other X clients.
997* Drag and Drop:: Internals of Drag-and-Drop implementation. 995* Drag and Drop:: Internals of Drag-and-Drop implementation.
998* Color Names:: Getting the definitions of color names. 996* Color Names:: Getting the definitions of color names.
999* Text Terminal Colors:: Defining colors for text-only terminals. 997* Text Terminal Colors:: Defining colors for text terminals.
1000* Resources:: Getting resource values from the server. 998* Resources:: Getting resource values from the server.
1001* Display Feature Testing:: Determining the features of a terminal. 999* Display Feature Testing:: Determining the features of a terminal.
1002 1000
@@ -1210,7 +1208,6 @@ Parsing Expressions
1210 1208
1211Abbrevs and Abbrev Expansion 1209Abbrevs and Abbrev Expansion
1212 1210
1213* Abbrev Mode:: Setting up Emacs for abbreviation.
1214* Abbrev Tables:: Creating and working with abbrev tables. 1211* Abbrev Tables:: Creating and working with abbrev tables.
1215* Defining Abbrevs:: Specifying abbreviations and their expansions. 1212* Defining Abbrevs:: Specifying abbreviations and their expansions.
1216* Abbrev Files:: Saving abbrevs in files. 1213* Abbrev Files:: Saving abbrevs in files.
@@ -1287,7 +1284,7 @@ Emacs Display
1287* Display Property:: Enabling special display features. 1284* Display Property:: Enabling special display features.
1288* Images:: Displaying images in Emacs buffers. 1285* Images:: Displaying images in Emacs buffers.
1289* Buttons:: Adding clickable buttons to Emacs buffers. 1286* Buttons:: Adding clickable buttons to Emacs buffers.
1290* Abstract Display:: Emacs' Widget for Object Collections. 1287* Abstract Display:: Emacs's Widget for Object Collections.
1291* Blinking:: How Emacs shows the matching open parenthesis. 1288* Blinking:: How Emacs shows the matching open parenthesis.
1292* Usual Display:: The usual conventions for displaying 1289* Usual Display:: The usual conventions for displaying
1293 nonprinting chars. 1290 nonprinting chars.
@@ -1532,7 +1529,6 @@ Object Internals
1532@c include tips.texi 1529@c include tips.texi
1533@c include internals.texi 1530@c include internals.texi
1534@c include errors.texi 1531@c include errors.texi
1535@c include locals.texi
1536@c include maps.texi 1532@c include maps.texi
1537@c include hooks.texi 1533@c include hooks.texi
1538 1534
diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi
index 0f6b020db49..97b21aba10b 100644
--- a/doc/lispref/vol2.texi
+++ b/doc/lispref/vol2.texi
@@ -186,11 +186,9 @@ Appendices
186* Tips:: Advice and coding conventions for Emacs Lisp. 186* Tips:: Advice and coding conventions for Emacs Lisp.
187* GNU Emacs Internals:: Building and dumping Emacs; 187* GNU Emacs Internals:: Building and dumping Emacs;
188 internal data structures. 188 internal data structures.
189* Standard Errors:: List of all error symbols. 189* Standard Errors:: List of some standard error symbols.
190* Standard Buffer-Local Variables:: 190* Standard Keymaps:: List of some standard keymaps.
191 List of variables buffer-local in all buffers. 191* Standard Hooks:: List of some standard hook variables.
192* Standard Keymaps:: List of standard keymaps.
193* Standard Hooks:: List of standard hook variables.
194 192
195* Index:: Index including concepts, functions, variables, 193* Index:: Index including concepts, functions, variables,
196 and other terms. 194 and other terms.
@@ -928,7 +926,7 @@ Buffers
928 is visited. 926 is visited.
929* Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved. 927* Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved.
930* Modification Time:: Determining whether the visited file was changed 928* Modification Time:: Determining whether the visited file was changed
931 ``behind Emacs's back''. 929 "behind Emacs's back".
932* Read Only Buffers:: Modifying text is not allowed in a 930* Read Only Buffers:: Modifying text is not allowed in a
933 read-only buffer. 931 read-only buffer.
934* The Buffer List:: How to look at all the existing buffers. 932* The Buffer List:: How to look at all the existing buffers.
@@ -995,7 +993,7 @@ Frames
995* Window System Selections::Transferring text to and from other X clients. 993* Window System Selections::Transferring text to and from other X clients.
996* Drag and Drop:: Internals of Drag-and-Drop implementation. 994* Drag and Drop:: Internals of Drag-and-Drop implementation.
997* Color Names:: Getting the definitions of color names. 995* Color Names:: Getting the definitions of color names.
998* Text Terminal Colors:: Defining colors for text-only terminals. 996* Text Terminal Colors:: Defining colors for text terminals.
999* Resources:: Getting resource values from the server. 997* Resources:: Getting resource values from the server.
1000* Display Feature Testing:: Determining the features of a terminal. 998* Display Feature Testing:: Determining the features of a terminal.
1001 999
@@ -1209,7 +1207,6 @@ Parsing Expressions
1209 1207
1210Abbrevs and Abbrev Expansion 1208Abbrevs and Abbrev Expansion
1211 1209
1212* Abbrev Mode:: Setting up Emacs for abbreviation.
1213* Abbrev Tables:: Creating and working with abbrev tables. 1210* Abbrev Tables:: Creating and working with abbrev tables.
1214* Defining Abbrevs:: Specifying abbreviations and their expansions. 1211* Defining Abbrevs:: Specifying abbreviations and their expansions.
1215* Abbrev Files:: Saving abbrevs in files. 1212* Abbrev Files:: Saving abbrevs in files.
@@ -1286,7 +1283,7 @@ Emacs Display
1286* Display Property:: Enabling special display features. 1283* Display Property:: Enabling special display features.
1287* Images:: Displaying images in Emacs buffers. 1284* Images:: Displaying images in Emacs buffers.
1288* Buttons:: Adding clickable buttons to Emacs buffers. 1285* Buttons:: Adding clickable buttons to Emacs buffers.
1289* Abstract Display:: Emacs' Widget for Object Collections. 1286* Abstract Display:: Emacs's Widget for Object Collections.
1290* Blinking:: How Emacs shows the matching open parenthesis. 1287* Blinking:: How Emacs shows the matching open parenthesis.
1291* Usual Display:: The usual conventions for displaying 1288* Usual Display:: The usual conventions for displaying
1292 nonprinting chars. 1289 nonprinting chars.
@@ -1531,7 +1528,6 @@ Object Internals
1531@include tips.texi 1528@include tips.texi
1532@include internals.texi 1529@include internals.texi
1533@include errors.texi 1530@include errors.texi
1534@include locals.texi
1535@include maps.texi 1531@include maps.texi
1536@include hooks.texi 1532@include hooks.texi
1537 1533
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index 98263f4093c..07be7fa9079 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -68,7 +68,7 @@ window, and the contents of the selected message in another window.
68graphical desktop environments and window systems, such as the X 68graphical desktop environments and window systems, such as the X
69Window System. When Emacs is run on X, each of its graphical X 69Window System. When Emacs is run on X, each of its graphical X
70windows is an Emacs frame (containing one or more Emacs windows). 70windows is an Emacs frame (containing one or more Emacs windows).
71When Emacs is run on a text-only terminal, the frame fills the entire 71When Emacs is run on a text terminal, the frame fills the entire
72terminal screen. 72terminal screen.
73 73
74@cindex tiled windows 74@cindex tiled windows
@@ -2964,8 +2964,8 @@ the bottommost row.
2964 2964
2965Note that these are the actual outer edges of the window, including 2965Note that these are the actual outer edges of the window, including
2966any header line, mode line, scroll bar, fringes, and display margins. 2966any header line, mode line, scroll bar, fringes, and display margins.
2967On a text-only terminal, if the window has a neighbor on its right, 2967On a text terminal, if the window has a neighbor on its right, its
2968its right edge includes the separator line between the window and its 2968right edge includes the separator line between the window and its
2969neighbor. 2969neighbor.
2970@end defun 2970@end defun
2971 2971
@@ -3046,8 +3046,8 @@ argument because it always uses the frame that @var{window} is on.
3046 3046
3047 The following functions return window positions in pixels, rather 3047 The following functions return window positions in pixels, rather
3048than character units. Though mostly useful on graphical displays, 3048than character units. Though mostly useful on graphical displays,
3049they can also be called on text-only terminals, where the screen area 3049they can also be called on text terminals, where the screen area of
3050of each text character is taken to be ``one pixel''. 3050each text character is taken to be ``one pixel''.
3051 3051
3052@defun window-pixel-edges &optional window 3052@defun window-pixel-edges &optional window
3053This function returns a list of pixel coordinates for the edges of 3053This function returns a list of pixel coordinates for the edges of