aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/ChangeLog73
-rw-r--r--doc/emacs/basic.texi349
-rw-r--r--doc/emacs/commands.texi116
-rw-r--r--doc/emacs/emacs.texi7
-rw-r--r--doc/emacs/entering.texi117
-rw-r--r--doc/emacs/files.texi4
-rw-r--r--doc/emacs/frames.texi3
-rw-r--r--doc/emacs/help.texi432
-rw-r--r--doc/emacs/mini.texi516
-rw-r--r--doc/emacs/misc.texi4
-rw-r--r--doc/emacs/mule.texi11
-rw-r--r--doc/emacs/screen.texi320
-rw-r--r--doc/emacs/text.texi6
-rw-r--r--doc/lispref/ChangeLog20
-rw-r--r--doc/lispref/buffers.texi33
-rw-r--r--doc/lispref/display.texi31
-rw-r--r--doc/lispref/positions.texi2
-rw-r--r--doc/lispref/symbols.texi2
-rw-r--r--doc/lispref/windows.texi67
-rw-r--r--doc/man/ChangeLog4
-rw-r--r--doc/man/emacsclient.14
-rw-r--r--doc/misc/ChangeLog9
-rw-r--r--doc/misc/Makefile.in13
-rw-r--r--doc/misc/gnus.texi14
24 files changed, 1144 insertions, 1013 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 7d883a6eb91..6adbe95cc97 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,76 @@
12011-10-09 Chong Yidong <cyd@stupidchicken.com>
2
3 * help.texi (Help, Help Summary): Eliminate the unnecessary "help
4 option" terminology.
5 (Key Help): Add command names. Define "documentation string".
6 (Name Help): Remove an over-long joke.
7 (Apropos): Document prefix args. Remove duplicated descriptions.
8 (Help Mode): Add C-c C-b to table. Update TAB binding.
9 (Package Keywords): Rename from "Library by Keyword". Describe
10 new package menu interface.
11 (Help Files, Help Echo): Tweak description.
12
13 * mini.texi (Completion Options): Add completion-cycle-threshold.
14 (Minibuffer History): Document numeric args to history commands.
15
162011-10-08 Eli Zaretskii <eliz@gnu.org>
17
18 * mule.texi (Bidirectional Editing): Correct some inaccuracies.
19
202011-10-08 Chong Yidong <cyd@stupidchicken.com>
21
22 * basic.texi (Position Info): Omit page commands. Document
23 count-words-region and count-words.
24
25 * text.texi (Pages): Move what-page documentation here.
26
272011-10-08 Chong Yidong <cyd@stupidchicken.com>
28
29 * mini.texi (Minibuffer File): Minor copyedits. Use xref to
30 Remote Files node instead of linking directly to the Tramp manual.
31 (Minibuffer Edit): Add xref to Blank Lines.
32 (Completion): Add xref to Symbol Completion. Remove redundant
33 example, which is repeated in the next node.
34 (Completion Commands): Minor clarifications.
35 (Completion Styles): New node, split from Completion Commands.
36 Document substring and initials styles.
37 (Strict Completion): Remove information duplicated in other nodes.
38 (Completion Options): Consolidate case difference discussion here.
39
40 * help.texi (Help Mode): Fix kindex entries.
41
42 * files.texi (File Names): Add index entries.
43
442011-10-07 Chong Yidong <cyd@stupidchicken.com>
45
46 * basic.texi (Inserting Text): Add xref to Completion. Add
47 ucs-insert example, and document prefix argument.
48 (Moving Point): Fix introduction; C-f/C-b are no longer equivalent
49 to left/right. Tweak left-char and right-char descriptions.
50 M-left and M-right are now bound to left-word/right-word.
51 (Erasing): Document delete-forward-char.
52
53 * screen.texi (Screen, Menu Bar): Copyedits.
54 (Point): Remove duplicate paragraph on cursors, also in Screen.
55 (Mode Line): Trailing dashes no longer shown on X displays.
56
57 * frames.texi (Non-Window Terminals): Index just "text-only
58 terminal", which is used throughout the manual now.
59
60 * entering.texi (Entering Emacs): Define "startup screen".
61 Document window-splitting behavior with command-line inputs.
62 (Exiting): Remove obsolete paragraph about shells without suspend
63 functionality.
64
65 * commands.texi (User Input): Define "input event" more clearly.
66 (Keys): Add xref to Echo Area.
67 (Commands): Clarify relation between commands and functions.
68
692011-10-06 Chong Yidong <cyd@stupidchicken.com>
70
71 * misc.texi (emacsclient Options): Document how emacsclient runs
72 the Emacs daemon (Bug#9674).
73
12011-10-01 Chong Yidong <cyd@stupidchicken.com> 742011-10-01 Chong Yidong <cyd@stupidchicken.com>
2 75
3 * basic.texi (Moving Point): 76 * basic.texi (Moving Point):
diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi
index 8c8708a3b51..e4e7dadd548 100644
--- a/doc/emacs/basic.texi
+++ b/doc/emacs/basic.texi
@@ -10,7 +10,7 @@
10 Here we explain the basics of how to enter text, make corrections, 10 Here we explain the basics of how to enter text, make corrections,
11and save the text in a file. If this material is new to you, we 11and save the text in a file. If this material is new to you, we
12suggest you first run the Emacs learn-by-doing tutorial, by typing 12suggest you first run the Emacs learn-by-doing tutorial, by typing
13@kbd{Control-h t} inside Emacs. (@code{help-with-tutorial}). 13@kbd{C-h t} (@code{help-with-tutorial}).
14 14
15@menu 15@menu
16 16
@@ -23,7 +23,7 @@ suggest you first run the Emacs learn-by-doing tutorial, by typing
23* Help: Basic Help. Asking what a character does. 23* Help: Basic Help. Asking what a character does.
24* Blank Lines:: Making and deleting blank lines. 24* Blank Lines:: Making and deleting blank lines.
25* Continuation Lines:: How Emacs displays lines too wide for the screen. 25* Continuation Lines:: How Emacs displays lines too wide for the screen.
26* Position Info:: What page, line, row, or column is point on? 26* Position Info:: What line, row, or column is point on?
27* Arguments:: Numeric arguments for repeating a command N times. 27* Arguments:: Numeric arguments for repeating a command N times.
28* Repeating:: Repeating the previous command quickly. 28* Repeating:: Repeating the previous command quickly.
29@end menu 29@end menu
@@ -41,20 +41,20 @@ forward, so that point remains just after the inserted text.
41 41
42@kindex RET 42@kindex RET
43@cindex newline 43@cindex newline
44 To end a line and start a new one, type @key{RET}. This key may be 44 To end a line and start a new one, type @key{RET} (@code{newline}).
45labeled @key{Return} or @key{Enter} on your keyboard, but we refer to 45(The @key{RET} key may be labeled @key{Return} or @key{Enter} on your
46it as @key{RET} in this manual. Pressing it inserts a newline 46keyboard, but we refer to it as @key{RET} in this manual.) This
47character in the buffer. If point is at the end of the line, this 47command inserts a newline character into the buffer. If point is at
48creates a new blank line after it; if point is in the middle of a 48the end of the line, the effect is to create a new blank line after
49line, the line is split at that position. 49it; if point is in the middle of a line, the line is split at that
50position.
50 51
51 As we explain later in this manual, you can change the way Emacs 52 As we explain later in this manual, you can change the way Emacs
52handles text insertion by turning on @dfn{minor modes}. For instance, 53handles text insertion by turning on @dfn{minor modes}. For instance,
53if you turn on a minor mode called @dfn{Auto Fill} mode, Emacs can 54the minor mode called Auto Fill mode splits lines automatically when
54split lines automatically when they become too long (@pxref{Filling}). 55they get too long (@pxref{Filling}). The minor mode called Overwrite
55If you turn on a minor mode called @dfn{Overwrite} mode, inserted 56mode causes inserted characters to replace (overwrite) existing text,
56characters replace (overwrite) existing text, instead of shoving it to 57instead of shoving it to the right. @xref{Minor Modes}.
57the right. @xref{Minor Modes}.
58 58
59@cindex quoting 59@cindex quoting
60@kindex C-q 60@kindex C-q
@@ -80,9 +80,10 @@ literal @samp{DEL} character.
80@kbd{C-q} followed by a sequence of octal digits inserts the character 80@kbd{C-q} followed by a sequence of octal digits inserts the character
81with the specified octal character code. You can use any number of 81with the specified octal character code. You can use any number of
82octal digits; any non-digit terminates the sequence. If the 82octal digits; any non-digit terminates the sequence. If the
83terminating character is @key{RET}, it serves only to terminate the 83terminating character is @key{RET}, that @key{RET} serves only to
84sequence. Any other non-digit terminates the sequence and then acts 84terminate the sequence. Any other non-digit terminates the sequence
85as normal input---thus, @kbd{C-q 1 0 1 B} inserts @samp{AB}. 85and then acts as normal input---thus, @kbd{C-q 1 0 1 B} inserts
86@samp{AB}.
86 87
87The use of octal sequences is disabled in ordinary non-binary 88The use of octal sequences is disabled in ordinary non-binary
88Overwrite mode, to give you a convenient way to insert a digit instead 89Overwrite mode, to give you a convenient way to insert a digit instead
@@ -96,21 +97,28 @@ To use decimal or hexadecimal instead of octal, set the variable
96the letters @kbd{a} to @kbd{f} serve as part of a character code, 97the letters @kbd{a} to @kbd{f} serve as part of a character code,
97just like digits. Case is ignored. 98just like digits. Case is ignored.
98 99
99 A numeric argument tells @kbd{C-q} how many copies of the quoted
100character to insert (@pxref{Arguments}).
101
102@findex ucs-insert 100@findex ucs-insert
103@kindex C-x 8 RET 101@kindex C-x 8 RET
104@cindex Unicode characters, inserting 102@cindex Unicode characters, inserting
105@cindex insert Unicode character 103@cindex insert Unicode character
106@cindex characters, inserting by name or code-point 104@cindex characters, inserting by name or code-point
107 Instead of @kbd{C-q}, you can use @kbd{C-x 8 @key{RET}} 105 Instead of @kbd{C-q}, you can use the command @kbd{C-x 8 @key{RET}}
108(@code{ucs-insert}) to insert a character based on its Unicode name or 106(@code{ucs-insert}). This prompts for the Unicode name or code-point
109code-point. This command prompts for a character to insert, using 107of a character, using the minibuffer. If you enter a name, the
110the minibuffer; you can specify the character using either (i) the 108command provides completion (@pxref{Completion}). If you enter a
111character's name in the Unicode standard, or (ii) the character's 109code-point, it should be a hexadecimal number (which is the convention
112code-point in the Unicode standard. If you specify the character's 110for Unicode). The command then inserts the corresponding character
113name, the command provides completion. 111into the buffer. For example, both of the following insert the
112infinity sign (Unicode code-point @code{#x221E}):
113
114@example
115@kbd{C-x 8 @key{RET} infinity @key{RET}}
116@kbd{C-x 8 @key{RET} 221e @key{RET}}
117@end example
118
119 A numeric argument to either @kbd{C-q} or @kbd{C-x 8 @key{RET}}
120specifies how many copies of the character to insert
121(@pxref{Arguments}).
114 122
115@node Moving Point 123@node Moving Point
116@section Changing the Location of Point 124@section Changing the Location of Point
@@ -123,85 +131,104 @@ name, the command provides completion.
123 To do more than insert characters, you have to know how to move 131 To do more than insert characters, you have to know how to move
124point (@pxref{Point}). The keyboard commands @kbd{C-f}, @kbd{C-b}, 132point (@pxref{Point}). The keyboard commands @kbd{C-f}, @kbd{C-b},
125@kbd{C-n}, and @kbd{C-p} move point to the right, left, up and down 133@kbd{C-n}, and @kbd{C-p} move point to the right, left, up and down
126respectively. These are equivalent to the commands @kbd{@key{right}}, 134respectively. You can also move point using the @dfn{arrow keys}
127@kbd{@key{left}}, @kbd{@key{down}}, and @kbd{@key{up}}, entered using 135present on most keyboards: @kbd{@key{right}}, @kbd{@key{left}},
128the @dfn{arrow keys} present on many keyboards. Many Emacs users find 136@kbd{@key{down}}, and @kbd{@key{up}}; however, many Emacs users find
129that it is slower to use the arrow keys than the equivalent control 137that it is slower to use the arrow keys than the control keys.
130keys. You can also click the left mouse button to move point to the 138
139 You can also click the left mouse button to move point to the
131position clicked. Emacs also provides a variety of additional 140position clicked. Emacs also provides a variety of additional
132keyboard commands that move point in more sophisticated ways. 141keyboard commands that move point in more sophisticated ways.
133 142
134@kindex C-a 143@table @kbd
135@kindex C-e 144
145@item C-f
136@kindex C-f 146@kindex C-f
137@kindex C-b
138@kindex C-n
139@kindex C-p
140@kindex M->
141@kindex M-<
142@kindex M-r
143@kindex LEFT
144@kindex RIGHT
145@kindex UP
146@kindex DOWN
147@findex move-beginning-of-line
148@findex move-end-of-line
149@findex forward-char 147@findex forward-char
150@findex backward-char 148Move forward one character (@code{forward-char}).
149
150@item @key{right}
151@kindex RIGHT
151@findex right-char 152@findex right-char
153This command (@code{right-char}) behaves like @kbd{C-f}, with one
154exception: when editing right-to-left scripts such as Arabic, it
155instead moves @emph{backward} if the current paragraph is a
156right-to-left paragraph. @xref{Bidirectional Editing}.
157
158@item C-b
159@kindex C-b
160@findex backward-char
161Move backward one character (@code{backward-char}).
162
163@item @key{left}
164@kindex LEFT
152@findex left-char 165@findex left-char
166This command (@code{left-char}) behaves like @kbd{C-b}, except it
167moves @emph{forward} if the current paragraph is right-to-left.
168@xref{Bidirectional Editing}.
169
170@item C-n
171@itemx @key{down}
172@kindex C-n
173@kindex DOWN
153@findex next-line 174@findex next-line
175Move down one screen line (@code{next-line}). This command attempts
176to keep the horizontal position unchanged, so if you start in the
177middle of one line, you move to the middle of the next.
178
179@item C-p
180@itemx @key{up}
181@kindex C-p
182@kindex UP
154@findex previous-line 183@findex previous-line
155@findex beginning-of-buffer 184Move up one screen line (@code{previous-line}). This command
156@findex end-of-buffer 185preserves position within the line, like @kbd{C-n}.
157@findex goto-char 186
158@findex goto-line
159@findex move-to-window-line
160@table @kbd
161@item C-a 187@item C-a
162@itemx @key{Home} 188@itemx @key{Home}
189@kindex C-a
190@kindex HOME
191@findex move-beginning-of-line
163Move to the beginning of the line (@code{move-beginning-of-line}). 192Move to the beginning of the line (@code{move-beginning-of-line}).
193
164@item C-e 194@item C-e
165@itemx @key{End} 195@itemx @key{End}
196@kindex C-e
197@kindex END
198@findex move-end-of-line
166Move to the end of the line (@code{move-end-of-line}). 199Move to the end of the line (@code{move-end-of-line}).
167@item C-f 200
168Move forward one character (@code{forward-char}).
169@item @key{right}
170Move one character to the right (@code{right-char}). This
171moves one character forward in text that is read in the usual
172left-to-right direction, but one character @emph{backward} if the text
173is read right-to-left, as needed for right-to-left scripts such as
174Arabic. @xref{Bidirectional Editing}.
175@item C-b
176Move backward one character (@code{backward-char}).
177@item @key{left}
178Move one character to the left (@code{left-char}). This
179moves one character backward in left-to-right text and one character
180forward in right-to-left text.
181@item M-f 201@item M-f
182@itemx M-@key{right} 202@kindex M-f
203@findex forward-word
183Move forward one word (@code{forward-word}). 204Move forward one word (@code{forward-word}).
205
184@item C-@key{right} 206@item C-@key{right}
185Move one word to the right (@code{right-word}). This moves one word 207@itemx M-@key{right}
186forward in left-to-right text and one word backward in right-to-left 208@kindex C-RIGHT
187text. 209@kindex M-RIGHT
210@findex right-word
211This command (@code{right-word}) behaves like @kbd{M-f}, except it
212moves @emph{backward} by one word if the current paragraph is
213right-to-left. @xref{Bidirectional Editing}.
214
188@item M-b 215@item M-b
189@itemx M-@key{left} 216@kindex M-b
217@findex backward-word
190Move backward one word (@code{backward-word}). 218Move backward one word (@code{backward-word}).
219
191@item C-@key{left} 220@item C-@key{left}
192Move one word to the left (@code{left-word}). This moves one word 221@itemx M-@key{left}
193backward in left-to-right text and one word forward in right-to-left 222@kindex C-LEFT
194text. 223@kindex M-LEFT
195@item C-n 224@findex left-word
196@itemx @key{down} 225This command (@code{left-word}) behaves like @kbd{M-f}, except it
197Move down one screen line (@code{next-line}). This command attempts 226moves @emph{forward} by one word if the current paragraph is
198to keep the horizontal position unchanged, so if you start in the 227right-to-left. @xref{Bidirectional Editing}.
199middle of one line, you move to the middle of the next. 228
200@item C-p
201@itemx @key{up}
202Move up one screen line (@code{previous-line}). This command
203preserves position within the line, like @kbd{C-n}.
204@item M-r 229@item M-r
230@kindex M-r
231@findex move-to-window-line-top-bottom
205Without moving the text on the screen, reposition point on the left 232Without moving the text on the screen, reposition point on the left
206margin of the center-most text line of the window; on subsequent 233margin of the center-most text line of the window; on subsequent
207consecutive invocations, move point to the left margin of the top-most 234consecutive invocations, move point to the left margin of the top-most
@@ -211,13 +238,18 @@ line, the bottom-most line, and so forth, in cyclic order
211A numeric argument says which screen line to place point on, counting 238A numeric argument says which screen line to place point on, counting
212downward from the top of the window (zero means the top line). A 239downward from the top of the window (zero means the top line). A
213negative argument counts lines up from the bottom (@minus{}1 means the 240negative argument counts lines up from the bottom (@minus{}1 means the
214bottom line). 241bottom line). @xref{Arguments}, for more information on numeric
242arguments.
215 243
216@item M-< 244@item M-<
245@kindex M-<
246@findex beginning-of-buffer
217Move to the top of the buffer (@code{beginning-of-buffer}). With 247Move to the top of the buffer (@code{beginning-of-buffer}). With
218numeric argument @var{n}, move to @var{n}/10 of the way from the top. 248numeric argument @var{n}, move to @var{n}/10 of the way from the top.
219@xref{Arguments}, for more information on numeric arguments.@refill 249
220@item M-> 250@item M->
251@kindex M->
252@findex end-of-buffer
221Move to the end of the buffer (@code{end-of-buffer}). 253Move to the end of the buffer (@code{end-of-buffer}).
222 254
223@item C-v 255@item C-v
@@ -233,10 +265,15 @@ Scroll one screen backward, and move point onscreen if necessary
233(@code{scroll-down-command}). @xref{Scrolling}. 265(@code{scroll-down-command}). @xref{Scrolling}.
234 266
235@item M-x goto-char 267@item M-x goto-char
268@findex goto-char
236Read a number @var{n} and move point to buffer position @var{n}. 269Read a number @var{n} and move point to buffer position @var{n}.
237Position 1 is the beginning of the buffer. 270Position 1 is the beginning of the buffer.
271
238@item M-g M-g 272@item M-g M-g
239@itemx M-g g 273@itemx M-g g
274@kindex M-g M-g
275@kindex M-g g
276@findex goto-line
240Read a number @var{n} and move point to the beginning of line number 277Read a number @var{n} and move point to the beginning of line number
241@var{n} (@code{goto-line}). Line 1 is the beginning of the buffer. If 278@var{n} (@code{goto-line}). Line 1 is the beginning of the buffer. If
242point is on or just after a number in the buffer, that is the default 279point is on or just after a number in the buffer, that is the default
@@ -244,14 +281,16 @@ for @var{n}. Just type @key{RET} in the minibuffer to use it. You can
244also specify @var{n} by giving @kbd{M-g M-g} a numeric prefix argument. 281also specify @var{n} by giving @kbd{M-g M-g} a numeric prefix argument.
245@xref{Select Buffer}, for the behavior of @kbd{M-g M-g} when you give it 282@xref{Select Buffer}, for the behavior of @kbd{M-g M-g} when you give it
246a plain prefix argument. 283a plain prefix argument.
284
247@item C-x C-n 285@item C-x C-n
248@findex set-goal-column
249@kindex C-x C-n 286@kindex C-x C-n
287@findex set-goal-column
250Use the current column of point as the @dfn{semipermanent goal column} 288Use the current column of point as the @dfn{semipermanent goal column}
251for @kbd{C-n} and @kbd{C-p} (@code{set-goal-column}). When a 289for @kbd{C-n} and @kbd{C-p} (@code{set-goal-column}). When a
252semipermanent goal column is in effect, those commands always try to 290semipermanent goal column is in effect, those commands always try to
253move to this column, or as close as possible to it, after moving 291move to this column, or as close as possible to it, after moving
254vertically. The goal column remains in effect until canceled. 292vertically. The goal column remains in effect until canceled.
293
255@item C-u C-x C-n 294@item C-u C-x C-n
256Cancel the goal column. Henceforth, @kbd{C-n} and @kbd{C-p} try to 295Cancel the goal column. Henceforth, @kbd{C-n} and @kbd{C-p} try to
257preserve the horizontal position, as usual. 296preserve the horizontal position, as usual.
@@ -266,9 +305,8 @@ can force these commands to move according to @dfn{logical lines}
266(i.e., according to the text lines in the buffer) by setting the 305(i.e., according to the text lines in the buffer) by setting the
267variable @code{line-move-visual} to @code{nil}; if a logical line 306variable @code{line-move-visual} to @code{nil}; if a logical line
268occupies multiple screen lines, the cursor then skips over the 307occupies multiple screen lines, the cursor then skips over the
269additional screen lines. Moving by logical lines was the default 308additional screen lines. For details, see @ref{Continuation Lines}.
270behavior prior to Emacs 23.1. For details, see @ref{Continuation 309@xref{Variables}, for how to set variables such as
271Lines}. @xref{Variables}, for how to set variables such as
272@code{line-move-visual}. 310@code{line-move-visual}.
273 311
274 Unlike @kbd{C-n} and @kbd{C-p}, most of the Emacs commands that work 312 Unlike @kbd{C-n} and @kbd{C-p}, most of the Emacs commands that work
@@ -288,21 +326,30 @@ the end of the next logical line. Normally, @code{track-eol} is
288 326
289@vindex next-line-add-newlines 327@vindex next-line-add-newlines
290 @kbd{C-n} normally stops at the end of the buffer when you use it on 328 @kbd{C-n} normally stops at the end of the buffer when you use it on
291the last line of the buffer. However, if you set the variable 329the last line in the buffer. However, if you set the variable
292@code{next-line-add-newlines} to a non-@code{nil} value, @kbd{C-n} on 330@code{next-line-add-newlines} to a non-@code{nil} value, @kbd{C-n} on
293the last line of a buffer creates an additional line at the end and 331the last line of a buffer creates an additional line at the end and
294moves down into it. 332moves down into it.
295 333
296@node Erasing 334@node Erasing
297@section Erasing Text 335@section Erasing Text
336@cindex killing characters and lines
337@cindex deleting characters and lines
338@cindex erasing characters and lines
298 339
299@table @kbd 340@table @kbd
300@item @key{DEL} 341@item @key{DEL}
301@itemx @key{Backspace} 342@itemx @key{Backspace}
302Delete the character before point (@code{delete-backward-char}). 343Delete the character before point, or the region if it is active
303@item C-d 344(@code{delete-backward-char}).
345
304@itemx @key{Delete} 346@itemx @key{Delete}
347Delete the character after point, or the region if it is active
348(@code{delete-forward-char}).
349
350@item C-d
305Delete the character after point (@code{delete-char}). 351Delete the character after point (@code{delete-char}).
352
306@item C-k 353@item C-k
307Kill to the end of the line (@code{kill-line}). 354Kill to the end of the line (@code{kill-line}).
308@item M-d 355@item M-d
@@ -312,37 +359,40 @@ Kill back to the beginning of the previous word
312(@code{backward-kill-word}). 359(@code{backward-kill-word}).
313@end table 360@end table
314 361
315 The key @kbd{@key{DEL}} (@code{delete-backward-char}) removes the 362 The @kbd{@key{DEL}} (@code{delete-backward-char}) command removes
316character before point, moving the cursor and all the characters after 363the character before point, moving the cursor and the characters after
317it backwards. On most keyboards, @key{DEL} is labelled 364it backwards. If point was at the beginning of a line, this deletes
318@key{Backspace}, but we refer to it as @key{DEL} in this manual. Do 365the preceding newline, joining this line to the previous one.
319not confuse @key{DEL} with another key, labelled @key{Delete}, that
320exists on many keyboards; we will discuss @key{Delete} momentarily.
321 366
322 Typing @key{DEL} when the cursor is at the beginning of a line 367 If, however, the region is active, @kbd{@key{DEL}} instead deletes
323deletes the preceding newline character, joining the line with the one 368the text in the region. @xref{Mark}, for a description of the region.
324before it.
325 369
326 On some text-only terminals, Emacs may not recognize the @key{DEL} 370 On most keyboards, @key{DEL} is labelled @key{Backspace}, but we
327key properly. If @key{DEL} does not do the right thing (e.g., if it 371refer to it as @key{DEL} in this manual. (Do not confuse @key{DEL}
328deletes characters forwards), see @ref{DEL Does Not Delete}. 372with the @key{Delete} key; we will discuss @key{Delete} momentarily.)
373On some text-only terminals, Emacs may not recognize the @key{DEL} key
374properly. @xref{DEL Does Not Delete}, if you encounter this problem.
329 375
330@cindex killing characters and lines 376 The @key{delete} (@code{delete-forward-char}) command deletes in the
331@cindex deleting characters and lines 377``opposite direction'': it deletes the character after point, i.e. the
332@cindex erasing characters and lines 378character under the cursor. If point was at the end of a line, this
333 The key @kbd{C-d} (@code{delete-char}) deletes the character after 379joins the following line onto this one. Like @kbd{@key{DEL}}, it
334point, i.e., the character under the cursor. This shifts the rest of 380deletes the text in the region if the region is active (@pxref{Mark}).
335the text on the line to the left. If you type @kbd{C-d} at the end of 381
336a line, it joins that line with the following line. This command is 382 @kbd{C-d} (@code{delete-char}) deletes the character after point,
337also bound to the key labelled @key{Delete} on many keyboards. 383similar to @key{delete}, but regardless of whether the region is
384active.
338 385
339 To erase a larger amount of text, use the @kbd{C-k} key, which 386 @xref{Deletion}, for more detailed information about the above
340erases (kills) a line at a time. If you type @kbd{C-k} at the 387deletion commands.
341beginning or middle of a line, it kills all the text up to the end of
342the line. If you type @kbd{C-k} at the end of a line, it joins that
343line with the following line.
344 388
345 To learn more about killing text, see @ref{Killing}. 389 @kbd{C-k} (@code{kill-line}) erases (kills) a line at a time. If
390you type @kbd{C-k} at the beginning or middle of a line, it kills all
391the text up to the end of the line. If you type @kbd{C-k} at the end
392of a line, it joins that line with the following line.
393
394 @xref{Killing}, for more information about @kbd{C-k} and related
395commands.
346 396
347@node Basic Undo 397@node Basic Undo
348@section Undoing Changes 398@section Undoing Changes
@@ -352,7 +402,7 @@ line with the following line.
352Undo one entry of the undo records---usually, one command worth 402Undo one entry of the undo records---usually, one command worth
353(@code{undo}). 403(@code{undo}).
354@itemx C-x u 404@itemx C-x u
355@item C-_ 405@itemx C-_
356The same. 406The same.
357@end table 407@end table
358 408
@@ -379,10 +429,7 @@ command displays an error message and does nothing.
379 429
380 Text that you insert in an Emacs buffer lasts only as long as the 430 Text that you insert in an Emacs buffer lasts only as long as the
381Emacs session. To keep any text permanently, you must put it in a 431Emacs session. To keep any text permanently, you must put it in a
382@dfn{file}. Files are named units of text which are stored by the 432@dfn{file}.
383operating system for you to retrieve later by name. To use the
384contents of a file in any way, including editing it with Emacs, you
385must specify the file name.
386 433
387 Suppose there is a file named @file{test.emacs} in your home 434 Suppose there is a file named @file{test.emacs} in your home
388directory. To begin editing this file in Emacs, type 435directory. To begin editing this file in Emacs, type
@@ -417,14 +464,15 @@ first time you save this buffer with @kbd{C-x C-s}.
417@section Help 464@section Help
418 465
419@cindex getting help with keys 466@cindex getting help with keys
420 If you forget what a key does, you can find out with the Help 467 If you forget what a key does, you can find out by typing @kbd{C-h
421character, which is @kbd{C-h} (or @key{F1}, which is an alias for 468k} (@code{describe-key}), followed by the key of interest; for
422@kbd{C-h}). Type @kbd{C-h k}, followed by the key of interest; for 469example, @kbd{C-h k C-n} tells you what @kbd{C-n} does.
423example, @kbd{C-h k C-n} tells you what @kbd{C-n} does. @kbd{C-h} is 470
424a prefix key; @kbd{C-h k} is just one of its subcommands (the command 471 The prefix key @kbd{C-h} stands for ``help''. The key @key{F1}
425@code{describe-key}). The other subcommands of @kbd{C-h} provide 472serves as an alias for @kbd{C-h}. Apart from @kbd{C-h k}, there are
426different kinds of help. Type @kbd{C-h} twice to get a description of 473many other help commands providing different kinds of help.
427all the help facilities. @xref{Help}. 474
475 @xref{Help}, for details.
428 476
429@node Blank Lines 477@node Blank Lines
430@section Blank Lines 478@section Blank Lines
@@ -521,23 +569,26 @@ logical lines. @xref{Visual Line Mode}.
521@section Cursor Position Information 569@section Cursor Position Information
522 570
523 Here are commands to get information about the size and position of 571 Here are commands to get information about the size and position of
524parts of the buffer, and to count lines. 572parts of the buffer, and to count words and lines.
525 573
526@table @kbd 574@table @kbd
527@item M-x what-page
528Display the page number of point, and the line number within that page.
529@item M-x what-line 575@item M-x what-line
530Display the line number of point in the whole buffer. 576Display the line number of point.
531@item M-x line-number-mode 577@item M-x line-number-mode
532@itemx M-x column-number-mode 578@itemx M-x column-number-mode
533Toggle automatic display of the current line number or column number. 579Toggle automatic display of the current line number or column number.
534@xref{Optional Mode Line}. 580@xref{Optional Mode Line}.
535@item M-x count-lines-region 581
536Display the number of lines in the current region. Normally bound to 582@item M-=
537@kbd{M-=}, except in a few specialist modes. @xref{Mark}, for 583Display the number of lines, words, and characters that are present in
538information about the region. 584the region (@code{count-words-region}). @xref{Mark}, for information
539@item M-x count-words-region 585about the region.
540Display the number of words in the current region. 586
587@item M-x count-words
588Display the number of lines, words, and characters that are present in
589the buffer. If the region is active (@pxref{Mark}), display the
590numbers for the region instead.
591
541@item C-x = 592@item C-x =
542Display the character code of character after point, character position of 593Display the character code of character after point, character position of
543point, and column of point (@code{what-cursor-position}). 594point, and column of point (@code{what-cursor-position}).
@@ -549,7 +600,6 @@ Toggle automatic display of the size of the buffer.
549@xref{Optional Mode Line}. 600@xref{Optional Mode Line}.
550@end table 601@end table
551 602
552@findex what-page
553@findex what-line 603@findex what-line
554@cindex line number commands 604@cindex line number commands
555@cindex location of point 605@cindex location of point
@@ -563,15 +613,14 @@ the accessible portion (@pxref{Narrowing}). By contrast,
563@code{what-line} displays both the line number relative to the 613@code{what-line} displays both the line number relative to the
564narrowed region and the line number relative to the whole buffer. 614narrowed region and the line number relative to the whole buffer.
565 615
566 @kbd{M-x what-page} counts pages from the beginning of the file, and
567counts lines within the page, showing both numbers in the echo area.
568@xref{Pages}.
569
570@kindex M-= 616@kindex M-=
571@findex count-lines-region 617@findex count-words-region
572 Use @kbd{M-x count-lines-region} (normally bound to @kbd{M-=}) to 618@findex count-words
573display the number of lines in the region (@pxref{Mark}). @xref{Pages}, 619 @kbd{M-=} (@code{count-words-region}) displays a message reporting
574for the command @kbd{C-x l} which counts the lines in the current page. 620the number of lines, words, and characters in the region. @kbd{M-x
621count-words} displays a similar message for the entire buffer, or for
622the region if the region is @dfn{active}. @xref{Mark}, for an
623explanation of the region.
575 624
576@kindex C-x = 625@kindex C-x =
577@findex what-cursor-position 626@findex what-cursor-position
diff --git a/doc/emacs/commands.texi b/doc/emacs/commands.texi
index cff725027e9..de6e7539c27 100644
--- a/doc/emacs/commands.texi
+++ b/doc/emacs/commands.texi
@@ -23,25 +23,21 @@ input.
23@cindex @acronym{ASCII} 23@cindex @acronym{ASCII}
24@cindex C- 24@cindex C-
25@cindex Control 25@cindex Control
26@cindex control characters
27 26
28 GNU Emacs is primarily designed for use with the keyboard. While it 27 GNU Emacs is primarily designed for use with the keyboard. While it
29is possible to use the mouse to issue editing commands through the 28is possible to use the mouse to issue editing commands through the
30menu bar and tool bar, that is not as efficient as using the keyboard. 29menu bar and tool bar, that is not as efficient as using the keyboard.
31Therefore, this manual mainly documents how to edit with the keyboard. 30Therefore, this manual mainly documents how to edit with the keyboard.
32 31
32@cindex control character
33 Keyboard input into Emacs is based on a heavily-extended version of 33 Keyboard input into Emacs is based on a heavily-extended version of
34@acronym{ASCII}. The simplest characters that you can input into 34@acronym{ASCII}. Simple characters, like @samp{a}, @samp{B},
35Emacs correspond to graphic symbols such as @samp{a}, @samp{B}, 35@samp{3}, @samp{=}, and the space character (denoted as @key{SPC}),
36@samp{3}, @samp{=}, the space character (conventionally denoted as 36are entered by typing the corresponding key. @dfn{Control
37@key{SPC}), and so on. Entering these using the keyboard is 37characters}, such as @key{RET}, @key{TAB}, @key{DEL}, @key{ESC},
38straightforward. Certain characters found on non-English keyboards 38@key{F1}, @key{Home}, and @key{left}, are also entered this way, as
39also fall into this category (@pxref{International}). 39are certain characters found on non-English keyboards
40 40(@pxref{International}).
41 In addition to these simple characters, Emacs recognizes
42@dfn{control characters} such as @key{RET}, @key{TAB}, @key{DEL},
43@key{ESC}, @key{F1}, @key{Home}, @key{left}, etc. Most keyboards have
44special keys for entering these.
45 41
46@cindex modifier keys 42@cindex modifier keys
47@cindex Control 43@cindex Control
@@ -50,13 +46,14 @@ special keys for entering these.
50@cindex M- 46@cindex M-
51 Emacs also recognizes control characters that are entered using 47 Emacs also recognizes control characters that are entered using
52@dfn{modifier keys}. Two commonly-used modifier keys are 48@dfn{modifier keys}. Two commonly-used modifier keys are
53@key{Control} (which is usually labelled as @key{Ctrl}), and 49@key{Control} (usually labelled @key{Ctrl}), and @key{Meta} (usually
54@key{Meta} (which is usually labeled as @key{Alt})@footnote{We refer 50labeled @key{Alt})@footnote{We refer to @key{Alt} as @key{Meta} for
55to @key{Alt} as @key{Meta} for historical reasons.}. For example, 51historical reasons.}. For example, @kbd{Control-a} is entered by
56@kbd{Control-a} is entered by holding down the @key{Ctrl} key while 52holding down the @key{Ctrl} key while pressing @kbd{a}; we will refer
57pressing @kbd{a}; we will refer to this as @kbd{C-a} for short. 53to this as @kbd{C-a} for short. Similarly @kbd{Meta-a}, or @kbd{M-a}
58Similarly @kbd{Meta-a}, or @kbd{M-a} for short, is entered by holding 54for short, is entered by holding down the @key{Alt} key and pressing
59down the @key{Alt} key and pressing @kbd{a}. 55@kbd{a}. Modifier keys can also be applied to non-alphanumerical
56characters, e.g. @kbd{C-@key{F1}} or @kbd{M-@key{left}}.
60 57
61@cindex @key{ESC} replacing @key{Meta} key 58@cindex @key{ESC} replacing @key{Meta} key
62 You can also type Meta characters using two-character sequences 59 You can also type Meta characters using two-character sequences
@@ -68,33 +65,28 @@ character; instead, press @key{ESC} and release it, then enter the
68next character. This feature is useful on certain text-only terminals 65next character. This feature is useful on certain text-only terminals
69where the @key{Meta} key does not function reliably. 66where the @key{Meta} key does not function reliably.
70 67
71 Modifier keys can apply not only to alphanumerical characters, but
72also to special input characters, such as the arrow keys and mouse
73buttons.
74
75@cindex input event
76 @xref{Input Events,,, elisp, The Emacs Lisp Reference Manual}, for
77the full Lisp-level details about keyboard and mouse input, which are
78collectively referred to as @dfn{input events}. If you are not doing
79Lisp programming, but simply want to redefine the meaning of some
80characters or non-character events, see @ref{Customization}.
81
82@cindex keys stolen by window manager 68@cindex keys stolen by window manager
83@cindex window manager, keys stolen by 69@cindex window manager, keys stolen by
84 On graphical displays, the window manager is likely to block the 70 On graphical displays, the window manager might block some keyboard
85character @kbd{M-@key{TAB}} before Emacs can see it. It may also 71inputs, including @kbd{M-@key{TAB}}, @kbd{M-@key{SPC}}, @kbd{C-M-d}
86block @kbd{M-@key{SPC}}, @kbd{C-M-d} and @kbd{C-M-l}. If you have 72and @kbd{C-M-l}. If you have this problem, you can either customize
87these problems, we recommend that you customize your window manager to 73your window manager to not block those keys, or ``rebind'' the
88turn off those commands, or put them on key combinations that Emacs 74affected Emacs commands (@pxref{Customization}).
89does not use. 75
76@cindex input event
77 Simple characters and control characters, as well as certain
78non-keyboard inputs such as mouse clicks, are collectively referred to
79as @dfn{input events}. For details about how Emacs internally handles
80input events, see @ref{Input Events,,, elisp, The Emacs Lisp Reference
81Manual}.
90 82
91@node Keys, Commands, User Input, Top 83@node Keys, Commands, User Input, Top
92@section Keys 84@section Keys
93 85
94 Some Emacs commands are invoked by just one input event; for 86 Some Emacs commands are invoked by just one input event; for
95example, @kbd{C-f} moves forward one character in the buffer. But 87example, @kbd{C-f} moves forward one character in the buffer. Other
96Emacs also has commands that take two or more input events to invoke, 88commands take two or more input events to invoke, such as @kbd{C-x
97such as @kbd{C-x C-f} and @kbd{C-x 4 C-f}. 89C-f} and @kbd{C-x 4 C-f}.
98 90
99@cindex key 91@cindex key
100@cindex key sequence 92@cindex key sequence
@@ -106,23 +98,23 @@ invokes a command, we call it a @dfn{complete key}; for example,
106@kbd{C-f}, @kbd{C-x C-f} and @kbd{C-x 4 C-f} are all complete keys. 98@kbd{C-f}, @kbd{C-x C-f} and @kbd{C-x 4 C-f} are all complete keys.
107If a key sequence isn't long enough to invoke a command, we call it a 99If a key sequence isn't long enough to invoke a command, we call it a
108@dfn{prefix key}; from the preceding example, we see that @kbd{C-x} 100@dfn{prefix key}; from the preceding example, we see that @kbd{C-x}
109and @kbd{C-x 4} are prefix keys. Every key is either a complete key 101and @kbd{C-x 4} are prefix keys. Every key sequence is either a
110or a prefix key. 102complete key or a prefix key.
111 103
112 A prefix key combines with the following input event to make a 104 A prefix key combines with the following input event to make a
113longer key sequence, which may itself be complete or a prefix. For 105longer key sequence. For example, @kbd{C-x} is a prefix key, so
114example, @kbd{C-x} is a prefix key, so @kbd{C-x} and the next input 106typing @kbd{C-x} alone does not invoke a command; instead, Emacs waits
115event combine to make a two-event key sequence. This two-event key 107for further input (if you pause for longer than a second, it echoes
116sequence could itself be a prefix key (such as @kbd{C-x 4}), or a 108the @kbd{C-x} key to prompt for that input; @pxref{Echo Area}).
117complete key (such as @kbd{C-x C-f}). There is no limit to the length 109@kbd{C-x} combines with the next input event to make a two-event key
118of a key sequence, but in practice people rarely use sequences longer 110sequence, which could itself be a prefix key (such as @kbd{C-x 4}), or
119than three or four input events. 111a complete key (such as @kbd{C-x C-f}). There is no limit to the
120 112length of key sequences, but in practice they are seldom longer than
121 You can't add input events onto a complete key. For example, the 113three or four input events.
122two-event sequence @kbd{C-f C-k} is not a key, because the @kbd{C-f} 114
123is a complete key in itself, so @kbd{C-f C-k} cannot have an 115 You can't add input events onto a complete key. For example,
124independent meaning as a command. @kbd{C-f C-k} is two key sequences, 116because @kbd{C-f} is a complete key, the two-event sequence @kbd{C-f
125not one.@refill 117C-k} is two key sequences, not one.
126 118
127 By default, the prefix keys in Emacs are @kbd{C-c}, @kbd{C-h}, 119 By default, the prefix keys in Emacs are @kbd{C-c}, @kbd{C-h},
128@kbd{C-x}, @kbd{C-x @key{RET}}, @kbd{C-x @@}, @kbd{C-x a}, @kbd{C-x 120@kbd{C-x}, @kbd{C-x @key{RET}}, @kbd{C-x @@}, @kbd{C-x a}, @kbd{C-x
@@ -132,22 +124,20 @@ aliases for @kbd{C-h} and @kbd{C-x 6}.) This list is not cast in
132stone; if you customize Emacs, you can make new prefix keys. You 124stone; if you customize Emacs, you can make new prefix keys. You
133could even eliminate some of the standard ones, though this is not 125could even eliminate some of the standard ones, though this is not
134recommended for most users; for example, if you remove the prefix 126recommended for most users; for example, if you remove the prefix
135definition of @kbd{C-x 4}, then @kbd{C-x 4 @var{anything}} would 127definition of @kbd{C-x 4}, then @kbd{C-x 4 C-f} becomes an invalid key
136become an invalid key sequence. @xref{Key Bindings}. 128sequence. @xref{Key Bindings}.
137 129
138 Typing the help character (@kbd{C-h} or @key{F1}) after a prefix key 130 Typing the help character (@kbd{C-h} or @key{F1}) after a prefix key
139displays a list of the commands starting with that prefix. The sole 131displays a list of the commands starting with that prefix. The sole
140exception to this rule is @key{ESC}: @kbd{@key{ESC} C-h} is equivalent 132exception to this rule is @key{ESC}: @kbd{@key{ESC} C-h} is equivalent
141to @kbd{C-M-h}, which does something else entirely. You can, however, 133to @kbd{C-M-h}, which does something else entirely. You can, however,
142use @key{F1} to displays a list of the commands starting with 134use @key{F1} to display a list of commands starting with @key{ESC}.
143@key{ESC}.
144 135
145@node Commands, Entering Emacs, Keys, Top 136@node Commands, Entering Emacs, Keys, Top
146@section Keys and Commands 137@section Keys and Commands
147 138
148@cindex binding 139@cindex binding
149@cindex command 140@cindex command
150@cindex function definition
151 This manual is full of passages that tell you what particular keys 141 This manual is full of passages that tell you what particular keys
152do. But Emacs does not assign meanings to keys directly. Instead, 142do. But Emacs does not assign meanings to keys directly. Instead,
153Emacs assigns meanings to named @dfn{commands}, and then gives keys 143Emacs assigns meanings to named @dfn{commands}, and then gives keys
@@ -155,11 +145,9 @@ their meanings by @dfn{binding} them to commands.
155 145
156 Every command has a name chosen by a programmer. The name is 146 Every command has a name chosen by a programmer. The name is
157usually made of a few English words separated by dashes; for example, 147usually made of a few English words separated by dashes; for example,
158@code{next-line} or @code{forward-word}. A command also has a 148@code{next-line} or @code{forward-word}. Internally, each command is
159@dfn{function definition} which is a Lisp program; this is how the 149a special type of Lisp @dfn{function}, and the actions associated with
160command does its work. In Emacs Lisp, a command is a Lisp function 150the command are performed by running the function. @xref{What Is a
161with special properties that make it suitable for interactive use.
162For more information on commands and functions, see @ref{What Is a
163Function,, What Is a Function, elisp, The Emacs Lisp Reference 151Function,, What Is a Function, elisp, The Emacs Lisp Reference
164Manual}. 152Manual}.
165 153
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index bb675b61cff..286595c2b45 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -264,7 +264,7 @@ Basic Editing Commands
264* Basic Help:: Asking what a character does. 264* Basic Help:: Asking what a character does.
265* Blank Lines:: Making and deleting blank lines. 265* Blank Lines:: Making and deleting blank lines.
266* Continuation Lines:: How Emacs displays lines too wide for the screen. 266* Continuation Lines:: How Emacs displays lines too wide for the screen.
267* Position Info:: What page, line, row, or column is point on? 267* Position Info:: What line, row, or column is point on?
268* Arguments:: Numeric arguments for repeating a command N times. 268* Arguments:: Numeric arguments for repeating a command N times.
269* Repeating:: Repeating the previous command quickly. 269* Repeating:: Repeating the previous command quickly.
270 270
@@ -282,6 +282,7 @@ Completion
282* Completion Example:: Examples of using completion. 282* Completion Example:: Examples of using completion.
283* Completion Commands:: A list of completion commands. 283* Completion Commands:: A list of completion commands.
284* Strict Completion:: Different types of completion. 284* Strict Completion:: Different types of completion.
285* Completion Styles:: How completion matches are chosen.
285* Completion Options:: Options for completion. 286* Completion Options:: Options for completion.
286 287
287Help 288Help
@@ -291,10 +292,10 @@ Help
291* Name Help:: Asking about a command, variable or function name. 292* Name Help:: Asking about a command, variable or function name.
292* Apropos:: Asking what pertains to a given topic. 293* Apropos:: Asking what pertains to a given topic.
293* Help Mode:: Special features of Help mode and Help buffers. 294* Help Mode:: Special features of Help mode and Help buffers.
294* Library Keywords:: Finding Lisp libraries by keywords (topics). 295* Package Keywords:: Finding Lisp libraries by keywords (topics).
295* Language Help:: Help relating to international language support. 296* Language Help:: Help relating to international language support.
296* Misc Help:: Other help commands. 297* Misc Help:: Other help commands.
297* Help Files:: Commands to display pre-written help files. 298* Help Files:: Commands to display auxilliary help files.
298* Help Echo:: Help on active text and tooltips (`balloon help'). 299* Help Echo:: Help on active text and tooltips (`balloon help').
299 300
300The Mark and the Region 301The Mark and the Region
diff --git a/doc/emacs/entering.texi b/doc/emacs/entering.texi
index 3c4a74c02b5..4a76f206aed 100644
--- a/doc/emacs/entering.texi
+++ b/doc/emacs/entering.texi
@@ -19,49 +19,45 @@
19 19
20 The usual way to invoke Emacs is with the shell command 20 The usual way to invoke Emacs is with the shell command
21@command{emacs}. From a terminal window running in the X Window 21@command{emacs}. From a terminal window running in the X Window
22System, you can also run Emacs in the background with 22System, you can run Emacs in the background with @command{emacs &};
23@command{emacs&}; this way, Emacs won't tie up the terminal window, so 23this way, Emacs won't tie up the terminal window, so you can use it to
24you can use it to run other shell commands. 24run other shell commands.
25 25
26@cindex startup screen 26@cindex startup screen
27 When Emacs starts up, the initial frame displays a special buffer 27 When Emacs starts up, the initial frame displays a special buffer
28named @samp{*GNU Emacs*}. This buffer contains some information about 28named @samp{*GNU Emacs*}. This @dfn{startup screen} contains
29Emacs, and includes @dfn{links} to common tasks that might be useful 29information about Emacs and @dfn{links} to common tasks that are
30to beginning users. For instance, activating the @samp{Emacs 30useful for beginning users. For instance, activating the @samp{Emacs
31Tutorial} link opens the Emacs tutorial; this does the same thing as 31Tutorial} link opens the Emacs tutorial; this does the same thing as
32the command @kbd{C-h t} (@code{help-with-tutorial}). To activate a 32the command @kbd{C-h t} (@code{help-with-tutorial}). To activate a
33link, either move point onto it and type @kbd{@key{RET}}, or click on 33link, either move point onto it and type @kbd{@key{RET}}, or click on
34it with @kbd{mouse-1} (the left mouse button). 34it with @kbd{mouse-1} (the left mouse button).
35 35
36 Using a command line argument, you can tell Emacs to visit one or 36 Using a command line argument, you can tell Emacs to visit one or
37more specific files as soon as it starts up. For example, 37more files as soon as it starts up. For example, @command{emacs
38@command{emacs foo.txt} starts Emacs with a buffer displaying the 38foo.txt} starts Emacs with a buffer displaying the contents of the
39contents of the file @samp{foo.txt}. This feature exists mainly for 39file @samp{foo.txt}. This feature exists mainly for compatibility
40compatibility with other editors, which are designed to edit one file 40with other editors, which are designed to be launched from the shell
41at a time: once you are done with that file, you exit the editor, and 41for short editing sessions. If you call Emacs this way, the initial
42start it again the next time you need it. 42frame is split into two windows---one showing the specified file, and
43 43the other showing the startup screen. @xref{Windows}.
44 Using Emacs in this way---starting it afresh each time you want to 44
45edit a file---is unnecessary and wasteful. Emacs can visit more than 45 Generally, it is unnecessary and wasteful to start Emacs afresh each
46one file in a single editing session, and exiting the Emacs session 46time you want to edit a file. The recommended way to use Emacs is to
47loses valuable accumulated context, such as the kill ring, registers, 47start it just once, just after you log in, and do all your editing in
48undo history, and mark ring. These features, described later in the 48the same Emacs session. @xref{Files}, for information on visiting
49manual, are useful for performing edits across multiple files, or 49more than one file. If you use Emacs this way, the Emacs session
50continuing edits to a single file. 50accumulates valuable context, such as the kill ring, registers, undo
51 51history, and mark ring data, which together make editing more
52 The recommended way to use Emacs is to start it only once, just 52convenient. These features are described later in the manual.
53after you log in, and do all your editing in the same Emacs session.
54Each time you edit a file, visit it with the existing Emacs, which
55eventually has many files in it ready for editing. @xref{Files}, for
56more information on visiting more than one file.
57 53
58 To edit a file from another program while Emacs is running, you can 54 To edit a file from another program while Emacs is running, you can
59use the @command{emacsclient} helper program to open a file in the 55use the @command{emacsclient} helper program to open a file in the
60already running Emacs. @xref{Emacs Server}. 56existing Emacs session. @xref{Emacs Server}.
61 57
62 Emacs accepts other command line arguments that tell it to load 58 Emacs accepts other command line arguments that tell it to load
63certain Lisp files, call certain functions, and so forth. These 59certain Lisp files, where to put the initial frame, and so forth.
64features exist mainly for advanced users. @xref{Emacs Invocation}. 60@xref{Emacs Invocation}.
65 61
66@vindex inhibit-startup-screen 62@vindex inhibit-startup-screen
67 If the variable @code{inhibit-startup-screen} is non-@code{nil}, 63 If the variable @code{inhibit-startup-screen} is non-@code{nil},
@@ -72,11 +68,10 @@ which can be used to evaluate Emacs Lisp expressions interactively.
72@xref{Lisp Interaction}. You can set the variable 68@xref{Lisp Interaction}. You can set the variable
73@code{inhibit-startup-screen} using the Customize facility 69@code{inhibit-startup-screen} using the Customize facility
74(@pxref{Easy Customization}), or by editing your initialization file 70(@pxref{Easy Customization}), or by editing your initialization file
75(@pxref{Init File}).@footnote{Note that setting 71(@pxref{Init File}).@footnote{Setting @code{inhibit-startup-screen} in
76@code{inhibit-startup-screen} in @file{site-start.el} doesn't work, 72@file{site-start.el} doesn't work, because the startup screen is set
77because the startup screen is set up before reading 73up before reading @file{site-start.el}. @xref{Init File}, for
78@file{site-start.el}. @xref{Init File}, for information about 74information about @file{site-start.el}.}
79@file{site-start.el}.}
80 75
81 You can also force Emacs to display a file or directory at startup 76 You can also force Emacs to display a file or directory at startup
82by setting the variable @code{initial-buffer-choice} to a 77by setting the variable @code{initial-buffer-choice} to a
@@ -105,13 +100,13 @@ On a text terminal, suspend Emacs; on a graphical display,
105@findex save-buffers-kill-terminal 100@findex save-buffers-kill-terminal
106 @dfn{Killing} Emacs means terminating the Emacs program. To do 101 @dfn{Killing} Emacs means terminating the Emacs program. To do
107this, type @kbd{C-x C-c} (@code{save-buffers-kill-terminal}). A 102this, type @kbd{C-x C-c} (@code{save-buffers-kill-terminal}). A
108two-character key is used to make it harder to type by accident. If 103two-character key sequence is used to make it harder to type by
109there are any modified file-visiting buffers when you type @kbd{C-x 104accident. If there are any modified file-visiting buffers when you
110C-c}, Emacs first offers to save these buffers. If you do not save 105type @kbd{C-x C-c}, Emacs first offers to save these buffers. If you
111them all, it asks for confirmation again, since the unsaved changes 106do not save them all, it asks for confirmation again, since the
112will be lost. Emacs also asks for confirmation if any subprocesses 107unsaved changes will be lost. Emacs also asks for confirmation if any
113are still running, since killing Emacs will also kill the subprocesses 108subprocesses are still running, since killing Emacs will also kill the
114(@pxref{Shell}). 109subprocesses (@pxref{Shell}).
115 110
116 @kbd{C-x C-c} behaves specially if you are using Emacs as a server. 111 @kbd{C-x C-c} behaves specially if you are using Emacs as a server.
117If you type it from a ``client frame'', it closes the client 112If you type it from a ``client frame'', it closes the client
@@ -135,39 +130,19 @@ default value of @code{confirm-kill-emacs} is @code{nil}.
135 To kill Emacs without being prompted about saving, type @kbd{M-x 130 To kill Emacs without being prompted about saving, type @kbd{M-x
136kill-emacs}. 131kill-emacs}.
137 132
138@cindex minimizing a frame
139@cindex iconifying
140@cindex suspending
141 You can ``exit'' Emacs in two other ways. On a graphical display,
142you can @dfn{minimize} (or @dfn{iconify}) an Emacs frame; depending on
143the window system, this either replaces the Emacs frame with a tiny
144``icon'' or conceals the frame entirely (@pxref{Frames}). On a
145text-only terminal, you can @dfn{suspend} Emacs; this means stopping
146the Emacs program temporarily, returning control to its parent process
147(usually a shell).
148
149@kindex C-z 133@kindex C-z
150@findex suspend-frame 134@findex suspend-frame
135@cindex minimizing
136@cindex iconifying
137@cindex suspending
151 @kbd{C-z} runs the command @code{suspend-frame}. On a graphical 138 @kbd{C-z} runs the command @code{suspend-frame}. On a graphical
152display, this ``minimizes'' (or ``iconifies'') the selected Emacs 139display, this command @dfn{minimizes} (or @dfn{iconifies}) the
153frame. On a text terminal, this suspends the Emacs process. 140selected Emacs frame, hiding it in a way that lets you bring it back
154 141later (exactly how this hiding occurs depends on the window system).
155 After minimizing or suspending Emacs, you can return to it and 142On a text terminal, the @kbd{C-z} command @dfn{suspends} Emacs,
156continue editing wherever you left off. The way to do this depends on 143stopping the program temporarily and returning control to the parent
157the window system or shell. In most common shells, you can resume 144process (usually a shell); in most shells, you can resume Emacs after
158Emacs after suspending it with the shell command @command{%emacs}. 145suspending it with the shell command @command{%emacs}.
159
160@vindex cannot-suspend
161 On very old systems that don't support suspending programs,
162@kbd{C-z} starts an inferior shell that communicates directly with the
163terminal, and Emacs waits until you exit the subshell. (The way to
164exit the subshell is usually @kbd{C-d} or @command{exit}.) On these
165systems, you can only get back to the shell from which Emacs was run
166(to log out, for example) when you kill Emacs. Suspending can also
167fail if you run Emacs under a shell that doesn't support suspending
168jobs, even if the system itself does support it. In this case, you
169can set the variable @code{cannot-suspend} to a non-@code{nil} value
170to force @kbd{C-z} to start an inferior shell.
171 146
172 Text-only terminals usually listen for certain special characters 147 Text-only terminals usually listen for certain special characters
173whose meaning is to kill or suspend the program you are running. 148whose meaning is to kill or suspend the program you are running.
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 2672c30363b..433bf617598 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -54,11 +54,13 @@ Note that file name completion ignores file names whose extensions
54appear in the variable @code{completion-ignored-extensions} 54appear in the variable @code{completion-ignored-extensions}
55(@pxref{Completion Options}). 55(@pxref{Completion Options}).
56 56
57@cindex default file name
57 For most operations, there is a @dfn{default file name} which is 58 For most operations, there is a @dfn{default file name} which is
58used if you type just @key{RET} to enter an empty argument. Normally, 59used if you type just @key{RET} to enter an empty argument. Normally,
59the default file name is the name of the file visited in the current 60the default file name is the name of the file visited in the current
60buffer. 61buffer.
61 62
63@cindex default directory
62@vindex default-directory 64@vindex default-directory
63@vindex insert-default-directory 65@vindex insert-default-directory
64 Each buffer has a @dfn{default directory} which is normally the same 66 Each buffer has a @dfn{default directory} which is normally the same
@@ -1863,7 +1865,7 @@ then specifying @file{/tmp/foo*bar} will visit only
1863@cindex file name caching 1865@cindex file name caching
1864@cindex cache of file names 1866@cindex cache of file names
1865@pindex find 1867@pindex find
1866@kindex C-@key{TAB} 1868@kindex C-TAB
1867@findex file-cache-minibuffer-complete 1869@findex file-cache-minibuffer-complete
1868 You can use the @dfn{file name cache} to make it easy to locate a 1870 You can use the @dfn{file name cache} to make it easy to locate a
1869file by name, without having to remember exactly where it is located. 1871file by name, without having to remember exactly where it is located.
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index 619252503a9..fc78f90db15 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -1229,8 +1229,7 @@ raises the frame.
1229 1229
1230@node Non-Window Terminals 1230@node Non-Window Terminals
1231@section Non-Window Terminals 1231@section Non-Window Terminals
1232@cindex non-window terminals 1232@cindex text-only terminal
1233@cindex single-frame terminals
1234 1233
1235 On a text-only terminal, Emacs can display only one Emacs frame at a 1234 On a text-only terminal, Emacs can display only one Emacs frame at a
1236time. However, you can still create multiple Emacs frames, and switch 1235time. However, you can still create multiple Emacs frames, and switch
diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi
index 9ff995138f5..a85edf101e5 100644
--- a/doc/emacs/help.texi
+++ b/doc/emacs/help.texi
@@ -11,31 +11,19 @@
11@kindex C-h 11@kindex C-h
12@kindex F1 12@kindex F1
13 13
14 Emacs provides extensive help features, all accessible through the
15@dfn{help character}, @kbd{C-h}. This is a prefix key that is used
16for commands that display documentation; the next character you type
17should be a @dfn{help option}, to ask for a particular kind of help.
18You can cancel the @kbd{C-h} command with @kbd{C-g}. The function key
19@key{F1} is equivalent to @kbd{C-h}.
20
21@kindex C-h C-h 14@kindex C-h C-h
22@findex help-for-help 15@findex help-for-help
23 @kbd{C-h} itself is one of the help options; @kbd{C-h C-h} displays 16 Emacs provides a wide variety of help commands, all accessible
24a list of help options, with a brief description of each one 17through the prefix key @kbd{C-h} (or, equivalently, the function key
25(@code{help-for-help}). You can scroll the list with @key{SPC} and 18@key{F1}). These help commands are described in the following
26@key{DEL}, then type the help option you want. To cancel, type 19sections. You can also type @kbd{C-h C-h} to view a list of help
27@kbd{C-g}. 20commands (@code{help-for-help}). You can scroll the list with
28 21@key{SPC} and @key{DEL}, then type the help command you want. To
29 @kbd{C-h} or @key{F1} means ``help'' in various other contexts as 22cancel, type @kbd{C-g}.
30well. For instance, you can type them after a prefix key to display 23
31a list of the keys that can follow the prefix key. (A few prefix keys 24 Many help commands display their information in a special @dfn{help
32don't support @kbd{C-h} in this way, because they define other 25buffer}. In this buffer, you can type @key{SPC} and @key{DEL} to
33meanings for it, but they all support @key{F1} for help.) 26scroll and type @key{RET} to follow hyperlinks. @xref{Help Mode}.
34
35 Most help buffers use a special major mode, Help mode, which lets
36you scroll conveniently with @key{SPC} and @key{DEL}. You can also
37follow hyperlinks to URLs, and to other facilities including Info
38nodes and customization buffers. @xref{Help Mode}.
39 27
40@cindex searching documentation efficiently 28@cindex searching documentation efficiently
41@cindex looking for a subject in documentation 29@cindex looking for a subject in documentation
@@ -51,33 +39,38 @@ This searches for commands whose names match the argument
51regular expression (@pxref{Regexps}). @xref{Apropos}. 39regular expression (@pxref{Regexps}). @xref{Apropos}.
52 40
53@item C-h i d m emacs @key{RET} i @var{topic} @key{RET} 41@item C-h i d m emacs @key{RET} i @var{topic} @key{RET}
54This searches for @var{topic} in the indices of the on-line Emacs 42This searches for @var{topic} in the indices of the Emacs Info manual,
55manual, and displays the first match found. Press @kbd{,} to see 43displaying the first match found. Press @kbd{,} to see subsequent
56subsequent matches. You can use a regular expression as @var{topic}. 44matches. You can use a regular expression as @var{topic}.
57 45
58@item C-h i d m emacs @key{RET} s @var{topic} @key{RET} 46@item C-h i d m emacs @key{RET} s @var{topic} @key{RET}
59Similar, but searches the @emph{text} of the manual rather than the 47Similar, but searches the @emph{text} of the manual rather than the
60indices. 48indices.
61 49
62@item C-h C-f 50@item C-h C-f
63This displays the Emacs FAQ. You can use the Info commands 51This displays the Emacs FAQ, using Info.
64to browse it.
65 52
66@item C-h p 53@item C-h p
67This displays the available Emacs packages based on keywords. 54This displays the available Emacs packages based on keywords.
68@xref{Library Keywords}. 55@xref{Package Keywords}.
69@end table 56@end table
70 57
58 @kbd{C-h} or @key{F1} means ``help'' in various other contexts as
59well. For instance, you can type them after a prefix key to view a
60list of the keys that can follow the prefix key. (A few prefix keys
61don't support @kbd{C-h} in this way, because they define other
62meanings for it, but they all support @key{F1} for help.)
63
71@menu 64@menu
72* Help Summary:: Brief list of all Help commands. 65* Help Summary:: Brief list of all Help commands.
73* Key Help:: Asking what a key does in Emacs. 66* Key Help:: Asking what a key does in Emacs.
74* Name Help:: Asking about a command, variable or function name. 67* Name Help:: Asking about a command, variable or function name.
75* Apropos:: Asking what pertains to a given topic. 68* Apropos:: Asking what pertains to a given topic.
76* Help Mode:: Special features of Help mode and Help buffers. 69* Help Mode:: Special features of Help mode and Help buffers.
77* Library Keywords:: Finding Lisp libraries by keywords (topics). 70* Package Keywords:: Finding Lisp libraries by keywords (topics).
78* Language Help:: Help relating to international language support. 71* Language Help:: Help relating to international language support.
79* Misc Help:: Other help commands. 72* Misc Help:: Other help commands.
80* Help Files:: Commands to display pre-written help files. 73* Help Files:: Commands to display auxilliary help files.
81* Help Echo:: Help on active text and tooltips (`balloon help'). 74* Help Echo:: Help on active text and tooltips (`balloon help').
82@end menu 75@end menu
83 76
@@ -89,21 +82,20 @@ This displays the available Emacs packages based on keywords.
89@section Help Summary 82@section Help Summary
90@end ifnottex 83@end ifnottex
91 84
92 Here is a summary of the Emacs interactive help commands. (The 85 Here is a summary of help commands for accessing the built-in
93character that follows @kbd{C-h} is the ``help option.'') See 86documentation. Most of these are described in more detail in the
94@ref{Help Files}, for other help commands that display fixed files 87following sections.
95of information.
96 88
97@table @kbd 89@table @kbd
98@item C-h a @var{topics} @key{RET} 90@item C-h a @var{topics} @key{RET}
99Display a list of commands whose names match @var{topics} 91Display a list of commands whose names match @var{topics}
100(@code{apropos-command}; @pxref{Apropos}). 92(@code{apropos-command}).
101@item C-h b 93@item C-h b
102Display all active key bindings; minor mode bindings first, then those 94Display all active key bindings; minor mode bindings first, then those
103of the major mode, then global bindings (@code{describe-bindings}). 95of the major mode, then global bindings (@code{describe-bindings}).
104@item C-h c @var{key} 96@item C-h c @var{key}
105Given a key sequence @var{key}, show the name of the command that it 97Show the name of the command that the key sequence @var{key} is bound
106runs (@code{describe-key-briefly}). Here @kbd{c} stands for 98to (@code{describe-key-briefly}). Here @kbd{c} stands for
107``character.'' For more extensive information on @var{key}, use 99``character.'' For more extensive information on @var{key}, use
108@kbd{C-h k}. 100@kbd{C-h k}.
109@item C-h d @var{topics} @key{RET} 101@item C-h d @var{topics} @key{RET}
@@ -120,8 +112,8 @@ this works for commands too.
120Display the @file{HELLO} file, which shows examples of various character 112Display the @file{HELLO} file, which shows examples of various character
121sets. 113sets.
122@item C-h i 114@item C-h i
123Run Info, the GNU documentation browser (@code{info}). 115Run Info, the GNU documentation browser (@code{info}). The Emacs
124The complete Emacs manual is available on-line in Info. 116manual is available in Info.
125@item C-h k @var{key} 117@item C-h k @var{key}
126Display the name and documentation of the command that @var{key} runs 118Display the name and documentation of the command that @var{key} runs
127(@code{describe-key}). 119(@code{describe-key}).
@@ -134,20 +126,18 @@ Display documentation of the current major mode (@code{describe-mode}).
134Display news of recent Emacs changes (@code{view-emacs-news}). 126Display news of recent Emacs changes (@code{view-emacs-news}).
135@item C-h p 127@item C-h p
136Find packages by topic keyword (@code{finder-by-keyword}). This lists 128Find packages by topic keyword (@code{finder-by-keyword}). This lists
137packages using a package menu buffer (@pxref{Package Menu}); for an 129packages using a package menu buffer. @xref{Packages}.
138alternative interface to the same information, try the
139@code{info-finder} command.
140@item C-h P @var{package} @key{RET} 130@item C-h P @var{package} @key{RET}
141Display documentation about the package named @var{package} 131Display documentation about the package named @var{package}
142(@code{describe-package}; @pxref{Packages}). 132(@code{describe-package}).
143@item C-h r 133@item C-h r
144Display the Emacs manual in Info (@code{info-emacs-manual}). 134Display the Emacs manual in Info (@code{info-emacs-manual}).
145@item C-h s 135@item C-h s
146Display the current contents of the @dfn{syntax table}, with an 136Display the contents of the current @dfn{syntax table}
147explanation of what they mean (@code{describe-syntax}). The syntax 137(@code{describe-syntax}). The syntax table says which characters are
148table says which characters are opening delimiters, which are parts of 138opening delimiters, which are parts of words, and so on. @xref{Syntax
149words, which are string quotes, and so on. @xref{Syntax Tables,, 139Tables,, Syntax Tables, elisp, The Emacs Lisp Reference Manual}, for
150Syntax Tables, elisp, The Emacs Lisp Reference Manual}, for details. 140details.
151@item C-h t 141@item C-h t
152Enter the Emacs interactive tutorial (@code{help-with-tutorial}). 142Enter the Emacs interactive tutorial (@code{help-with-tutorial}).
153@item C-h v @var{var} @key{RET} 143@item C-h v @var{var} @key{RET}
@@ -184,27 +174,27 @@ Display the help message for a special text area, if point is in one
184@node Key Help 174@node Key Help
185@section Documentation for a Key 175@section Documentation for a Key
186 176
187@kindex C-h c
188@findex describe-key-briefly 177@findex describe-key-briefly
178@findex describe-key
189 The help commands to get information about a key sequence are 179 The help commands to get information about a key sequence are
190@kbd{C-h c} and @w{@kbd{C-h k}}. @kbd{C-h c @var{key}} displays in 180@kbd{C-h c} (@code{describe-key-briefly}) and @kbd{C-h k}
191the echo area the name of the command that @var{key} is bound to. For 181(@code{describe-key}).
192example, @kbd{C-h c C-f} displays @samp{forward-char}. Since command 182
193names are chosen to describe what the commands do, this gives you a 183@kindex C-h c
194very brief description of what @var{key} does. 184 @kbd{C-h c @var{key}} displays in the echo area the name of the
185command that @var{key} is bound to. For example, @kbd{C-h c C-f}
186displays @samp{forward-char}.
195 187
188@cindex documentation string
196@kindex C-h k 189@kindex C-h k
197@findex describe-key
198 @kbd{C-h k @var{key}} is similar but gives more information: it 190 @kbd{C-h k @var{key}} is similar but gives more information: it
199displays the documentation string of the command as well as its name. 191displays a help buffer containing the command's @dfn{documentation
200It displays this information in a window, since it may not fit in the 192string}, which describes exactly what the command does.
201echo area.
202 193
203@kindex C-h K 194@kindex C-h K
204@findex Info-goto-emacs-key-command-node 195@findex Info-goto-emacs-key-command-node
205 To find the documentation of a key sequence @var{key}, type @kbd{C-h 196 @kbd{C-h K @var{key}} displays the section of the Emacs manual that
206K @var{key}}. This displays the appropriate manual section which 197describes the command corresponding to @var{key}.
207contains the documentation of @var{key}.
208 198
209 @kbd{C-h c}, @kbd{C-h k} and @kbd{C-h K} work for any sort of key 199 @kbd{C-h c}, @kbd{C-h k} and @kbd{C-h K} work for any sort of key
210sequences, including function keys, menus, and mouse events. For 200sequences, including function keys, menus, and mouse events. For
@@ -271,14 +261,8 @@ the Lisp symbol around or before point, if that is the name of a
271defined Lisp variable. @xref{Variables}. 261defined Lisp variable. @xref{Variables}.
272 262
273 Help buffers that describe Emacs variables and functions normally 263 Help buffers that describe Emacs variables and functions normally
274have hyperlinks to the corresponding source definition, if you have 264have hyperlinks to the corresponding source code, if you have the
275the source files installed. (@xref{Hyperlinking}.) If you know Lisp 265source files installed (@pxref{Hyperlinking}).
276(or C), this provides the ultimate documentation. If you don't know
277Lisp, you should learn it. (The Introduction to Emacs Lisp
278Programming, available from the FSF through fsf.org, is a good way to
279get started.) If Emacs feels you are just @emph{using} it, treating
280it as an object program, its feelings may be hurt. For real intimacy,
281read the Emacs source code.
282 266
283@kindex C-h F 267@kindex C-h F
284@findex Info-goto-emacs-command-node 268@findex Info-goto-emacs-command-node
@@ -288,53 +272,58 @@ manuals, not just the Emacs manual, and finds the right one.
288 272
289@node Apropos 273@node Apropos
290@section Apropos 274@section Apropos
275@cindex apropos
291 276
292 The @dfn{apropos} commands answer questions like, ``What are the 277 The @dfn{apropos} commands answer questions like, ``What are the
293commands for working with files?'' More precisely, you specify an 278commands for working with files?'' More precisely, you specify an
294@dfn{apropos pattern}, which means either a word, a list of words, or 279@dfn{apropos pattern}, which means either a word, a list of words, or
295a regular expression. Each apropos command displays a list of items 280a regular expression.
296that match the pattern, in a separate buffer. 281
282 Each of the following apropos commands reads an apropos pattern in
283the minibuffer, searches for items that match the pattern, and
284displays the results in a different window.
297 285
298@table @kbd 286@table @kbd
299@item C-h a @var{pattern} @key{RET} 287@item C-h a
300Search for commands whose names match @var{pattern}. 288@kindex C-h a
289@findex apropos-command
290Search for commands (@code{apropos-command}). With a prefix argument,
291search for noninteractive functions too.
301 292
302@item M-x apropos @key{RET} @var{pattern} @key{RET} 293@item M-x apropos
303Search for functions and variables whose names match @var{pattern}. 294@findex apropos
304Both interactive functions (commands) and noninteractive functions can 295Search for functions and variables. Both interactive functions
305be found by this command. 296(commands) and noninteractive functions can be found by this.
306 297
307@item M-x apropos-variable @key{RET} @var{pattern} @key{RET} 298@item M-x apropos-variable
308Search for user-option variables whose names match @var{pattern}. 299@findex apropos-variable
300Search for user-customizable variables. With a prefix argument,
301search for non-customizable variables too.
309 302
310@item M-x apropos-value @key{RET} @var{pattern} @key{RET} 303@item M-x apropos-value
311Search for functions whose definitions match @var{pattern}, and 304@findex apropos-value
312variables whose values match @var{pattern}. 305Search for variables whose values match the specified pattern. With a
306prefix argument, search also for functions with definitions matching
307the pattern, and Lisp symbols with properties matching the pattern.
313 308
314@item C-h d @var{pattern} @key{RET} 309@item C-h d
315Search for functions and variables whose @strong{documentation 310@kindex C-h d
316strings} match @var{pattern}. 311@findex apropos-documentation
312Search for functions and variables whose documentation strings match
313the specified pattern (@code{apropos-documentation}).
317@end table 314@end table
318 315
319@kindex C-h a 316 The simplest kind of apropos pattern is one word. Anything
320@findex apropos-command 317containing that word matches the pattern. Thus, to find commands that
321@cindex apropos 318work on files, type @kbd{C-h a file @key{RET}}. This displays a list
322 The simplest kind of apropos pattern is one word. Anything which 319of all command names that contain @samp{file}, including
323contains that word matches the pattern. Thus, to find the commands
324that work on files, type @kbd{C-h a file @key{RET}}. This displays a
325list of all command names that contain @samp{file}, including
326@code{copy-file}, @code{find-file}, and so on. Each command name 320@code{copy-file}, @code{find-file}, and so on. Each command name
327comes with a brief description and a list of keys you can currently 321comes with a brief description and a list of keys you can currently
328invoke it with. In our example, it would say that you can invoke 322invoke it with. In our example, it would say that you can invoke
329@code{find-file} by typing @kbd{C-x C-f}. 323@code{find-file} by typing @kbd{C-x C-f}.
330 324
331 The @kbd{a} in @kbd{C-h a} stands for ``Apropos''; @kbd{C-h a}
332runs the command @code{apropos-command}. This command normally checks
333only commands (interactive functions); if you specify a prefix
334argument, it checks noninteractive functions as well.
335
336 For more information about a function definition, variable or symbol 325 For more information about a function definition, variable or symbol
337property listed in the apropos buffer, you can click on it with 326property listed in an apropos buffer, you can click on it with
338@kbd{Mouse-1} or @kbd{Mouse-2}, or move there and type @key{RET}. 327@kbd{Mouse-1} or @kbd{Mouse-2}, or move there and type @key{RET}.
339 328
340 When you specify more than one word in the apropos pattern, a name 329 When you specify more than one word in the apropos pattern, a name
@@ -362,160 +351,117 @@ mark, insert, yank, fill, indent, case, change, set, what, list, find,
362view, describe, default. 351view, describe, default.
363@end quotation 352@end quotation
364 353
365@findex apropos
366 Use @kbd{M-x apropos} instead of @kbd{C-h a} to list all the Lisp
367symbols that match an apropos pattern, not just the symbols that are
368commands. This command does not list key bindings by default; specify
369a numeric argument if you want it to list them.
370
371@findex apropos-variable
372 Use @kbd{M-x apropos-variable} to list user-customizable variables
373that match an apropos pattern. If you specify a prefix argument, it
374lists all matching variables.
375
376@kindex C-h d
377@findex apropos-documentation
378 The @code{apropos-documentation} command is like @code{apropos}
379except that it searches documentation strings instead of symbol names
380for matches.
381
382@findex apropos-value
383 The @code{apropos-value} command is like @code{apropos} except that
384it searches variables' values for matches for the apropos pattern.
385With a prefix argument, it also checks symbols' function definitions
386and property lists.
387
388@vindex apropos-do-all 354@vindex apropos-do-all
389 If the variable @code{apropos-do-all} is non-@code{nil}, the apropos 355 If the variable @code{apropos-do-all} is non-@code{nil}, the apropos
390commands always behave as if they had been given a prefix argument. 356commands always behave as if they had been given a prefix argument.
391 357
392@vindex apropos-sort-by-scores 358@vindex apropos-sort-by-scores
393@cindex apropos search results, order by score 359@cindex apropos search results, order by score
394 By default, apropos lists the search results in alphabetical order.
395If the variable @code{apropos-sort-by-scores} is non-@code{nil}, the
396apropos commands try to guess the relevance of each result, and
397display the most relevant ones first.
398
399@vindex apropos-documentation-sort-by-scores 360@vindex apropos-documentation-sort-by-scores
400 By default, apropos lists the search results for 361 By default, all apropos commands except @code{apropos-documentation}
401@code{apropos-documentation} in order of relevance of the match. If 362list their results in alphabetical order. If the variable
402the variable @code{apropos-documentation-sort-by-scores} is 363@code{apropos-sort-by-scores} is non-@code{nil}, these commands
403@code{nil}, apropos lists the symbols found in alphabetical order. 364instead try to guess the relevance of each result, and display the
365most relevant ones first. The @code{apropos-documentation} command
366lists its results in order of relevance by default; to list them in
367alphabetical order, change the variable
368@code{apropos-documentation-sort-by-scores} to @code{nil}.
404 369
405@node Help Mode 370@node Help Mode
406@section Help Mode Commands 371@section Help Mode Commands
407 372
408 Help buffers provide the same commands as View mode (@pxref{View 373 Help buffers provide the same commands as View mode (@pxref{View
409Mode}), plus a few special commands of their own. 374Mode}); for instance, @key{SPC} scrolls forward, and @key{DEL} scrolls
375backward. A few special commands are also provided:
410 376
411@table @kbd 377@table @kbd
412@item @key{SPC}
413Scroll forward.
414@item @key{DEL}
415Scroll backward.
416@item @key{RET} 378@item @key{RET}
417Follow a cross reference at point. 379Follow a cross reference at point (@code{help-follow}).
418@item @key{TAB} 380@item @key{TAB}
419Move point forward to the next cross reference. 381Move point forward to the next hyperlink (@code{forward-button}).
420@item S-@key{TAB} 382@item S-@key{TAB}
421Move point back to the previous cross reference. 383Move point back to the previous hyperlink (@code{backward-button}).
422@item Mouse-1 384@item Mouse-1
423@itemx Mouse-2 385@itemx Mouse-2
424Follow a cross reference that you click on. 386Follow a hyperlink that you click on.
425@item C-c C-c 387@item C-c C-c
426Show all documentation about the symbol at point. 388Show all documentation about the symbol at point
389(@code{help-follow-symbol}).
390@item C-c C-b
391Go back to the previous help topic (@code{help-go-back}).
427@end table 392@end table
428 393
429 When a function name (@pxref{M-x,, Running Commands by Name}), 394@cindex hyperlink
430variable name (@pxref{Variables}), or face name (@pxref{Faces}) 395@findex help-follow
431appears in the documentation, it normally appears inside paired 396@findex help-go-back
432single-quotes. To view the documentation of that command, variable or 397@kindex RET @r{(Help mode)}
433face, you can click on the name with @kbd{Mouse-1} or @kbd{Mouse-2}, 398@kindex C-c C-b @r{(Help mode)}
434or move point there and type @key{RET}. Use @kbd{C-c C-b} to retrace 399 When a function name, variable name, or face name (@pxref{Faces})
435your steps. 400appears in the documentation in the help buffer, it is normally an
401underlined @dfn{hyperlink}. To view the associated documentation,
402move point there and type @key{RET} (@code{help-follow}), or click on
403the hyperlink with @kbd{Mouse-1} or @kbd{Mouse-2}. Doing so replaces
404the contents of the help buffer; to retrace your steps, type @kbd{C-c
405C-b} (@code{help-go-back}).
436 406
437@cindex URL, viewing in help 407@cindex URL, viewing in help
438@cindex help, viewing web pages 408@cindex help, viewing web pages
439@cindex viewing web pages in help 409@cindex viewing web pages in help
440@cindex web pages, viewing in help 410@cindex web pages, viewing in help
441@findex browse-url 411@findex browse-url
442 You can follow cross references to URLs (web pages) also. This uses 412 A help buffer can also contain hyperlinks to Info manuals, source
443the @code{browse-url} command to view the page in the browser you 413code definitions, and URLs (web pages). The first two are opened in
444choose. @xref{Browse-URL}. 414Emacs, and the third using a web browser via the @code{browse-url}
445 415command (@pxref{Browse-URL}).
446@kindex @key{TAB} @r{(Help mode)} 416
447@findex help-next-ref 417@kindex TAB @r{(Help mode)}
448@kindex S-@key{TAB} @r{(Help mode)} 418@findex forward-button
449@findex help-previous-ref 419@kindex S-TAB @r{(Help mode)}
450 There are convenient commands to move point to cross references in 420@findex backward-button
451the help text. @key{TAB} (@code{help-next-ref}) moves point down to 421 In a help buffer, @key{TAB} (@code{forward-button}) moves point
452the next cross reference. @kbd{S-@key{TAB}} moves up to the previous 422forward to the next hyperlink, while @kbd{S-@key{TAB}}
453cross reference (@code{help-previous-ref}). 423(@code{backward-button}) point back to the previous hyperlink. These
454 424commands act cyclically; for instance, typing @key{TAB} at the last
455 To view all documentation about any symbol name that appears in the 425hyperlink moves back to the first hyperlink.
456text, move point to the symbol name and type @kbd{C-c C-c} 426
457(@code{help-follow-symbol}). This shows all available documentation 427 To view all documentation about any symbol in the text, move point
458about the symbol as a variable, function and/or face. As above, use 428to there and type @kbd{C-c C-c} (@code{help-follow-symbol}). This
459@kbd{C-c C-b} to retrace your steps. 429shows all available documentation about the symbol---as a variable,
460 430function and/or face.
461@node Library Keywords 431
462@section Keyword Search for Lisp Libraries 432@node Package Keywords
433@section Keyword Search for Packages
434@cindex finder
435
436Most optional features in Emacs are grouped into @dfn{packages}.
437Emacs contains several hundred built-in packages, and more can be
438installed over the network (@pxref{Packages}).
463 439
464@kindex C-h p 440@kindex C-h p
465@findex finder-by-keyword 441@findex finder-by-keyword
466The @kbd{C-h p} command lets you search the standard Emacs Lisp 442 To make it easier to find packages related to a topic, most packages
467libraries by topic keywords. Here is a partial list of keywords you can 443are associated with one or more @dfn{keywords} based on what they do.
468use: 444Type @kbd{C-h p} (@code{finder-by-keyword}) to bring up a list of
469 445package keywords, together with a description of what the keywords
470@multitable {convenience} {aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa} 446mean. To view a list of packages for a given keyword, type @key{RET}
471@item abbrev@tab abbreviation handling, typing shortcuts, macros. 447on that line; this displays the list of packages in a Package Menu
472@item bib@tab code related to the @code{bib} bibliography processor. 448buffer (@pxref{Package Menu}).
473@item c@tab support for the C language and related languages. 449
474@item calendar@tab calendar and time management support. 450@findex describe-package
475@item comm@tab communications, networking, remote access to files. 451@kindex C-h P
476@item convenience@tab convenience features for faster editing. 452 @kbd{C-h P} (@code{describe-package}) prompts for the name of a
477@item data@tab support for editing files of data. 453package, and displays a help buffer describing the attributes of the
478@item docs@tab support for Emacs documentation. 454package and the features that it implements.
479@item emulations@tab emulations of other editors.
480@item extensions@tab Emacs Lisp language extensions.
481@item faces@tab support for multiple fonts.
482@item files@tab support for editing and manipulating files.
483@item frames@tab support for Emacs frames and window systems.
484@item games@tab games, jokes and amusements.
485@item hardware@tab support for interfacing with exotic hardware.
486@item help@tab support for on-line help systems.
487@item hypermedia@tab support for links between text or other media types.
488@item i18n@tab internationalization and alternate character-set support.
489@item internal@tab code for Emacs internals, build process, defaults.
490@item languages@tab specialized modes for editing programming languages.
491@item lisp@tab Lisp support, including Emacs Lisp.
492@item local@tab code local to your site.
493@item maint@tab maintenance aids for the Emacs development group.
494@item mail@tab modes for electronic-mail handling.
495@item matching@tab various sorts of searching and matching.
496@item mouse@tab mouse support.
497@item multimedia@tab images and sound support.
498@item news@tab support for netnews reading and posting.
499@item oop@tab support for object-oriented programming.
500@item outlines@tab support for hierarchical outlining.
501@item processes@tab process, subshell, compilation, and job control support.
502@item terminals@tab support for terminal types.
503@item tex@tab supporting code for the @TeX{} formatter.
504@item tools@tab programming tools.
505@item unix@tab front-ends/assistants for, or emulators of, UNIX-like features.
506@item wp@tab word processing.
507@end multitable
508 455
509@node Language Help 456@node Language Help
510@section Help for International Language Support 457@section Help for International Language Support
511 458
512 You can use the command @kbd{C-h L} 459 For information on a specific language environment (@pxref{Language
513(@code{describe-language-environment}) to get information about a 460Environments}), type @kbd{C-h L}
514specific language environment. @xref{Language Environments}. This 461(@code{describe-language-environment}). This displays a help buffer
515tells you which languages this language environment supports. It also 462describing the languages supported by the language environment, and
516lists the character sets, coding systems, and input methods that work 463listing the associated character sets, coding systems, and input
517with this language environment, and finally shows some sample text to 464methods, as well as some sample text for that language environment.
518illustrate scripts.
519 465
520 The command @kbd{C-h h} (@code{view-hello-file}) displays the file 466 The command @kbd{C-h h} (@code{view-hello-file}) displays the file
521@file{etc/HELLO}, which shows how to say ``hello'' in many languages. 467@file{etc/HELLO}, which shows how to say ``hello'' in many languages.
@@ -604,12 +550,11 @@ these is @key{ESC}, because @kbd{@key{ESC} C-h} is actually
604@node Help Files 550@node Help Files
605@section Help Files 551@section Help Files
606 552
607 The Emacs help commands described above display dynamic help based 553 Apart from the built-in documentation and manuals, Emacs contains
608on the current state within Emacs, or refer to manuals. Other help 554several other files describing topics like copying conditions, release
609commands display pre-written, static help files. 555notes, instructions for debugging and reporting bugs, and so forth.
610 556You can use the following commands to view these files. Apart from
611 Except for @kbd{C-h g}, these commands all have the form @kbd{C-h 557@kbd{C-h g}, they all have the form @kbd{C-h C-@var{char}}.
612C-@var{char}}; that is, @kbd{C-h} followed by a control character.
613 558
614@kindex C-h C-c 559@kindex C-h C-c
615@findex describe-copying 560@findex describe-copying
@@ -636,24 +581,23 @@ C-@var{char}}; that is, @kbd{C-h} followed by a control character.
636 581
637@table @kbd 582@table @kbd
638@item C-h C-c 583@item C-h C-c
639Display the Emacs copying conditions (@code{describe-copying}). 584Display the rules under which you can copy and redistribute Emacs
640These are the rules under which you can copy and redistribute Emacs. 585(@code{describe-copying}).
641@item C-h C-d 586@item C-h C-d
642Display help for debugging Emacs (@code{view-emacs-debugging}). 587Display help for debugging Emacs (@code{view-emacs-debugging}).
643@item C-h C-e 588@item C-h C-e
644Display external packages and information about Emacs 589Display information about where to get external packages
645(@code{view-external-packages}). 590(@code{view-external-packages}).
646@item C-h C-f 591@item C-h C-f
647Display the Emacs frequently-answered-questions list (@code{view-emacs-FAQ}). 592Display the Emacs frequently-answered-questions list (@code{view-emacs-FAQ}).
648@item C-h g 593@item C-h g
649Display general information about the GNU Project 594Display information about the GNU Project (@code{describe-gnu-project}).
650(@code{describe-gnu-project}).
651@item C-h C-m 595@item C-h C-m
652Display how to order printed copies of Emacs manuals 596Display information about ordering printed copies of Emacs manuals
653(@code{view-order-manuals}). 597(@code{view-order-manuals}).
654@item C-h C-n 598@item C-h C-n
655Display the Emacs ``news'' file, which lists new features in the most 599Display the ``news'' file, which lists the new features in this
656recent version of Emacs (@code{view-emacs-news}). 600version of Emacs (@code{view-emacs-news}).
657@item C-h C-o 601@item C-h C-o
658Display how to order or download the latest version of 602Display how to order or download the latest version of
659Emacs and other GNU software (@code{describe-distribution}). 603Emacs and other GNU software (@code{describe-distribution}).
@@ -672,20 +616,20 @@ Emacs (@code{describe-no-warranty}).
672 616
673@cindex tooltips 617@cindex tooltips
674@cindex balloon help 618@cindex balloon help
675 When text on the screen is ``active'', so that it does something 619 In Emacs, stretches of ``active text'' (text that does something
676special in response to mouse clicks or @kbd{RET}, it often has associated 620special in response to mouse clicks or @key{RET}) often have
677help text. For instance, most parts of the mode line have help text. On 621associated help text. This includes hyperlinks in Emacs buffers, as
678terminals that support mouse tracking, Emacs displays the help text as a 622well as parts of the mode line. On graphical displays, as well as
679``tooltip'' (sometimes known as ``balloon help'') or in the echo area, 623some text terminals which support mouse tracking, moving the mouse
680whenever you leave the mouse stationary over the active text. 624over the active text displays the help text as a @dfn{tooltip}.
681@xref{Tooltips}. 625@xref{Tooltips}.
682 626
683@kindex C-h . 627@kindex C-h .
684@findex display-local-help 628@findex display-local-help
685@vindex help-at-pt-display-when-idle 629@vindex help-at-pt-display-when-idle
686 If your terminal doesn't support mouse-tracking, you can display the 630 On terminals that don't support mouse-tracking, you can display the
687help text for active buffer text using the keyboard. @kbd{C-h .} 631help text for active buffer text at point by typing @kbd{C-h .}
688(@code{display-local-help}) displays any help text associated with the 632(@code{display-local-help}). This shows the help text in the echo
689character after point, using the echo area. To display help text 633area. To display help text automatically whenever it is available at
690automatically whenever it is available on the character after point, set 634point, set the variable @code{help-at-pt-display-when-idle} to
691the variable @code{help-at-pt-display-when-idle} to @code{t}. 635@code{t}.
diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi
index da1e88ab331..e84b4c9f080 100644
--- a/doc/emacs/mini.texi
+++ b/doc/emacs/mini.texi
@@ -15,9 +15,9 @@ argument text.
15 15
16@cindex prompt 16@cindex prompt
17 When the minibuffer is in use, it appears in the echo area, with a 17 When the minibuffer is in use, it appears in the echo area, with a
18cursor. The minibuffer display starts with a @dfn{prompt} in a 18cursor. The minibuffer starts with a @dfn{prompt} in a distinct
19distinct color, usually ending with a colon. The prompt states what 19color, usually ending with a colon. The prompt states what kind of
20kind of input is expected, and how it will be used. 20input is expected, and how it will be used.
21 21
22 The simplest way to enter a minibuffer argument is to type the text, 22 The simplest way to enter a minibuffer argument is to type the text,
23then @key{RET} to submit the argument and exit the minibuffer. You 23then @key{RET} to submit the argument and exit the minibuffer. You
@@ -26,19 +26,17 @@ typing @kbd{C-g}.
26 26
27@cindex default argument 27@cindex default argument
28 Sometimes, a @dfn{default argument} appears in the prompt, inside 28 Sometimes, a @dfn{default argument} appears in the prompt, inside
29parentheses before the colon. The default will be used as the 29parentheses before the colon. This default will be used as the
30argument value if you just type @key{RET}. For example, commands that 30argument if you just type @key{RET}. For example, commands that read
31read buffer names usually show a buffer name as the default; you can 31buffer names usually show a buffer name as the default; you can type
32type @key{RET} to operate on that default buffer. 32@key{RET} to operate on that default buffer.
33 33
34 Since the minibuffer appears in the echo area, it can conflict with 34 Since the minibuffer appears in the echo area, it can conflict with
35other uses of the echo area. If an error occurs while the minibuffer 35other uses of the echo area. If an error message or an informative
36is active, the error message hides the minibuffer for a few seconds, 36message is emitted while the minibuffer is active, the message hides
37or until you type something; then the minibuffer comes back. If a 37the minibuffer for a few seconds, or until you type something; then
38command such as @kbd{C-x =} needs to display a message in the echo 38the minibuffer comes back. While the minibuffer is in use, keystrokes
39area, the message hides the minibuffer for a few seconds, or until you 39do not echo.
40type something; then the minibuffer comes back. While the minibuffer
41is in use, keystrokes do not echo.
42 40
43@menu 41@menu
44* Minibuffer File:: Entering file names with the minibuffer. 42* Minibuffer File:: Entering file names with the minibuffer.
@@ -52,6 +50,7 @@ is in use, keystrokes do not echo.
52@node Minibuffer File 50@node Minibuffer File
53@section Minibuffers for File Names 51@section Minibuffers for File Names
54 52
53@cindex default directory
55 Commands such as @kbd{C-x C-f} (@code{find-file}) use the minibuffer 54 Commands such as @kbd{C-x C-f} (@code{find-file}) use the minibuffer
56to read a file name argument (@pxref{Basic Files}). When the 55to read a file name argument (@pxref{Basic Files}). When the
57minibuffer is used to read a file name, it typically starts out with 56minibuffer is used to read a file name, it typically starts out with
@@ -92,7 +91,7 @@ Emacs interprets a double slash as ``ignore everything before the
92second slash in the pair.'' In the example above, 91second slash in the pair.'' In the example above,
93@file{/u2/emacs/src/} is ignored, so the argument you supplied is 92@file{/u2/emacs/src/} is ignored, so the argument you supplied is
94@file{/etc/termcap}. The ignored part of the file name is dimmed if 93@file{/etc/termcap}. The ignored part of the file name is dimmed if
95the terminal allows it (to disable this dimming, turn off File Name 94the terminal allows it. (To disable this dimming, turn off File Name
96Shadow mode with the command @kbd{M-x file-name-shadow-mode}.) 95Shadow mode with the command @kbd{M-x file-name-shadow-mode}.)
97 96
98@cindex home directory shorthand 97@cindex home directory shorthand
@@ -108,11 +107,11 @@ directory name in front of the @file{~} is ignored: thus,
108home directory, Emacs uses several alternatives. For MS-Windows, see 107home directory, Emacs uses several alternatives. For MS-Windows, see
109@ref{Windows HOME}; for MS-DOS, see 108@ref{Windows HOME}; for MS-DOS, see
110@ifnottex 109@ifnottex
111@ref{MS-DOS File Names, HOME on MS-DOS}. 110@ref{MS-DOS File Names}.
112@end ifnottex 111@end ifnottex
113@iftex 112@iftex
114@ref{MS-DOS File Names, HOME on MS-DOS,, emacs, the Emacs Manual}, in 113@ref{MS-DOS File Names, HOME on MS-DOS,, emacs, the digital version of
115the main Emacs manual. 114the Emacs Manual}.
116@end iftex 115@end iftex
117On these systems, the @file{~@var{user-id}/} construct is supported 116On these systems, the @file{~@var{user-id}/} construct is supported
118only for the current user, i.e., only if @var{user-id} is the current 117only for the current user, i.e., only if @var{user-id} is the current
@@ -125,9 +124,8 @@ file names, change the variable @code{insert-default-directory} to
125Nonetheless, relative file name arguments are still interpreted based 124Nonetheless, relative file name arguments are still interpreted based
126on the same default directory. 125on the same default directory.
127 126
128 For rules how to read remote file names in the minibuffer, see 127 You can also enter remote file names in the minibuffer.
129@ref{Filename completion, file name completion,, tramp}, in the Tramp 128@xref{Remote Files}.
130manual.
131 129
132@node Minibuffer Edit 130@node Minibuffer Edit
133@section Editing in the Minibuffer 131@section Editing in the Minibuffer
@@ -136,17 +134,17 @@ manual.
136usual Emacs commands are available for editing the argument text. 134usual Emacs commands are available for editing the argument text.
137(The prompt, however, is @dfn{read-only}, and cannot be changed.) 135(The prompt, however, is @dfn{read-only}, and cannot be changed.)
138 136
139 Since @key{RET} in the minibuffer is defined to exit the minibuffer, 137 Since @key{RET} in the minibuffer submits the argument, you can't
140you can't use it to insert a newline in the minibuffer. To do that, 138use it to insert a newline. You can do that with @kbd{C-q C-j}, which
141type @kbd{C-o} or @kbd{C-q C-j}. (The newline character is really the 139inserts a @kbd{C-j} control character, which is formally equivalent to
142@acronym{ASCII} character control-J.) 140a newline character (@pxref{Inserting Text}). Alternatively, you can
141use the @kbd{C-o} (@code{open-line}) command (@pxref{Blank Lines}).
143 142
144 Inside a minibuffer, the keys @kbd{@key{TAB}}, @kbd{@key{SPC}}, and 143 Inside a minibuffer, the keys @key{TAB}, @key{SPC}, and @kbd{?} are
145@kbd{@key{?}} are often bound to commands that perform 144often bound to @dfn{completion commands}, which allow you to easily
146@dfn{completion}. @xref{Completion}. You can use @kbd{C-q} 145fill in the desired text without typing all of it. @xref{Completion}.
147(@code{quoted-insert}) to insert a @key{TAB}, @key{SPC}, or @key{?} 146As with @key{RET}, you can use @kbd{C-q} to insert a @key{TAB},
148character. For example, @kbd{C-q @key{TAB}} inserts a @key{TAB} 147@key{SPC}, or @samp{?} character.
149character. @xref{Inserting Text}.
150 148
151 For convenience, @kbd{C-a} (@code{move-beginning-of-line}) in a 149 For convenience, @kbd{C-a} (@code{move-beginning-of-line}) in a
152minibuffer moves point to the beginning of the argument text, not the 150minibuffer moves point to the beginning of the argument text, not the
@@ -203,35 +201,28 @@ set the variable @code{enable-recursive-minibuffers} to @code{t}.
203@c it, the tutorial needs to be adjusted. 201@c it, the tutorial needs to be adjusted.
204@cindex completion 202@cindex completion
205 203
206 Sometimes, you can use a feature called @dfn{completion} to help you 204 You can often use a feature called @dfn{completion} to help enter
207enter arguments. This means that after you type part of the argument, 205arguments. This means that after you type part of the argument, Emacs
208Emacs can fill in the rest, or some of it, based on what you have 206can fill in the rest, or some of it, based on what was typed so far.
209typed so far.
210 207
208@cindex completion alternative
211 When completion is available, certain keys (usually @key{TAB}, 209 When completion is available, certain keys (usually @key{TAB},
212@key{RET}, and @key{SPC}) are rebound to complete the text in the 210@key{RET}, and @key{SPC}) are rebound in the minibuffer to special
213minibuffer into a longer string chosen from a set of @dfn{completion 211completion commands (@pxref{Completion Commands}). These commands
214alternatives}. The set of completion alternatives depends on the 212attempt to complete the text in the minibuffer, based on a set of
215command that requested the argument, and on what you have typed so 213@dfn{completion alternatives} provided by the command that requested
216far. In addition, you can usually type @kbd{?} to display a list of 214the argument. You can usually type @kbd{?} to see a list of
217possible completions. 215completion alternatives.
218 216
219 For example, @kbd{M-x} uses the minibuffer to read the name of a 217 Although completion is usually done in the minibuffer, the feature
220command, so completion works by matching the minibuffer text against 218is sometimes available in ordinary buffers too. @xref{Symbol
221the names of existing Emacs commands. So, to run the command 219Completion}.
222@code{insert-buffer}, you can type @kbd{M-x ins @key{SPC} b @key{RET}}
223instead of the full @kbd{M-x insert-buffer @key{RET}}.
224
225 Case is significant in completion when it is significant in the
226argument you are entering, such as command names. Thus,
227@samp{insert-buffer} is not a valid completion for @samp{IN}.
228Completion ignores case distinctions for certain arguments in which
229case does not matter.
230 220
231@menu 221@menu
232* Example: Completion Example. Examples of using completion. 222* Example: Completion Example. Examples of using completion.
233* Commands: Completion Commands. A list of completion commands. 223* Commands: Completion Commands. A list of completion commands.
234* Strict Completion:: Different types of completion. 224* Strict Completion:: Different types of completion.
225* Completion Styles:: How completion matches are chosen.
235* Options: Completion Options. Options for completion. 226* Options: Completion Options. Options for completion.
236@end menu 227@end menu
237 228
@@ -239,24 +230,31 @@ case does not matter.
239@subsection Completion Example 230@subsection Completion Example
240 231
241@kindex TAB @r{(completion)} 232@kindex TAB @r{(completion)}
242 A concrete example may help here. If you type @kbd{M-x a u 233 A simple example may help here. @kbd{M-x} uses the minibuffer to
243@key{TAB}}, the @key{TAB} looks for alternatives (in this case, 234read the name of a command, so completion works by matching the
244command names) that start with @samp{au}. There are several, 235minibuffer text against the names of existing Emacs commands. Suppose
245including @code{auto-fill-mode} and @code{autoconf-mode}, but they all 236you wish to run the command @code{auto-fill-mode}. You can do that by
246begin with @code{auto}, so the @samp{au} in the minibuffer completes 237typing @kbd{M-x auto-fill-mode @key{RET}}, but it is easier to use
247to @samp{auto}. 238completion.
239
240 If you type @kbd{M-x a u @key{TAB}}, the @key{TAB} looks for
241completion alternatives (in this case, command names) that start with
242@samp{au}. There are several, including @code{auto-fill-mode} and
243@code{autoconf-mode}, but they all begin with @code{auto}, so the
244@samp{au} in the minibuffer completes to @samp{auto}.
248 245
249 If you type @key{TAB} again immediately, it cannot determine the 246 If you type @key{TAB} again immediately, it cannot determine the
250next character; it could be @samp{-}, @samp{a}, or @samp{c}. So it 247next character; it could be @samp{-}, @samp{a}, or @samp{c}. So it
251does not add any characters; instead, @key{TAB} displays a list of all 248does not add any characters; instead, @key{TAB} displays a list of all
252possible completions in another window. 249possible completions in another window.
253 250
254 Next, type @kbd{- f}. The minibuffer now contains @samp{auto-f}, 251 Next, type @kbd{-f}. The minibuffer now contains @samp{auto-f}, and
255and the only command name that starts with this is 252the only command name that starts with this is @code{auto-fill-mode}.
256@code{auto-fill-mode}. If you now type @key{TAB}, completion fills in 253If you now type @key{TAB}, completion fills in the rest of the
257the rest of the argument @samp{auto-fill-mode} into the minibuffer. 254argument @samp{auto-fill-mode} into the minibuffer.
258You have been able to enter @samp{auto-fill-mode} by typing just 255
259@kbd{a u @key{TAB} - f @key{TAB}}. 256 Hence, typing just @kbd{a u @key{TAB} - f @key{TAB}} allows you to
257enter @samp{auto-fill-mode}.
260 258
261@node Completion Commands 259@node Completion Commands
262@subsection Completion Commands 260@subsection Completion Commands
@@ -272,60 +270,24 @@ complete, display a list of possible completions
272(@code{minibuffer-complete}). 270(@code{minibuffer-complete}).
273@item @key{SPC} 271@item @key{SPC}
274Complete up to one word from the minibuffer text before point 272Complete up to one word from the minibuffer text before point
275(@code{minibuffer-complete-word}). @key{SPC} for completion is not 273(@code{minibuffer-complete-word}). This command is not available for
276available when entering a file name, since file names often include 274arguments that often include spaces, such as file names.
277spaces.
278@item @key{RET} 275@item @key{RET}
279Submit the text in the minibuffer as the argument, possibly completing 276Submit the text in the minibuffer as the argument, possibly completing
280first as described in the next 277first (@code{minibuffer-complete-and-exit}). @xref{Strict Completion}.
281@iftex
282subsection (@code{minibuffer-complete-and-exit}).
283@end iftex
284@ifnottex
285node (@code{minibuffer-complete-and-exit}). @xref{Strict Completion}.
286@end ifnottex
287@item ? 278@item ?
288Display a list of possible completions of the text before point 279Display a list of completions (@code{minibuffer-completion-help}).
289(@code{minibuffer-completion-help}).
290@end table 280@end table
291 281
292@kindex TAB 282@kindex TAB @r{(completion)}
293@findex minibuffer-complete 283@findex minibuffer-complete
294 @key{TAB} (@code{minibuffer-complete}) is the most fundamental 284 @key{TAB} (@code{minibuffer-complete}) is the most fundamental
295completion command. It searches for all possible completion 285completion command. It searches for all possible completions that
296alternatives that match the existing minibuffer text, and attempts to 286match the existing minibuffer text, and attempts to complete as much
297complete as much as it can. The matching of completion alternatives 287as it can. @xref{Completion Styles}, for how completion alternatives
298to the minibuffer text is performed according to somewhat intricate 288are chosen.
299rules, which are designed so that plausible completions are offered
300under most circumstances. A valid completion alternative must satisfy
301the following criteria:
302 289
303@itemize @bullet 290@kindex SPC @r{(completion)}
304@item
305The minibuffer text before point must be the same as the beginning of
306the completion alternative. If there is any minibuffer text after
307point, it must be a substring of the remainder of the completion
308alternative.
309
310@item
311If no completion alternative satisfies the above rules, try using
312@dfn{partial completion} rules: divide the minibuffer text into words
313separated by hyphens or spaces, and complete each word separately.
314Thus, when completing command names, @samp{em-l-m} completes to
315@samp{emacs-lisp-mode}.
316
317@item
318If there is still no completion alternative, try the first rule again,
319but ignore the minibuffer text after point (i.e., don't try matching
320it).
321@end itemize
322
323@noindent
324When performing these comparisons, a @samp{*} in the minibuffer text
325acts as a @dfn{wildcard}---it matches any character at the
326corresponding position in the completion alternative.
327
328@kindex SPC
329@findex minibuffer-complete-word 291@findex minibuffer-complete-word
330 @key{SPC} (@code{minibuffer-complete-word}) completes like 292 @key{SPC} (@code{minibuffer-complete-word}) completes like
331@key{TAB}, but only up to the next hyphen or space. If you have 293@key{TAB}, but only up to the next hyphen or space. If you have
@@ -334,50 +296,52 @@ completion is @samp{auto-fill-mode}, but it only inserts @samp{ill-},
334giving @samp{auto-fill-}. Another @key{SPC} at this point completes 296giving @samp{auto-fill-}. Another @key{SPC} at this point completes
335all the way to @samp{auto-fill-mode}. 297all the way to @samp{auto-fill-mode}.
336 298
299@kindex ? @r{(completion)}
300@cindex completion list
337 If @key{TAB} or @key{SPC} is unable to complete, it displays a list 301 If @key{TAB} or @key{SPC} is unable to complete, it displays a list
338of possible completions (if there are any) in a separate window. You 302of matching completion alternatives (if there are any) in another
339can choose a completion from this list using the following commands: 303window. You can display the same list with @kbd{?}
304(@code{minibuffer-completion-help}). The following commands can be
305used with the completion list:
340 306
341@table @kbd 307@table @kbd
342@findex mouse-choose-completion 308@findex mouse-choose-completion
343@item Mouse-1 309@item Mouse-1
344@itemx Mouse-2 310@itemx Mouse-2
345Clicking mouse button 1 or 2 on a completion possibility chooses that 311Clicking mouse button 1 or 2 on a completion alternative chooses it
346completion (@code{mouse-choose-completion}). 312(@code{mouse-choose-completion}).
347 313
348@findex switch-to-completions 314@findex switch-to-completions
349@item M-v 315@item M-v
350@itemx @key{PageUp} 316@itemx @key{PageUp}
351@itemx @key{prior} 317@itemx @key{prior}
352Typing @kbd{M-v}, while in the minibuffer, selects the window showing 318Typing @kbd{M-v}, while in the minibuffer, selects the window showing
353the completion list buffer (@code{switch-to-completions}). This paves 319the completion list (@code{switch-to-completions}). This paves the
354the way for using the commands below. Typing @key{PageUp} or 320way for using the commands below. @key{PageUp} or @key{prior} does
355@key{prior} does the same, as does selecting that window in other 321the same. You can also select the window in other ways
356ways. 322(@pxref{Windows}).
357 323
358@findex choose-completion 324@findex choose-completion
359@item @key{RET} 325@item @key{RET}
360Typing @key{RET}, while in the completion list buffer, chooses the 326While in the completion list buffer, this chooses the completion at
361completion that point is in or next to (@code{choose-completion}). To 327point (@code{choose-completion}).
362use this command, you must first switch to the completion list window.
363 328
364@findex next-completion 329@findex next-completion
365@item @key{Right} 330@item @key{Right}
366Typing the right-arrow key @key{Right}, while in the completion list 331While in the completion list buffer, this moves point to the following
367buffer, moves point to the following completion possibility 332completion alternative (@code{next-completion}).
368(@code{next-completion}).
369 333
370@findex previous-completion 334@findex previous-completion
371@item @key{Left} 335@item @key{Left}
372Typing the left-arrow key @key{Left}, while in the completion list 336While in the completion list buffer, this moves point to the previous
373buffer, moves point to the previous completion possibility 337completion alternative (@code{previous-completion}).
374(@code{previous-completion}).
375@end table 338@end table
376 339
377@node Strict Completion 340@node Strict Completion
378@subsection Strict Completion 341@subsection Strict Completion
379 342
380 There are three different ways that @key{RET} can do completion, 343 There are three ways that the @key{RET}
344(@code{minibuffer-complete-and-exit}) completion command can act,
381depending on how the argument will be used. 345depending on how the argument will be used.
382 346
383@itemize @bullet 347@itemize @bullet
@@ -406,67 +370,140 @@ completion, @key{RET} does not complete, it just submits the argument
406as you have entered it. 370as you have entered it.
407@end itemize 371@end itemize
408 372
409 The completion commands display a list of all possible completions 373 Like the other completion commands, @key{RET} displays a list of all
410whenever they can't determine even one more character by completion. 374possible completions whenever it is supposed to complete but is unable
411Also, typing @kbd{?} explicitly requests such a list. You can scroll 375to complete any further.
412the list with @kbd{C-M-v} (@pxref{Other Window}).
413 376
414@node Completion Options 377@node Completion Styles
415@subsection Completion Options 378@subsection How Completion Alternatives Are Chosen
379@cindex completion style
416 380
417@vindex completion-auto-help 381 Completion commands work by narrowing a large list of possible
418 If @code{completion-auto-help} is set to @code{nil}, the completion 382completion alternatives to a smaller subset that ``matches'' what you
419commands never display the completion list buffer; you must type 383have typed in the minibuffer. In @ref{Completion Example}, we gave a
420@kbd{?} to display the list. If the value is @code{lazy}, Emacs only 384simple example of such matching. The procedure of determining what
421shows the completion list buffer on the second attempt to complete. 385constitutes a ``match'' is quite intricate. Emacs attempts to offer
422In other words, if there is nothing to complete, the first @key{TAB} 386plausible completions under most circumstances.
423echoes @samp{Next char not unique}; the second @key{TAB} does the
424completion list buffer.
425 387
426@vindex completion-ignored-extensions 388 Emacs performs completion using one or more @dfn{completion
427@cindex ignored file names, in completion 389styles}---sets of criteria for matching minibuffer text to completion
428 When completing file names, certain file names are usually ignored. 390alternatives. During completion, Emacs tries each completion style in
429The variable @code{completion-ignored-extensions} contains a list of 391turn. If a style yields one or more matches, that is used as the list
430strings; a file name ending in any of those strings is ignored as a 392of completion alternatives. If a style produces no matches, Emacs
431completion candidate. The standard value of this variable has several 393falls back on the next style.
432elements including @code{".o"}, @code{".elc"}, and @code{"~"}. For
433example, if a directory contains @samp{foo.c} and @samp{foo.elc},
434@samp{foo} completes to @samp{foo.c}. However, if @emph{all} possible
435completions end in ``ignored'' strings, they are not ignored: in the
436previous example, @samp{foo.e} completes to @samp{foo.elc}.
437Displaying a list of possible completions disregards
438@code{completion-ignored-extensions}; it shows them all.
439 394
440 If an element of @code{completion-ignored-extensions} ends in a 395@vindex completion-styles
441slash (@file{/}), it's a subdirectory name; that directory and its 396 The list variable @code{completion-styles} specifies the completion
442contents are ignored. Elements of 397styles to use. Each list element is the name of a completion style (a
443@code{completion-ignored-extensions} that do not end in a slash are 398Lisp symbol). The default completion styles are (in order):
444ordinary file names. 399
400@table @code
401@item basic
402A matching completion alternative must have the same beginning as the
403text in the minibuffer before point. Furthermore, if there is any
404text in the minibuffer after point, the rest of the completion
405alternative must contain that text as a substring.
406
407@findex partial completion
408@item partial-completion
409This aggressive completion style divides the minibuffer text into
410words separated by hyphens or spaces, and completes each word
411separately. (For example, when completing command names,
412@samp{em-l-m} completes to @samp{emacs-lisp-mode}.)
413
414Furthermore, a @samp{*} in the minibuffer text is treated as a
415@dfn{wildcard}---it matches any character at the corresponding
416position in the completion alternative.
417
418@item emacs22
419This completion style is similar to @code{basic}, except that it
420ignores the text in the minibuffer after point. It is so-named
421because it corresponds to the completion behavior in Emacs 22 and
422earlier.
423@end table
424
425@noindent
426The following additional completion styles are also defined, and you
427can add them to @code{completion-styles} if you wish
428(@pxref{Customization}):
429
430@table @code
431@item substring
432A matching completion alternative must contain the text in the
433minibuffer before point, and the text in the minibuffer after point,
434as substrings (in that same order).
435
436Thus, if the text in the minibuffer is @samp{foobar}, with point
437between @samp{foo} and @samp{bar}, that matches
438@samp{@var{a}foo@var{b}bar@var{c}}, where @var{a}, @var{b}, and
439@var{c} can be any string including the empty string.
440
441@item initials
442This very aggressive completion style attempts to complete acronyms
443and initialisms. For example, when completing command names, it
444matches @samp{lch} to @samp{list-command-history}.
445@end table
446
447@node Completion Options
448@subsection Completion Options
445 449
446@cindex case-sensitivity and completion 450@cindex case-sensitivity and completion
451@cindex case in completion
452 Case is significant when completing case-sensitive arguments, such
453as command names. For example, when completing command names,
454@samp{AU} does not complete to @samp{auto-fill-mode}. Case
455differences are ignored when completing arguments in which case does
456not matter.
457
447@vindex read-file-name-completion-ignore-case 458@vindex read-file-name-completion-ignore-case
448@vindex read-buffer-completion-ignore-case 459@vindex read-buffer-completion-ignore-case
449 When completing file names, Emacs ignores case differences if the 460 When completing file names, case differences are ignored if the
450variable @code{read-file-name-completion-ignore-case} is 461variable @code{read-file-name-completion-ignore-case} is
451non-@code{nil}. The default value is @code{nil} on systems that have 462non-@code{nil}. The default value is @code{nil} on systems that have
452case-sensitive file-names, such as GNU/Linux; it is non-@code{nil} on 463case-sensitive file-names, such as GNU/Linux; it is non-@code{nil} on
453systems that have case-insensitive file-names, such as Microsoft 464systems that have case-insensitive file-names, such as Microsoft
454Windows. When completing buffer names, Emacs ignores case differences 465Windows. When completing buffer names, case differences are ignored
455if @code{read-buffer-completion-ignore-case} is non-@code{nil} (the 466if the variable @code{read-buffer-completion-ignore-case} is
456default value is @code{nil}). 467non-@code{nil}; the default is @code{nil}.
457 468
458@vindex completion-styles 469@vindex completion-ignored-extensions
459 You can customize the matching rules for completion alternatives 470@cindex ignored file names, in completion
460using the variable @code{completion-styles}. Its value should be a 471 When completing file names, Emacs usually omits certain alternatives
461list of symbols, each representing a @dfn{completion style}; valid 472that are considered unlikely to be chosen, as determined by the list
462style symbols are @code{basic}, @code{partial-completion}, 473variable @code{completion-ignored-extensions}. Each element in the
463@code{emacs22}, @code{emacs21}, and @code{initials}. When completing, 474list should be a string; any file name ending in such a string is
464Emacs attempts to use the first completion style in the list; if this 475ignored as a completion alternative. Any element ending in a slash
465does not return any completion alternatives, it tries the next 476(@file{/}) represents a subdirectory name. The standard value of
466completion style in the list, and so on. The completion rules 477@code{completion-ignored-extensions} has several elements including
467described in @ref{Completion Commands} correspond to the default value 478@code{".o"}, @code{".elc"}, and @code{"~"}. For example, if a
468of @code{completion-styles}, which is @code{(basic partial-completion 479directory contains @samp{foo.c} and @samp{foo.elc}, @samp{foo}
469emacs22)}. 480completes to @samp{foo.c}. However, if @emph{all} possible
481completions end in ``ignored'' strings, they are not ignored: in the
482previous example, @samp{foo.e} completes to @samp{foo.elc}. Emacs
483disregards @code{completion-ignored-extensions} when showing
484completion alternatives in the completion list.
485
486@vindex completion-auto-help
487 If @code{completion-auto-help} is set to @code{nil}, the completion
488commands never display the completion list buffer; you must type
489@kbd{?} to display the list. If the value is @code{lazy}, Emacs only
490shows the completion list buffer on the second attempt to complete.
491In other words, if there is nothing to complete, the first @key{TAB}
492echoes @samp{Next char not unique}; the second @key{TAB} does the
493completion list buffer.
494
495@vindex completion-cycle-threshold
496 If @code{completion-cycle-threshold} is non-@code{nil}, completion
497commands can ``cycle'' through completion alternatives. Normally, if
498there is more than one completion alternative for the text in the
499minibuffer, a completion command completes up to the longest common
500substring. If you change @code{completion-cycle-threshold} to
501@code{t}, the completion command instead completes to the first of
502those completion alternatives; each subsequent invocation of the
503completion command replaces that with the next completion alternative,
504in a cyclic manner. If you give @code{completion-cycle-threshold} a
505numeric value @var{n}, completion commands switch to this cycling
506behavior only when there are fewer than @var{n} alternatives.
470 507
471@cindex Icomplete mode 508@cindex Icomplete mode
472@findex icomplete-mode 509@findex icomplete-mode
@@ -504,64 +541,60 @@ Move to a later item in the minibuffer history that matches
504 541
505@kindex M-p @r{(minibuffer history)} 542@kindex M-p @r{(minibuffer history)}
506@kindex M-n @r{(minibuffer history)} 543@kindex M-n @r{(minibuffer history)}
544@kindex UP @r{(minibuffer history)}
545@kindex DOWN @r{(minibuffer history)}
507@findex next-history-element 546@findex next-history-element
508@findex previous-history-element 547@findex previous-history-element
509 While in the minibuffer, typing @kbd{M-p} or @key{Up} 548 While in the minibuffer, @kbd{M-p} or @key{Up}
510(@code{previous-history-element}) moves up through the minibuffer 549(@code{previous-history-element}) moves through the minibuffer history
511history list, one item at a time. Each @kbd{M-p} fetches an earlier 550list, one item at a time. Each @kbd{M-p} fetches an earlier item from
512item from the history list into the minibuffer, replacing its existing 551the history list into the minibuffer, replacing its existing contents.
513contents. Similarly, typing @kbd{M-n} or @key{Down} 552Typing @kbd{M-n} or @key{Down} (@code{next-history-element}) moves
514(@code{next-history-element}) moves back down the history list, 553through the minibuffer history list in the opposite direction,
515fetching later entries into the minibuffer. You can think of these 554fetching later entries into the minibuffer.
516commands as ``backwards'' and ``forwards'' through the history list.
517 555
518 If you type @kbd{M-n} in the minibuffer when there are no later 556 If you type @kbd{M-n} in the minibuffer when there are no later
519entries in the minibuffer history (e.g., if you haven't previously 557entries in the minibuffer history (e.g., if you haven't previously
520typed @kbd{M-p}), Emacs tries fetching from a list of default 558typed @kbd{M-p}), Emacs tries fetching from a list of default
521argument: values that you are likely to enter. You can think of this 559arguments: values that you are likely to enter. You can think of this
522as moving through the ``future list'' instead of the ``history list''. 560as moving through the ``future history'' list.
523 561
524 The input that @kbd{M-p} or @kbd{M-n} fetches into the minibuffer 562 If you edit the text inserted by the @kbd{M-p} or @key{M-n}
525entirely replaces the existing contents of the minibuffer, so you can 563minibuffer history commands, this does not change its entry in the
526simply type @key{RET} to use it as an argument. You can also edit the 564history list. However, the edited argument does go at the end of the
527text before you reuse it; this does not change the history element 565history list when you submit it.
528that you ``moved'' to, but your new argument does go at the end of the
529history list in its own right.
530 566
531@findex previous-matching-history-element 567@findex previous-matching-history-element
532@findex next-matching-history-element 568@findex next-matching-history-element
533@kindex M-r @r{(minibuffer history)} 569@kindex M-r @r{(minibuffer history)}
534@kindex M-s @r{(minibuffer history)} 570@kindex M-s @r{(minibuffer history)}
535 There are also commands to search forward or backward through the 571 You can use @kbd{M-r} (@code{previous-matching-history-element}) to
536history; they search for history elements that match a regular 572search through older elements in the history list, and @kbd{M-s}
537expression. @kbd{M-r} (@code{previous-matching-history-element}) 573(@code{next-matching-history-element}) to search through newer
538searches older elements in the history, while @kbd{M-s} 574entries. Each of these commands asks for a @dfn{regular expression}
539(@code{next-matching-history-element}) searches newer elements. These 575as an argument, and fetches the first matching entry into the
540commands are unusual: they use the minibuffer to read the regular 576minibuffer. @xref{Regexps}, for an explanation of regular
541expression even though they are invoked from the minibuffer. As with 577expressions. A numeric prefix argument @var{n} means to fetch the
542incremental searching, an upper-case letter in the regular expression 578@var{n}th matching entry. These commands are unusual, in that they
543makes the search case-sensitive (@pxref{Search Case}). You can also 579use the minibuffer to read the regular expression argument, even
544search through the history using an incremental search (@pxref{Isearch 580though they are invoked from the minibuffer. An upper-case letter in
545Minibuffer}). 581the regular expression makes the search case-sensitive (@pxref{Search
546 582Case}).
547 All uses of the minibuffer record your input on a history list, but 583
548there are separate history lists for different kinds of arguments. 584 You can also search through the history using an incremental search.
549For example, there is a list for file names, used by all the commands 585@xref{Isearch Minibuffer}.
550that read file names. (As a special feature, this history list 586
551records the absolute file name, even if the name you entered was not 587 Emacs keeps separate history lists for several different kinds of
552absolute.) 588arguments. For example, there is a list for file names, used by all
553 589the commands that read file names. Other history lists include buffer
554 There are several other specific history lists, including one for 590names, command names (used by @kbd{M-x}), and command arguments (used
555buffer names, one for arguments of commands like @code{query-replace}, 591by commands like @code{query-replace}).
556one used by @kbd{M-x} for command names, and one used by
557@code{compile} for compilation commands. Finally, there is one
558``miscellaneous'' history list that most minibuffer arguments use.
559 592
560@vindex history-length 593@vindex history-length
561 The variable @code{history-length} specifies the maximum length of a 594 The variable @code{history-length} specifies the maximum length of a
562minibuffer history list; adding a new element deletes the oldest 595minibuffer history list; adding a new element deletes the oldest
563element if the list gets too long. If the value of 596element if the list gets too long. If the value is @code{t}, there is
564@code{history-length} is @code{t}, there is no maximum length. 597no maximum length.
565 598
566@vindex history-delete-duplicates 599@vindex history-delete-duplicates
567 The variable @code{history-delete-duplicates} specifies whether to 600 The variable @code{history-delete-duplicates} specifies whether to
@@ -592,27 +625,25 @@ Display the entire command history, showing all the commands
592 625
593@kindex C-x ESC ESC 626@kindex C-x ESC ESC
594@findex repeat-complex-command 627@findex repeat-complex-command
595 @kbd{C-x @key{ESC} @key{ESC}} is used to re-execute a recent command 628 @kbd{C-x @key{ESC} @key{ESC}} re-executes a recent command that used
596that used the minibuffer. With no argument, it repeats the last such 629the minibuffer. With no argument, it repeats the last such command.
597command. A numeric argument specifies which command to repeat; 1 630A numeric argument specifies which command to repeat; 1 means the last
598means the last one, 2 the previous, and so on. 631one, 2 the previous, and so on.
599 632
600 @kbd{C-x @key{ESC} @key{ESC}} works by turning the previous command 633 @kbd{C-x @key{ESC} @key{ESC}} works by turning the previous command
601into a Lisp expression and then entering a minibuffer initialized with 634into a Lisp expression and then entering a minibuffer initialized with
602the text for that expression. Even if you don't understand Lisp 635the text for that expression. Even if you don't know Lisp, it will
603syntax, it will probably be obvious which command is displayed for 636probably be obvious which command is displayed for repetition. If you
604repetition. If you type just @key{RET}, that repeats the command 637type just @key{RET}, that repeats the command unchanged. You can also
605unchanged. You can also change the command by editing the Lisp 638change the command by editing the Lisp expression before you execute
606expression before you execute it. The repeated command is added to 639it. The repeated command is added to the front of the command history
607the front of the command history unless it is identical to the most 640unless it is identical to the most recent item.
608recent item. 641
609 642 Once inside the minibuffer for @kbd{C-x @key{ESC} @key{ESC}}, you
610 Once inside the minibuffer for @kbd{C-x @key{ESC} @key{ESC}}, you can 643can use the usual minibuffer history commands (@pxref{Minibuffer
611use the minibuffer history commands (@kbd{M-p}, @kbd{M-n}, @kbd{M-r}, 644History}) to move through the history list. After finding the desired
612@kbd{M-s}; @pxref{Minibuffer History}) to move through the history list 645previous command, you can edit its expression as usual and then repeat
613of saved entire commands. After finding the desired previous command, 646it by typing @key{RET}.
614you can edit its expression as usual and then repeat it by typing
615@key{RET}.
616 647
617@vindex isearch-resume-in-command-history 648@vindex isearch-resume-in-command-history
618 Incremental search does not, strictly speaking, use the minibuffer. 649 Incremental search does not, strictly speaking, use the minibuffer.
@@ -637,12 +668,11 @@ when you tell Emacs to visit a file on another machine via a network
637protocol such as FTP, you often need to supply a password to gain 668protocol such as FTP, you often need to supply a password to gain
638access to the machine (@pxref{Remote Files}). 669access to the machine (@pxref{Remote Files}).
639 670
640 Entering a password is, in a basic sense, similar to using a 671 Entering a password is similar to using a minibuffer. Emacs
641minibuffer. Emacs displays a prompt in the echo area (such as 672displays a prompt in the echo area (such as @samp{Password: }); after
642@samp{Password: }); after you type the required password, press 673you type the required password, press @key{RET} to submit it. To
643@key{RET} to submit it. To prevent others from seeing your password, 674prevent others from seeing your password, every character you type is
644every character you type is displayed as a dot (@samp{.}) instead of 675displayed as a dot (@samp{.}) instead of its usual form.
645its usual form.
646 676
647 Most of the features and commands associated with the minibuffer can 677 Most of the features and commands associated with the minibuffer can
648@emph{not} be used when entering a password. There is no history or 678@emph{not} be used when entering a password. There is no history or
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 598f495784f..d7639b3b665 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -1531,8 +1531,8 @@ Specify a command to run if @code{emacsclient} fails to contact Emacs.
1531This is useful when running @code{emacsclient} in a script. 1531This is useful when running @code{emacsclient} in a script.
1532 1532
1533As a special exception, if @var{command} is the empty string, then 1533As a special exception, if @var{command} is the empty string, then
1534@code{emacsclient} starts Emacs in daemon mode and then tries 1534@code{emacsclient} starts Emacs in daemon mode (as @command{emacs
1535connecting again. 1535--daemon}) and then tries connecting again.
1536 1536
1537@cindex @env{ALTERNATE_EDITOR} environment variable 1537@cindex @env{ALTERNATE_EDITOR} environment variable
1538The environment variable @env{ALTERNATE_EDITOR} has the same effect as 1538The environment variable @env{ALTERNATE_EDITOR} has the same effect as
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi
index 4f1683ef5ea..29b6c69e38f 100644
--- a/doc/emacs/mule.texi
+++ b/doc/emacs/mule.texi
@@ -1707,10 +1707,9 @@ directionality when they are displayed. The default value is
1707 1707
1708 Each paragraph of bidirectional text can have its own @dfn{base 1708 Each paragraph of bidirectional text can have its own @dfn{base
1709direction}, either right-to-left or left-to-right. (Paragraph 1709direction}, either right-to-left or left-to-right. (Paragraph
1710boundaries are defined by the regular expressions 1710boundaries are empty lines, i.e.@: lines consisting entirely of
1711@code{paragraph-start} and @code{paragraph-separate}, see 1711whitespace characters.) Text in left-to-right paragraphs begins at
1712@ref{Paragraphs}.) Text in left-to-right paragraphs begins at the 1712the left margin of the window and is truncated or continued when it
1713left margin of the window and is truncated or continued when it
1714reaches the right margin. By contrast, text in right-to-left 1713reaches the right margin. By contrast, text in right-to-left
1715paragraphs begins at the right margin and is continued or truncated at 1714paragraphs begins at the right margin and is continued or truncated at
1716the left margin. 1715the left margin.
@@ -1734,8 +1733,8 @@ The special character @code{RIGHT-TO-LEFT MARK}, or @sc{rlm}, forces
1734the right-to-left direction on the following paragraph, while 1733the right-to-left direction on the following paragraph, while
1735@code{LEFT-TO-RIGHT MARK}, or @sc{lrm} forces the left-to-right 1734@code{LEFT-TO-RIGHT MARK}, or @sc{lrm} forces the left-to-right
1736direction. (You can use @kbd{C-x 8 RET} to insert these characters.) 1735direction. (You can use @kbd{C-x 8 RET} to insert these characters.)
1737In a GUI session, the @sc{lrm} and @sc{rlm} characters display as 1736In a GUI session, the @sc{lrm} and @sc{rlm} characters display as very
1738blanks. 1737thin blank characters; on text terminals they display as blanks.
1739 1738
1740 Because characters are reordered for display, Emacs commands that 1739 Because characters are reordered for display, Emacs commands that
1741operate in the logical order or on stretches of buffer positions may 1740operate in the logical order or on stretches of buffer positions may
diff --git a/doc/emacs/screen.texi b/doc/emacs/screen.texi
index 59f65fac8af..14d4c678085 100644
--- a/doc/emacs/screen.texi
+++ b/doc/emacs/screen.texi
@@ -5,31 +5,35 @@
5@node Screen, User Input, Acknowledgments, Top 5@node Screen, User Input, Acknowledgments, Top
6@chapter The Organization of the Screen 6@chapter The Organization of the Screen
7@cindex screen 7@cindex screen
8@cindex parts of the screen 8@cindex frame
9 9
10 On a text-only terminal, the Emacs display occupies the entire 10 On a graphical display, such as on GNU/Linux using the X Window
11terminal screen. On a graphical display, such as on GNU/Linux using 11System, Emacs occupies a ``graphical window''. On a text-only
12the X Window System, Emacs creates its own windows to use. We use the 12terminal, Emacs occupies the entire terminal screen. We will use the
13term @dfn{frame} to mean the entire terminal screen or graphical 13term @dfn{frame} to mean a graphical window or terminal screen
14window used by Emacs. Emacs uses both kinds of frames, in the same 14occupied by Emacs. Emacs behaves very similarly on both kinds of
15way, to display your editing. Emacs normally starts out with just one 15frames. It normally starts out with just one frame, but you can
16frame, but you can create additional frames if you wish 16create additional frames if you wish (@pxref{Frames}).
17(@pxref{Frames}). 17
18 18 Each frame consists of several distinct regions. At the top of the
19 The frame consists of several distinct regions. At the top of the
20frame is a @dfn{menu bar}, which allows you to access commands via a 19frame is a @dfn{menu bar}, which allows you to access commands via a
21series of menus. On a graphical display, directly below the menu bar 20series of menus. On a graphical display, directly below the menu bar
22is a @dfn{tool bar}, a row of icons that perform editing commands if 21is a @dfn{tool bar}, a row of icons that perform editing commands if
23you click on them. At the very bottom of the frame is a special 22you click on them. At the very bottom of the frame is an @dfn{echo
24@dfn{echo area}, where short informative messages are displayed and 23area}, where informative messages are displayed and where you enter
25where you enter information when Emacs asks for it. 24information when Emacs asks for it.
26 25
27 The main area of the frame, below the tool bar (if one exists) and 26 The main area of the frame, below the tool bar (if one exists) and
28above the echo area, is called @dfn{the window}. This is where Emacs 27above the echo area, is called @dfn{the window}. Henceforth in this
29displays the @dfn{buffer}: the text that you are editing. On a 28manual, we will use the word ``window'' in this sense. Graphical
30graphical display, the window possesses a @dfn{scroll bar} on one 29display systems commonly use the word ``window'' with a different
31side, which you can use to display different parts of the buffer in 30meaning; but, as stated above, we refer to those ``graphical windows''
32the window. The last line of the window is a @dfn{mode line}. This 31as ``frames''.
32
33 An Emacs window is where the @dfn{buffer}---the text you are
34editing---is displayed. On a graphical display, the window possesses
35a @dfn{scroll bar} on one side, which can be used to scroll through
36the buffer. The last line of the window is a @dfn{mode line}. This
33displays various information about what is going on in the buffer, 37displays various information about what is going on in the buffer,
34such as whether there are unsaved changes, the editing modes that are 38such as whether there are unsaved changes, the editing modes that are
35in use, the current line number, and so forth. 39in use, the current line number, and so forth.
@@ -37,20 +41,18 @@ in use, the current line number, and so forth.
37 When you start Emacs, there is normally only one window in the 41 When you start Emacs, there is normally only one window in the
38frame. However, you can subdivide this window horizontally or 42frame. However, you can subdivide this window horizontally or
39vertically to create multiple windows, each of which can independently 43vertically to create multiple windows, each of which can independently
40display a buffer (@pxref{Windows}). In this manual, the word 44display a buffer (@pxref{Windows}).
41``window'' refers to the initial large window if not subdivided, or 45
42any one of the multiple windows you have subdivided it into. 46 At any time, one window is the @dfn{selected window}. On a
43 47graphical display, the selected window shows a more prominent cursor
44 At any time, one window is the @dfn{selected window}. On graphical 48(usually solid and blinking); other windows show a less prominent
45displays, the selected window normally shows a more prominent cursor 49cursor (usually a hollow box). On a text terminal, there is only one
46(usually solid and blinking) while other windows show a weaker cursor 50cursor, which is shown in the selected window. The buffer displayed
47(such as a hollow box). Text terminals have just one cursor, so it 51in the selected window is called the @dfn{current buffer}, and it is
48always appears in the selected window. The buffer displayed in the 52where editing happens. Most Emacs commands implicitly apply to the
49selected window is called the @dfn{current buffer}, and it is where 53current buffer; the text displayed in unselected windows is mostly
50editing happens. Most Emacs commands implicitly apply to the current 54visible for reference. If you use multiple frames on a graphical
51buffer; the text displayed in unselected windows is mostly visible for 55display, selecting a particular frame selects a window in that frame.
52reference. If you use multiple frames on a graphical display,
53selecting a particular frame selects a window in that frame.
54 56
55@menu 57@menu
56* Point:: The place in the text where editing commands operate. 58* Point:: The place in the text where editing commands operate.
@@ -64,42 +66,33 @@ selecting a particular frame selects a window in that frame.
64@cindex point 66@cindex point
65@cindex cursor 67@cindex cursor
66 68
67 The active cursor shows the location at which editing commands will 69 The cursor in the selected window shows the location where most
68take effect, which is called @dfn{point}@footnote{The term ``point'' 70editing commands take effect, which is called @dfn{point}@footnote{The
69comes from the character @samp{.}, which was the command in TECO (the 71term ``point'' comes from the character @samp{.}, which was the
70language in which the original Emacs was written) for accessing the 72command in TECO (the language in which the original Emacs was written)
71value now called ``point.''}. Many Emacs commands move point to 73for accessing the editing position.}. Many Emacs commands move point
72different places in the buffer; for example, you can place point by 74to different places in the buffer; for example, you can place point by
73clicking mouse button 1 (normally the left button) at the desired 75clicking mouse button 1 (normally the left button) at the desired
74location. 76location.
75 77
76 If you use a block cursor, the cursor appears to be @emph{on} a 78 By default, the cursor in the selected window is drawn as a solid
77character, but you should think of point as @emph{between} two 79block and appears to be @emph{on} a character, but you should think of
78characters; it points @emph{before} the character that appears under 80point as @emph{between} two characters; it is situated @emph{before}
79the cursor. For example, if your text looks like @samp{frob} with the 81the character under the cursor. For example, if your text looks like
80cursor over the @samp{b}, then point is between the @samp{o} and the 82@samp{frob} with the cursor over the @samp{b}, then point is between
81@samp{b}. If you insert the character @samp{!} at that position, the 83the @samp{o} and the @samp{b}. If you insert the character @samp{!}
82result is @samp{fro!b}, with point between the @samp{!} and the 84at that position, the result is @samp{fro!b}, with point between the
83@samp{b}. Thus, the cursor remains over the @samp{b}, as before. 85@samp{!} and the @samp{b}. Thus, the cursor remains over the
84 86@samp{b}, as before.
85 Sometimes people speak of ``the cursor'' when they mean ``point,'' or
86speak of commands that move point as ``cursor motion'' commands.
87 87
88 If you are editing several files in Emacs, each in its own buffer, 88 If you are editing several files in Emacs, each in its own buffer,
89each buffer has its own point location. A buffer that is not 89each buffer has its own value of point. A buffer that is not
90currently displayed remembers its point location in case you display 90currently displayed remembers its value of point if you later display
91it again later. When Emacs displays multiple windows, each window has 91it again. Furthermore, if a buffer is displayed in multiple windows,
92its own point location. If the same buffer appears in more than one 92each of those windows has its own value of point.
93window, each window has its own point position in that buffer. 93
94 94 @xref{Cursor Display}, for options that control how Emacs displays
95 On a graphical display, Emacs shows a cursor in each window. The 95the cursor.
96selected window's cursor will be blinking. If you use the default,
97@code{box} cursor type, the selected window's cursor will be solid,
98and the other cursors are hollow. On a text-only terminal, there is
99just one cursor, in the selected window; even though the unselected
100windows have their own point positions, they do not display a cursor.
101@xref{Cursor Display}, for customizable variables that control cursor
102display.
103 96
104@node Echo Area 97@node Echo Area
105@section The Echo Area 98@section The Echo Area
@@ -108,40 +101,41 @@ display.
108 The line at the very bottom of the frame is the @dfn{echo area}. It 101 The line at the very bottom of the frame is the @dfn{echo area}. It
109is used to display small amounts of text for various purposes. 102is used to display small amounts of text for various purposes.
110 103
111 @dfn{Echoing} means displaying the characters that you type. 104@cindex echoing
112Single-character commands, including most simple editing operations, 105 The echo area is so-named because one of the things it is used for
113are not echoed. Multi-character commands are echoed if you pause 106is @dfn{echoing}, which means displaying the characters of a
114while typing them: if you pause for more than a second in the middle 107multi-character command as you type. Single-character commands are
115of a command, Emacs echoes all the characters of the command so far, 108not echoed. Multi-character commands (@pxref{Keys}) are echoed if you
116to prompt you for the rest of the command. The echoed characters are 109pause for more than a second in the middle of a command. Emacs then
117displayed in the echo area. Once echoing has started, the rest of the 110echoes all the characters of the command so far, to prompt you for the
118command echoes immediately as you type it. This behavior is designed 111rest. Once echoing has started, the rest of the command echoes
119to give confident users fast response, while giving hesitant users 112immediately as you type it. This behavior is designed to give
120maximum feedback. @xref{Display Custom}. 113confident users fast response, while giving hesitant users maximum
121 114feedback.
122@cindex error message in the echo area 115
123 If a command cannot do its job, it may display an @dfn{error 116@cindex error message
124message}. Error messages are also displayed in the echo area. They 117@cindex echo area message
125may be accompanied by beeping or by flashing the screen. 118 The echo area is also used to display an @dfn{error message} when a
126 119command cannot do its job. Error messages may be accompanied by
127 Some commands display informative messages in the echo area. Unlike 120beeping or by flashing the screen.
128error messages, these messages are not announced with a beep or flash. 121
129Sometimes the message tells you what the command has done, when this 122 Some commands display informative messages in the echo area to tell
130is not obvious from looking at the text being edited. Other times, 123you what the command has done, or to provide you with some specific
131the sole purpose of a command is to show you a message giving you 124information. These @dfn{informative} messages, unlike error messages,
132specific information. For example, @kbd{C-x =} (hold down @key{CTRL} 125are not accompanied with a beep or flash. For example, @kbd{C-x =}
133and type @kbd{x}, then let go of @key{CTRL} and type @kbd{=}) displays 126(hold down @key{CTRL} and type @kbd{x}, then let go of @key{CTRL} and
134a message describing the character position of point in the text and 127type @kbd{=}) displays a message describing the character at point,
135its current column in the window. Commands that take a long time 128its position in the buffer, and its current column in the window.
136often display messages ending in @samp{...} while they are working, 129Commands that take a long time often display messages ending in
137and add @samp{done} at the end when they are finished. They may also 130@samp{...} while they are working (sometimes also indicating how much
138indicate progress with percentages. 131progress has been made, as a percentage), and add @samp{done} when
132they are finished.
139 133
140@cindex @samp{*Messages*} buffer 134@cindex @samp{*Messages*} buffer
141@cindex saved echo area messages 135@cindex saved echo area messages
142@cindex messages saved from echo area 136@cindex messages saved from echo area
143@vindex message-log-max 137@vindex message-log-max
144 Informative echo-area messages are saved in a special buffer named 138 Informative echo area messages are saved in a special buffer named
145@samp{*Messages*}. (We have not explained buffers yet; see 139@samp{*Messages*}. (We have not explained buffers yet; see
146@ref{Buffers}, for more information about them.) If you miss a 140@ref{Buffers}, for more information about them.) If you miss a
147message that appeared briefly on the screen, you can switch to the 141message that appeared briefly on the screen, you can switch to the
@@ -152,15 +146,17 @@ either; see @ref{Variables}, for more information about them.) Beyond
152this limit, one line is deleted from the beginning whenever a new 146this limit, one line is deleted from the beginning whenever a new
153message line is added at the end. 147message line is added at the end.
154 148
149 @xref{Display Custom}, for options that control how Emacs uses the
150echo area.
151
155@cindex minibuffer 152@cindex minibuffer
156 The echo area is also used to display the @dfn{minibuffer}, a 153 The echo area is also used to display the @dfn{minibuffer}, a
157special window where you can input arguments to commands, such as the 154special window where you can input arguments to commands, such as the
158name of a file to be edited. When the minibuffer is in use, the text 155name of a file to be edited. When the minibuffer is in use, the text
159displayed in the echo area begins with a @dfn{prompt string} (usually 156displayed in the echo area begins with a @dfn{prompt string}, and the
160ending with a colon); also, the active cursor appears within the 157active cursor appears within the minibuffer, which is temporarily
161minibuffer, which is temporarily considered the selected window. You 158considered the selected window. You can always get out of the
162can always get out of the minibuffer by typing @kbd{C-g}. 159minibuffer by typing @kbd{C-g}. @xref{Minibuffer}.
163@xref{Minibuffer}.
164 160
165@node Mode Line 161@node Mode Line
166@section The Mode Line 162@section The Mode Line
@@ -171,47 +167,51 @@ can always get out of the minibuffer by typing @kbd{C-g}.
171what is going on in the current buffer. When there is only one 167what is going on in the current buffer. When there is only one
172window, the mode line appears right above the echo area; it is the 168window, the mode line appears right above the echo area; it is the
173next-to-last line in the frame. On a graphical display, the mode line 169next-to-last line in the frame. On a graphical display, the mode line
174is drawn with a 3D box appearance, and the mode line of the selected 170is drawn with a 3D box appearance. Emacs also usually draws the mode
175window has a brighter color than that of unselected windows to make it 171line of the selected window with a different color than that of
176stand out. On a text-only terminal, the mode line is usually drawn in 172unselected windows, in order to make it stand out.
177inverse video.
178 173
179 The text displayed in the mode line has the following format: 174 The text displayed in the mode line has the following format:
180 175
181@example 176@example
182-@var{cs}:@var{ch}-@var{fr} @var{buf} @var{pos} @var{line} (@var{major} @var{minor})------ 177 @var{cs}:@var{ch}-@var{fr} @var{buf} @var{pos} @var{line} (@var{major} @var{minor})
183@end example 178@end example
184 179
185@noindent 180@noindent
181On a text-only terminal, this text is followed by a series of dashes
182extending to the right edge of the window. These dashes are omitted
183on a graphical display.
184
186The @var{cs} string and the colon character after it describe the 185The @var{cs} string and the colon character after it describe the
187character set and newline convention used for the current buffer. 186character set and newline convention used for the current buffer.
188Normally, Emacs handles these settings intelligently, but it is 187Normally, Emacs automatically handles these settings for you, but it
189sometimes useful to have this information. 188is sometimes useful to have this information.
190 189
191 @var{cs} describes the character set of the buffer (@pxref{Coding 190 @var{cs} describes the character set of the text in the buffer
192Systems}). If it is a dash (@samp{-}), that indicates the default 191(@pxref{Coding Systems}). If it is a dash (@samp{-}), that indicates
193state of affairs: no special character set handling, except for the 192no special character set handling (with the possible expection of
194end-of-line translations described in the next paragraph. @samp{=} 193end-of-line conventions, described in the next paragraph). @samp{=}
195means no conversion whatsoever. Characters represent various nontrivial 194means no conversion whatsoever, and is usually used for files
195containing non-textual data. Other characters represent various
196@dfn{coding systems}---for example, @samp{1} represents ISO Latin-1. 196@dfn{coding systems}---for example, @samp{1} represents ISO Latin-1.
197On a text-only terminal, @var{cs} is preceded by two additional 197
198characters that describe the coding system for keyboard input and the 198 On a text-only terminal, @var{cs} is preceded by two additional
199coding system for terminal output. Furthermore, if you are using an 199characters that describe the coding systems for keyboard input and
200input method, @var{cs} is preceded by a string that identifies the 200terminal output. Furthermore, if you are using an input method,
201input method, which takes the form @samp{@var{i}>}, @samp{@var{i}+}, 201@var{cs} is preceded by a string that identifies the input method
202or @samp{@var{i}@@} (@pxref{Input Methods}). 202(@pxref{Input Methods}).
203 203
204@cindex end-of-line conversion, mode-line indication 204@cindex end-of-line convention, mode-line indication
205 The character after @var{cs} is usually a colon. However, under 205 The character after @var{cs} is usually a colon. If a different
206some circumstances a different string is displayed, which indicates a 206string is displayed, that indicates a nontrivial end-of-line
207nontrivial end-of-line convention. Usually, lines of text are 207convention for encoding a file. Usually, lines of text are separated
208separated by @dfn{newline characters}, but two other conventions are 208by @dfn{newline characters} in a file, but two other conventions are
209sometimes used. The MS-DOS convention is to use a ``carriage-return'' 209sometimes used. The MS-DOS convention uses a ``carriage-return''
210character followed by a ``linefeed'' character; when editing such 210character followed by a ``linefeed'' character; when editing such
211files, the colon changes to either a backslash (@samp{\}) or 211files, the colon changes to either a backslash (@samp{\}) or
212@samp{(DOS)}, depending on the operating system. The Macintosh 212@samp{(DOS)}, depending on the operating system. Another convention,
213end-of-line convention is to use a ``carriage-return'' character 213employed by older Macintosh systems, uses a ``carriage-return''
214instead of a newline; when editing such files, the colon indicator 214character instead of a newline; when editing such files, the colon
215changes to either a forward slash (@samp{/}) or @samp{(Mac)}. On some 215changes to either a forward slash (@samp{/}) or @samp{(Mac)}. On some
216systems, Emacs displays @samp{(Unix)} instead of the colon for files 216systems, Emacs displays @samp{(Unix)} instead of the colon for files
217that use newline as the line separator. 217that use newline as the line separator.
@@ -234,14 +234,14 @@ only on text-only terminals. The initial frame's name is @samp{F1}.
234Usually, this is the same as the name of a file you are editing. 234Usually, this is the same as the name of a file you are editing.
235@xref{Buffers}. 235@xref{Buffers}.
236 236
237 @var{pos} tells you whether there is additional text above the top of 237 @var{pos} tells you whether there is additional text above the top
238the window, or below the bottom. If your buffer is small and it is all 238of the window, or below the bottom. If your buffer is small and all
239visible in the window, @var{pos} is @samp{All}. Otherwise, it is 239of it is visible in the window, @var{pos} is @samp{All}. Otherwise,
240@samp{Top} if you are looking at the beginning of the buffer, @samp{Bot} 240it is @samp{Top} if you are looking at the beginning of the buffer,
241if you are looking at the end of the buffer, or @samp{@var{nn}%}, where 241@samp{Bot} if you are looking at the end of the buffer, or
242@var{nn} is the percentage of the buffer above the top of the window. 242@samp{@var{nn}%}, where @var{nn} is the percentage of the buffer above
243With Size Indication mode, you can display the size of the buffer as 243the top of the window. With Size Indication mode, you can display the
244well. @xref{Optional Mode Line}. 244size of the buffer as well. @xref{Optional Mode Line}.
245 245
246 @var{line} is the character @samp{L} followed by the line number at 246 @var{line} is the character @samp{L} followed by the line number at
247point. (You can display the current column number too, by turning on 247point. (You can display the current column number too, by turning on
@@ -249,16 +249,14 @@ Column Number mode. @xref{Optional Mode Line}.)
249 249
250 @var{major} is the name of the @dfn{major mode} used in the buffer. 250 @var{major} is the name of the @dfn{major mode} used in the buffer.
251A major mode is a principal editing mode for the buffer, such as Text 251A major mode is a principal editing mode for the buffer, such as Text
252mode, Lisp mode, C mode, and so forth. @xref{Major Modes}. 252mode, Lisp mode, C mode, and so forth. @xref{Major Modes}. Some
253 253major modes display additional information after the major mode name.
254 Some major modes display additional information after the major mode 254For example, Compilation buffers and Shell buffers display the status
255name. For example, Rmail buffers display the current message number and 255of the subprocess.
256the total number of messages. Compilation buffers and Shell buffers
257display the status of the subprocess.
258 256
259 @var{minor} is a list of some of the @dfn{minor modes} turned on in 257 @var{minor} is a list of some of the enabled @dfn{minor modes},
260the buffer. Minor modes are optional editing modes that provide 258which are optional editing modes that provide additional features on
261additional features on top of the major mode. @xref{Minor Modes}. 259top of the major mode. @xref{Minor Modes}.
262 260
263 Some features are listed together with the minor modes whenever they 261 Some features are listed together with the minor modes whenever they
264are turned on, even though they are not really minor modes. 262are turned on, even though they are not really minor modes.
@@ -271,9 +269,8 @@ restricted to only a portion of its text (@pxref{Narrowing}).
271brackets (@samp{[@dots{}]}) appear around the parentheses that 269brackets (@samp{[@dots{}]}) appear around the parentheses that
272surround the modes. If Emacs is in one recursive editing level within 270surround the modes. If Emacs is in one recursive editing level within
273another, double square brackets appear, and so on. Since recursive 271another, double square brackets appear, and so on. Since recursive
274editing levels affect Emacs globally, not just one buffer, the square 272editing levels affect Emacs globally, such square brackets appear in
275brackets appear in every window's mode line or not in any of them. 273the mode line of every window. @xref{Recursive Edit}.
276@xref{Recursive Edit}.@refill
277 274
278 You can change the appearance of the mode line as well as the format 275 You can change the appearance of the mode line as well as the format
279of its contents. @xref{Optional Mode Line}. In addition, the mode 276of its contents. @xref{Optional Mode Line}. In addition, the mode
@@ -293,10 +290,10 @@ here, as you can more easily see them yourself.
293@findex tmm-menubar 290@findex tmm-menubar
294@findex menu-bar-open 291@findex menu-bar-open
295 On a graphical display, you can use the mouse to choose a command 292 On a graphical display, you can use the mouse to choose a command
296from the menu bar. A right-arrow at the end of a menu item means it 293from the menu bar. An arrow on the right edge of a menu item means it
297leads to a subsidiary menu, or @dfn{submenu}. A @samp{...} at the end 294leads to a subsidiary menu, or @dfn{submenu}. A @samp{...} at the end
298of a menu item means that the command invoked will prompt you for 295of a menu item means that the command will prompt you for further
299further input before it actually does anything. 296input before it actually does anything.
300 297
301 Some of the commands in the menu bar have ordinary key bindings as 298 Some of the commands in the menu bar have ordinary key bindings as
302well; if so, a key binding is shown in parentheses after the item 299well; if so, a key binding is shown in parentheses after the item
@@ -310,14 +307,13 @@ You can then navigate the menus with the arrow keys. To activate a
310selected menu item, press @key{RET}; to cancel menu navigation, press 307selected menu item, press @key{RET}; to cancel menu navigation, press
311@key{ESC}. 308@key{ESC}.
312 309
313 On text-only terminals with no mouse, you can use the menu bar by 310 On a text-only terminal, you can use the menu bar by typing
314typing @kbd{M-`} or @key{F10} (these run the command 311@kbd{M-`} or @key{F10} (these run the command @code{tmm-menubar}).
315@code{tmm-menubar}). This lets you select a menu item with the 312This lets you select a menu item with the keyboard. A provisional
316keyboard. A provisional choice appears in the echo area. You can use 313choice appears in the echo area. You can use the up and down arrow
317the up and down arrow keys to move through the menu to different 314keys to move through the menu to different items, and then you can
318items, and then you can type @key{RET} to select the item. 315type @key{RET} to select the item. Each menu item is also designated
319 316by a letter or digit (usually the initial of some word in the item's
320 Each menu item also has an assigned letter or digit which designates 317name). This letter or digit is separated from the item name by
321that item; it is usually the initial of some word in the item's name. 318@samp{=>}. You can type the item's letter or digit to select the
322This letter or digit is separated from the item name by @samp{=>}. You 319item.
323can type the item's letter or digit to select the item.
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi
index 0b0e4867ae5..96ccaa2b3c4 100644
--- a/doc/emacs/text.texi
+++ b/doc/emacs/text.texi
@@ -332,6 +332,8 @@ pages are often meaningful divisions of the file, Emacs provides
332commands to move over them and operate on them. 332commands to move over them and operate on them.
333 333
334@table @kbd 334@table @kbd
335@item M-x what-page
336Display the page number of point, and the line number within that page.
335@item C-x [ 337@item C-x [
336Move point to previous page boundary (@code{backward-page}). 338Move point to previous page boundary (@code{backward-page}).
337@item C-x ] 339@item C-x ]
@@ -342,6 +344,10 @@ Put point and mark around this page (or another page) (@code{mark-page}).
342Count the lines in this page (@code{count-lines-page}). 344Count the lines in this page (@code{count-lines-page}).
343@end table 345@end table
344 346
347@findex what-page
348 @kbd{M-x what-page} counts pages from the beginning of the file, and
349counts lines within the page, showing both numbers in the echo area.
350
345@kindex C-x [ 351@kindex C-x [
346@kindex C-x ] 352@kindex C-x ]
347@findex forward-page 353@findex forward-page
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 27c2597c6a3..f822b4bebdf 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,23 @@
12011-10-09 Martin Rudalics <rudalics@gmx.at>
2
3 * buffers.texi (The Buffer List): Describe how bury-buffer deals
4 with the selected window.
5 * windows.texi (Buffers and Windows): Reformulate text on how
6 replace-buffer-in-windows deals with a window.
7 (Quitting Windows): Describe how quit-window deals with a
8 standalone frame. Describe new option frame-auto-hide-function.
9
102011-10-08 Glenn Morris <rgm@gnu.org>
11
12 * symbols.texi (Other Plists): Markup fix. (Bug#9702)
13
14 * positions.texi (Excursions): Update warning message.
15
162011-10-05 Chong Yidong <cyd@stupidchicken.com>
17
18 * display.texi (Low-Level Font, Face Attributes, Font Lookup): Fix
19 Emacs manual xref (Bug#9675).
20
12011-10-01 Chong Yidong <cyd@stupidchicken.com> 212011-10-01 Chong Yidong <cyd@stupidchicken.com>
2 22
3 * windows.texi (Textual Scrolling): Document scroll-up-command, 23 * windows.texi (Textual Scrolling): Document scroll-up-command,
diff --git a/doc/lispref/buffers.texi b/doc/lispref/buffers.texi
index ce1a8b0fb4e..816d0f9faa8 100644
--- a/doc/lispref/buffers.texi
+++ b/doc/lispref/buffers.texi
@@ -884,23 +884,28 @@ This buffer therefore becomes the least desirable candidate for
884@code{other-buffer} to return. The argument can be either a buffer 884@code{other-buffer} to return. The argument can be either a buffer
885itself or the name of one. 885itself or the name of one.
886 886
887@code{bury-buffer} operates on each frame's @code{buffer-list} parameter 887This functions operates on each frame's @code{buffer-list} parameter as
888as well as the fundamental buffer list; therefore, the buffer that you 888well as the fundamental buffer list; therefore, the buffer that you bury
889bury will come last in the value of @code{(buffer-list @var{frame})} and 889will come last in the value of @code{(buffer-list @var{frame})} and in
890in the value of @code{(buffer-list)}. 890the value of @code{(buffer-list)}. In addition, it also puts the buffer
891 891at the end of the list of buffer of the selected window (@pxref{Window
892If @var{buffer-or-name} is @code{nil} or omitted, this means to bury 892History}) provided it is shown in that window.
893the current buffer. In addition, if the buffer is displayed in the 893
894selected window, this switches to some other buffer (obtained using 894If @var{buffer-or-name} is @code{nil} or omitted, this means to bury the
895@code{other-buffer}) in the selected window. @xref{Switching 895current buffer. In addition, if the current buffer is displayed in the
896Buffers}. But if the selected window is dedicated to its buffer, it 896selected window, this makes sure that the window is either deleted or
897deletes that window if there are other windows left on its frame. 897another buffer is shown in it. More precisely, if the window is
898Otherwise, if the selected window is the only window on its frame, it 898dedicated (@pxref{Dedicated Windows}) and there are other windows on its
899iconifies that frame. If @var{buffer-or-name} is displayed in some 899frame, the window is deleted. If the window is both dedicated and the
900only window on its frame's terminal, the function specified by
901@code{frame-auto-hide-function} (@pxref{Quitting Windows}) will deal
902with the window. If the window is not dedicated to its buffer, it calls
903@code{switch-to-prev-buffer} (@pxref{Window History}) to show another
904buffer in that window. If @var{buffer-or-name} is displayed in some
900other window, it remains displayed there. 905other window, it remains displayed there.
901 906
902To replace a buffer in all the windows that display it, use 907To replace a buffer in all the windows that display it, use
903@code{replace-buffer-in-windows}. @xref{Buffers and Windows}. 908@code{replace-buffer-in-windows}, @xref{Buffers and Windows}.
904@end deffn 909@end deffn
905 910
906@deffn Command unbury-buffer 911@deffn Command unbury-buffer
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 724c46300fd..18cb93557e9 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -2148,12 +2148,11 @@ When specifying this attribute using @code{set-face-attribute}
2148entity, or a string. Emacs converts such values to an appropriate 2148entity, or a string. Emacs converts such values to an appropriate
2149font object, and stores that font object as the actual attribute 2149font object, and stores that font object as the actual attribute
2150value. If you specify a string, the contents of the string should be 2150value. If you specify a string, the contents of the string should be
2151a font name (@pxref{Font X,, Font Specification Options, emacs, The 2151a font name (@pxref{Fonts,,, emacs, The GNU Emacs Manual}); if the
2152GNU Emacs Manual}); if the font name is an XLFD containing wildcards, 2152font name is an XLFD containing wildcards, Emacs chooses the first
2153Emacs chooses the first font matching those wildcards. Specifying 2153font matching those wildcards. Specifying this attribute also changes
2154this attribute also changes the values of the @code{:family}, 2154the values of the @code{:family}, @code{:foundry}, @code{:width},
2155@code{:foundry}, @code{:width}, @code{:height}, @code{:weight}, and 2155@code{:height}, @code{:weight}, and @code{:slant} attributes.
2156@code{:slant} attributes.
2157 2156
2158@item :inherit 2157@item :inherit
2159The name of a face from which to inherit attributes, or a list of face 2158The name of a face from which to inherit attributes, or a list of face
@@ -2854,11 +2853,11 @@ nominal heights and widths would suggest.
2854@defun x-list-fonts name &optional reference-face frame maximum width 2853@defun x-list-fonts name &optional reference-face frame maximum width
2855This function returns a list of available font names that match 2854This function returns a list of available font names that match
2856@var{name}. @var{name} should be a string containing a font name in 2855@var{name}. @var{name} should be a string containing a font name in
2857either the Fontconfig, GTK, or XLFD format (@pxref{Font X,, Font 2856either the Fontconfig, GTK, or XLFD format (@pxref{Fonts,,, emacs, The
2858Specification Options, emacs, The GNU Emacs Manual}). Within an XLFD 2857GNU Emacs Manual}). Within an XLFD string, wildcard characters may be
2859string, wildcard characters may be used: the @samp{*} character 2858used: the @samp{*} character matches any substring, and the @samp{?}
2860matches any substring, and the @samp{?} character matches any single 2859character matches any single character. Case is ignored when matching
2861character. Case is ignored when matching font names. 2860font names.
2862 2861
2863If the optional arguments @var{reference-face} and @var{frame} are 2862If the optional arguments @var{reference-face} and @var{frame} are
2864specified, the returned list includes only fonts that are the same 2863specified, the returned list includes only fonts that are the same
@@ -3108,8 +3107,7 @@ specifications are as follows:
3108@table @code 3107@table @code
3109@item :name 3108@item :name
3110The font name (a string), in either XLFD, Fontconfig, or GTK format. 3109The font name (a string), in either XLFD, Fontconfig, or GTK format.
3111@xref{Font X,, Font Specification Options, emacs, The GNU Emacs 3110@xref{Fonts,,, emacs, The GNU Emacs Manual}.
3112Manual}.
3113 3111
3114@item :family 3112@item :family
3115@itemx :foundry 3113@itemx :foundry
@@ -3226,10 +3224,9 @@ specified by @var{font}.
3226 3224
3227@defun font-xlfd-name font &optional fold-wildcards 3225@defun font-xlfd-name font &optional fold-wildcards
3228This function returns the XLFD (X Logical Font Descriptor), a string, 3226This function returns the XLFD (X Logical Font Descriptor), a string,
3229matching @var{font}. @xref{Font X,, Font Specification Options, 3227matching @var{font}. @xref{Fonts,,, emacs, The GNU Emacs Manual}, for
3230emacs, The GNU Emacs Manual}, for information about XLFDs. If the 3228information about XLFDs. If the name is too long for an XLFD (which
3231name is too long for an XLFD (which can contain at most 255 3229can contain at most 255 characters), the function returns @code{nil}.
3232characters), the function returns @code{nil}.
3233 3230
3234If the optional argument @var{fold-wildcards} is non-@code{nil}, 3231If the optional argument @var{fold-wildcards} is non-@code{nil},
3235consecutive wildcards in the XLFD are folded into one. 3232consecutive wildcards in the XLFD are folded into one.
diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi
index 1124d58ebcc..74444c7ad60 100644
--- a/doc/lispref/positions.texi
+++ b/doc/lispref/positions.texi
@@ -832,7 +832,7 @@ consequences, so the byte compiler warns if you call @code{set-buffer}
832during an excursion: 832during an excursion:
833 833
834@example 834@example
835Warning: @code{save-excursion} defeated by @code{set-buffer} 835Warning: Use `with-current-buffer' rather than save-excursion+set-buffer
836@end example 836@end example
837 837
838@noindent 838@noindent
diff --git a/doc/lispref/symbols.texi b/doc/lispref/symbols.texi
index 60d14d567d4..79b3249d760 100644
--- a/doc/lispref/symbols.texi
+++ b/doc/lispref/symbols.texi
@@ -541,7 +541,7 @@ returns @code{nil}. For example,
541(plist-get '(foo 4 bad) 'foo) 541(plist-get '(foo 4 bad) 'foo)
542 @result{} 4 542 @result{} 4
543(plist-get '(foo 4 bad) 'bad) 543(plist-get '(foo 4 bad) 'bad)
544 @result{} @code{nil} 544 @result{} nil
545(plist-get '(foo 4 bad) 'bar) 545(plist-get '(foo 4 bad) 'bar)
546 @result{} nil 546 @result{} nil
547@end example 547@end example
diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi
index bffea19210c..41ccbaafd49 100644
--- a/doc/lispref/windows.texi
+++ b/doc/lispref/windows.texi
@@ -2076,16 +2076,17 @@ This command replaces @var{buffer-or-name} with some other buffer, in
2076all windows displaying it. For each such window, it choose another 2076all windows displaying it. For each such window, it choose another
2077buffer using @code{switch-to-prev-buffer} (@pxref{Window History}). 2077buffer using @code{switch-to-prev-buffer} (@pxref{Window History}).
2078 2078
2079@var{buffer-or-name} may be a buffer, or the name of an existing 2079The argument @var{buffer-or-name} may be a buffer, or the name of an
2080buffer; it defaults to the current buffer. 2080existing buffer; it defaults to the current buffer.
2081 2081
2082If a window displaying @var{buffer-or-name} is dedicated 2082If a window displaying @var{buffer-or-name} is dedicated
2083(@pxref{Dedicated Windows}), has never displayed any other buffers and 2083(@pxref{Dedicated Windows}) and is not the only window on its frame,
2084is not the only window on its frame, that window is deleted. If that 2084that window is deleted. If that window is the only window on its frame
2085window is the only window on its frame and there are other frames on the 2085and there are other frames on the frame's terminal, that frame is dealt
2086frame's terminal, that frame is deleted too; otherwise, the buffer 2086with by the function spcecified by @code{frame-auto-hide-function}
2087provided by the function @code{switch-to-prev-buffer} (@pxref{Window 2087(@pxref{Quitting Windows}). Otherwise, the buffer provided by the
2088History}) is displayed instead. 2088function @code{switch-to-prev-buffer} (@pxref{Window History}) is
2089displayed in the window instead.
2089@end deffn 2090@end deffn
2090 2091
2091 2092
@@ -2784,14 +2785,14 @@ non-@code{nil} value.
2784@section Quitting Windows 2785@section Quitting Windows
2785 2786
2786When you want to get rid of a window used for displaying a buffer you 2787When you want to get rid of a window used for displaying a buffer you
2787can use the function @code{delete-window} (@pxref{Deleting Windows}) to 2788can call @code{delete-window} or @code{delete-windows-on}
2788remove that window from its frame. If the buffer has been shown on a 2789(@pxref{Deleting Windows}) to remove that window from its frame. If the
2789separate frame, you might want to call @code{delete-frame} 2790buffer is shown on a separate frame, you might want to call
2790(@pxref{Deleting Frames}) instead. If, on the other hand, a window has 2791@code{delete-frame} (@pxref{Deleting Frames}) instead. If, on the other
2791been reused for displaying the buffer, you might prefer showing the 2792hand, a window has been reused for displaying the buffer, you might
2792buffer previously shown in that window by calling the function 2793prefer showing the buffer previously shown in that window by calling the
2793@code{switch-to-prev-buffer} (@pxref{Window History}). Finally, you 2794function @code{switch-to-prev-buffer} (@pxref{Window History}).
2794might want to either bury (@pxref{The Buffer List}) or kill 2795Finally, you might want to either bury (@pxref{The Buffer List}) or kill
2795(@pxref{Killing Buffers}) the window's buffer. 2796(@pxref{Killing Buffers}) the window's buffer.
2796 2797
2797 The following function uses information on how the window for 2798 The following function uses information on how the window for
@@ -2807,9 +2808,12 @@ instead of burying it.
2807Quitting @var{window} means to proceed as follows: If @var{window} was 2808Quitting @var{window} means to proceed as follows: If @var{window} was
2808created specially for displaying its current buffer, delete @var{window} 2809created specially for displaying its current buffer, delete @var{window}
2809provided its frame contains at least one other live window. If 2810provided its frame contains at least one other live window. If
2810@var{window} is the only window on its frame and other frames still 2811@var{window} is the only window on its frame and there are other frames
2811exist, delete the frame together with @var{window}. If, however, there 2812on the frame's terminal, the value of @var{kill} determines how to
2812are no other frames left, display some other buffer in @var{window}. 2813proceed with the window. If @var{kill} is @code{nil}, the fate of the
2814frame is determined by calling @code{frame-auto-hide-function} (see
2815below) with that frame as sole argument. If @var{kill} is
2816non-@code{nil}, the frame is deleted unconditionally.
2813 2817
2814If @var{window} was reused for displaying its buffer, this command tries 2818If @var{window} was reused for displaying its buffer, this command tries
2815to display the buffer previously shown in it. It also tries to restore 2819to display the buffer previously shown in it. It also tries to restore
@@ -2831,6 +2835,31 @@ stored in @var{window}'s @code{quit-restore} window parameter
2831(@pxref{Window Parameters}) and resets that parameter to @code{nil} 2835(@pxref{Window Parameters}) and resets that parameter to @code{nil}
2832after it's done. 2836after it's done.
2833 2837
2838The following option specifies how to deal with a frame containing just
2839one window that shall be either quit or whose buffer shall be buried.
2840
2841@defopt frame-auto-hide-function
2842The function specified by this option is called to automatically hide
2843frames. This function is called with one argument - a frame.
2844
2845The function specified here is called by @code{bury-buffer} (@pxref{The
2846Buffer List}) when the selected window is dedicated and shows the buffer
2847that shall be buried. It is also called by @code{quit-window} (see
2848above) when the frame of the window that shall be quit has been
2849specially created for displaying that window's buffer and the buffer
2850shall be buried.
2851
2852The default is to call @code{iconify-frame} (@pxref{Visibility of
2853Frames}). Alternatively, you may either specify @code{delete-frame}
2854(@pxref{Deleting Frames}) to remove the frame from its display,
2855@code{ignore} to leave the frame unchanged, or any other function that
2856can take a frame as its sole argument.
2857
2858Note that the function specified by this option is called if and only if
2859there's at least one other frame on the terminal of the frame it's
2860supposed to handle and that frame contains only one live window.
2861@end defopt
2862
2834 2863
2835@node Window Point 2864@node Window Point
2836@section Windows and Point 2865@section Windows and Point
diff --git a/doc/man/ChangeLog b/doc/man/ChangeLog
index a5146be9175..b9175ce51ea 100644
--- a/doc/man/ChangeLog
+++ b/doc/man/ChangeLog
@@ -1,3 +1,7 @@
12011-10-06 Chong Yidong <cyd@stupidchicken.com>
2
3 * emacsclient.1: Document how -a "" starts the daemon.
4
12011-09-17 Sven Joachim <svenjoac@gmx.de> 52011-09-17 Sven Joachim <svenjoac@gmx.de>
2 6
3 * emacs.1: Escape a dash. 7 * emacs.1: Escape a dash.
diff --git a/doc/man/emacsclient.1 b/doc/man/emacsclient.1
index 4020b6c0b6a..a5abcff0d5d 100644
--- a/doc/man/emacsclient.1
+++ b/doc/man/emacsclient.1
@@ -52,8 +52,8 @@ options starting with two dashes (`-').
52.B \-a, \-\-alternate-editor=EDITOR 52.B \-a, \-\-alternate-editor=EDITOR
53if the Emacs server is not running, run the specified editor instead. 53if the Emacs server is not running, run the specified editor instead.
54This can also be specified via the `ALTERNATE_EDITOR' environment variable. 54This can also be specified via the `ALTERNATE_EDITOR' environment variable.
55If the value of EDITOR is the empty string, then Emacs is started in 55If the value of EDITOR is the empty string, run `emacs --daemon' to
56daemon mode and emacsclient will try to connect to it. 56start Emacs in daemon mode, and try to connect to it.
57.TP 57.TP
58.B -c, \-\-create-frame 58.B -c, \-\-create-frame
59create a new frame instead of trying to use the current Emacs frame 59create a new frame instead of trying to use the current Emacs frame
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 6af229bbdda..b1bc1cffec2 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,12 @@
12011-10-08 Glenn Morris <rgm@gnu.org>
2
3 * Makefile.in: Fix ert rules.
4
52011-10-06 Lars Magne Ingebrigtsen <larsi@gnus.org>
6
7 * gnus.texi (Gnus Utility Functions): Add more references and
8 explanations (bug#9683).
9
12011-09-21 Lars Magne Ingebrigtsen <larsi@gnus.org> 102011-09-21 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 11
3 * gnus.texi (Archived Messages): Note the default (bug#9552). 12 * gnus.texi (Archived Messages): Note the default (bug#9552).
diff --git a/doc/misc/Makefile.in b/doc/misc/Makefile.in
index 28a949f81e2..34f136b09ff 100644
--- a/doc/misc/Makefile.in
+++ b/doc/misc/Makefile.in
@@ -370,12 +370,13 @@ erc.pdf: ${srcdir}/erc.texi
370 $(ENVADD) $(TEXI2PDF) $< 370 $(ENVADD) $(TEXI2PDF) $<
371 371
372ert : $(infodir)/ert 372ert : $(infodir)/ert
373$(infodir)/ert: ert.texi $(infodir) 373$(infodir)/ert: ert.texi
374 cd $(srcdir); $(MAKEINFO) ert.texi 374 $(mkinfodir)
375ert.dvi: ert.texi 375 cd $(srcdir); $(MAKEINFO) $(MAKEINFO_OPTS) $<
376 $(ENVADD) $(TEXI2DVI) ${srcdir}/ert.texi 376ert.dvi: ${srcdir}/ert.texi
377ert.pdf: ert.texi 377 $(ENVADD) $(TEXI2DVI) $<
378 $(ENVADD) $(TEXI2PDF) ${srcdir}/ert.texi 378ert.pdf: ${srcdir}/ert.texi
379 $(ENVADD) $(TEXI2PDF) $<
379 380
380eshell : $(infodir)/eshell 381eshell : $(infodir)/eshell
381$(infodir)/eshell: eshell.texi 382$(infodir)/eshell: eshell.texi
diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 211bfdb5509..ad1d45cca1a 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -29093,7 +29093,7 @@ Takes an unprefixed group name and a select method, and returns the full
29093 29093
29094@item gnus-get-info 29094@item gnus-get-info
29095@findex gnus-get-info 29095@findex gnus-get-info
29096Returns the group info list for @var{group}. 29096Returns the group info list for @var{group} (@pxref{Group Info}).
29097 29097
29098@item gnus-group-unread 29098@item gnus-group-unread
29099@findex gnus-group-unread 29099@findex gnus-group-unread
@@ -29102,7 +29102,8 @@ unknown.
29102 29102
29103@item gnus-active 29103@item gnus-active
29104@findex gnus-active 29104@findex gnus-active
29105The active entry for @var{group}. 29105The active entry (i.e., a cons cell containing the lowest and highest
29106article numbers) for @var{group}.
29106 29107
29107@item gnus-set-active 29108@item gnus-set-active
29108@findex gnus-set-active 29109@findex gnus-set-active
@@ -29137,7 +29138,9 @@ Returns the select method corresponding to @var{server}.
29137 29138
29138@item gnus-server-equal 29139@item gnus-server-equal
29139@findex gnus-server-equal 29140@findex gnus-server-equal
29140Says whether two virtual servers are equal. 29141Says whether two virtual servers are essentially equal. For instance,
29142two virtual servers may have server parameters in different order, but
29143this function will consider them equal.
29141 29144
29142@item gnus-group-native-p 29145@item gnus-group-native-p
29143@findex gnus-group-native-p 29146@findex gnus-group-native-p
@@ -29153,8 +29156,9 @@ Says whether @var{group} is foreign or not.
29153 29156
29154@item gnus-group-find-parameter 29157@item gnus-group-find-parameter
29155@findex gnus-group-find-parameter 29158@findex gnus-group-find-parameter
29156Returns the parameter list of @var{group}. If given a second parameter, 29159Returns the parameter list of @var{group} (@pxref{Group Parameters}).
29157returns the value of that parameter for @var{group}. 29160If given a second parameter, returns the value of that parameter for
29161@var{group}.
29158 29162
29159@item gnus-group-set-parameter 29163@item gnus-group-set-parameter
29160@findex gnus-group-set-parameter 29164@findex gnus-group-set-parameter