aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/ChangeLog73
-rw-r--r--doc/emacs/arevert-xtra.texi10
-rw-r--r--doc/emacs/basic.texi2
-rw-r--r--doc/emacs/buffers.texi110
-rw-r--r--doc/emacs/calendar.texi13
-rw-r--r--doc/emacs/commands.texi2
-rw-r--r--doc/emacs/custom.texi21
-rw-r--r--doc/emacs/display.texi405
-rw-r--r--doc/emacs/emacs.texi4
-rw-r--r--doc/emacs/files.texi667
-rw-r--r--doc/emacs/fixit.texi93
-rw-r--r--doc/emacs/fortran-xtra.texi2
-rw-r--r--doc/emacs/frames.texi121
-rw-r--r--doc/emacs/help.texi2
-rw-r--r--doc/emacs/killing.texi2
-rw-r--r--doc/emacs/kmacro.texi2
-rw-r--r--doc/emacs/macos.texi2
-rw-r--r--doc/emacs/mini.texi86
-rw-r--r--doc/emacs/programs.texi2
-rw-r--r--doc/emacs/rmail.texi13
-rw-r--r--doc/emacs/screen.texi2
-rw-r--r--doc/emacs/search.texi215
-rw-r--r--doc/emacs/windows.texi4
-rw-r--r--doc/misc/ChangeLog6
-rw-r--r--doc/misc/trampver.texi2
25 files changed, 934 insertions, 927 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 15b84c27075..a1310e87b15 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,76 @@
12011-10-24 Chong Yidong <cyd@gnu.org>
2
3 * display.texi (Scrolling): Document scroll-up-line and
4 scroll-down-line. Document scroll-command property.
5 (Recentering): New node, split off from Scrolling.
6
72011-10-23 Chong Yidong <cyd@gnu.org>
8
9 * frames.texi (Scroll Bars): GTK uses right scroll bars now.
10 (Tool Bars): Copyedits.
11
12 * buffers.texi (Misc Buffer): Don't mention vc-toggle-read-only.
13
142011-10-22 Chong Yidong <cyd@gnu.org>
15
16 * windows.texi (Displaying Buffers): Fix broken lispref link.
17
182011-10-22 Chong Yidong <cyd@gnu.org>
19
20 * mini.texi (Minibuffer Exit): Rename from Strict Completion.
21 Move confirm-nonexistent-file-or-buffer discussion here.
22
23 * files.texi (File Names, Visiting): Move detailed discussion of
24 minibuffer confirmation to Minibuffer Exit.
25
26 * buffers.texi (Buffers): Tweak mention of mail buffer name.
27 (Select Buffer): Move confirmation discussion to Minibuffer Exit.
28
292011-10-21 Chong Yidong <cyd@gnu.org>
30
31 * files.texi (File Names, Visiting, Interlocking): Copyedits.
32 (Backup Copying): backup-by-copying-when-mismatch is now t.
33 (Customize Save): Fix description of require-final-newline.
34 (Reverting): Note that revert-buffer can't be undone. Mention VC.
35 (Auto Save Control): Clarify.
36 (File Archives): Add 7z.
37 (Remote Files): ange-ftp-make-backup-files defaults to nil.
38
39 * arevert-xtra.texi (Autorevert): Copyedits.
40
412011-10-20 Chong Yidong <cyd@gnu.org>
42
43 * custom.texi (Hooks, Init Examples):
44 * display.texi (Font Lock):
45 * fixit.texi (Spelling):
46 * rmail.texi (Rmail Display): Minor mode function with no arg now
47 enables it.
48
49 * fixit.texi (Spelling): Fix description of inline completion.
50
512011-10-19 Chong Yidong <cyd@gnu.org>
52
53 * search.texi (Repeat Isearch, Error in Isearch): Add kindex
54 entries.
55 (Isearch Yank): Document isearch-yank-pop.
56 (Isearch Scroll): Refer to C-l instead of unbound `recenter'.
57 (Other Repeating Search): Document Occur Edit mode.
58
592011-10-18 Chong Yidong <cyd@gnu.org>
60
61 * display.texi (Fringes): Move overflow-newline-into-fringe here,
62 from Line Truncation node.
63 (Standard Faces): Note that only the background of the cursor face
64 has an effect.
65 (Cursor Display): Fix descriptions of cursor face
66 and bar cursor blinking.
67 (Text Display): Document nobreak-char-display more clearly.
68 (Line Truncation): Add xref to Split Window node.
69 (Display Custom): Don't bother documenting baud-rate or
70 no-redraw-on-reenter.
71
72 * search.texi (Slow Isearch): Node removed.
73
12011-10-18 Glenn Morris <rgm@gnu.org> 742011-10-18 Glenn Morris <rgm@gnu.org>
2 75
3 * maintaining.texi (Registering): Remove vc-initial-comment. (Bug#9745) 76 * maintaining.texi (Registering): Remove vc-initial-comment. (Bug#9745)
diff --git a/doc/emacs/arevert-xtra.texi b/doc/emacs/arevert-xtra.texi
index 374886cd956..6a24646b5f7 100644
--- a/doc/emacs/arevert-xtra.texi
+++ b/doc/emacs/arevert-xtra.texi
@@ -8,11 +8,11 @@
8@section Auto Reverting Non-File Buffers 8@section Auto Reverting Non-File Buffers
9 9
10Global Auto Revert Mode normally only reverts file buffers. There are 10Global Auto Revert Mode normally only reverts file buffers. There are
11two ways to auto-revert certain non-file buffers: enabling Auto Revert 11two ways to auto-revert certain non-file buffers: by enabling Auto
12Mode in those buffers (using @kbd{M-x auto-revert-mode}); and setting 12Revert Mode in those buffers (using @kbd{M-x auto-revert-mode}); and
13@code{global-auto-revert-non-file-buffers} non-@code{nil}. The latter 13by setting @code{global-auto-revert-non-file-buffers} to a
14enables Auto Reverting for all types of buffers for which it is 14non-@code{nil} value. The latter enables Auto Reverting for all types
15implemented (listed in the menu below). 15of buffers for which it is implemented (listed in the menu below).
16 16
17Like file buffers, non-file buffers should normally not revert while 17Like file buffers, non-file buffers should normally not revert while
18you are working on them, or while they contain information that might 18you are working on them, or while they contain information that might
diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi
index 714e03720bc..abb65982873 100644
--- a/doc/emacs/basic.texi
+++ b/doc/emacs/basic.texi
@@ -367,7 +367,7 @@ the preceding newline, joining this line to the previous one.
367 If, however, the region is active, @kbd{@key{DEL}} instead deletes 367 If, however, the region is active, @kbd{@key{DEL}} instead deletes
368the text in the region. @xref{Mark}, for a description of the region. 368the text in the region. @xref{Mark}, for a description of the region.
369 369
370 On most keyboards, @key{DEL} is labelled @key{Backspace}, but we 370 On most keyboards, @key{DEL} is labeled @key{Backspace}, but we
371refer to it as @key{DEL} in this manual. (Do not confuse @key{DEL} 371refer to it as @key{DEL} in this manual. (Do not confuse @key{DEL}
372with the @key{Delete} key; we will discuss @key{Delete} momentarily.) 372with the @key{Delete} key; we will discuss @key{Delete} momentarily.)
373On some text-only terminals, Emacs may not recognize the @key{DEL} key 373On some text-only terminals, Emacs may not recognize the @key{DEL} key
diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi
index b82f3fac7d4..302693aecef 100644
--- a/doc/emacs/buffers.texi
+++ b/doc/emacs/buffers.texi
@@ -7,11 +7,11 @@
7 7
8@cindex buffers 8@cindex buffers
9 The text you are editing in Emacs resides in an object called a 9 The text you are editing in Emacs resides in an object called a
10@dfn{buffer}. Each time you visit a file, a buffer is created to hold the 10@dfn{buffer}. Each time you visit a file, a buffer is used to hold
11file's text. Each time you invoke Dired, a buffer is created to hold the 11the file's text. Each time you invoke Dired, a buffer is used to hold
12directory listing. If you send a message with @kbd{C-x m}, a buffer named 12the directory listing. If you send a message with @kbd{C-x m}, a
13@samp{*mail*} is used to hold the text of the message. When you ask for a 13buffer is used to hold the text of the message. When you ask for a
14command's documentation, that appears in a buffer called @samp{*Help*}. 14command's documentation, that appears in a buffer named @samp{*Help*}.
15 15
16 Each buffer has a unique name, which can be of any length. When a 16 Each buffer has a unique name, which can be of any length. When a
17buffer is displayed in a window, its name is shown in the mode line 17buffer is displayed in a window, its name is shown in the mode line
@@ -19,35 +19,34 @@ buffer is displayed in a window, its name is shown in the mode line
19matters in buffer names. Most buffers are made by visiting files, and 19matters in buffer names. Most buffers are made by visiting files, and
20their names are derived from the files' names; however, you can also 20their names are derived from the files' names; however, you can also
21create an empty buffer with any name you want. A newly started Emacs 21create an empty buffer with any name you want. A newly started Emacs
22has a buffer named @samp{*scratch*}, which is not associated with any 22has several buffers, including one named @samp{*scratch*}, which can
23file and can be used for evaluating Lisp expressions in Emacs 23be used for evaluating Lisp expressions and is not associated with any
24(@pxref{Lisp Interaction}). 24file (@pxref{Lisp Interaction}).
25 25
26@cindex selected buffer 26@cindex selected buffer
27@cindex current buffer 27@cindex current buffer
28 At any time, one and only one buffer is @dfn{current}. This is also 28 At any time, one and only one buffer is @dfn{selected}; we call it
29called the @dfn{selected buffer}. We often say that a command 29the @dfn{current buffer}. We sometimes say that a command operates on
30operates on ``the buffer''; this really means that the command 30``the buffer''; this really means that it operates on the current
31operates on the current buffer (most commands do). When there is only 31buffer. When there is only one Emacs window, the buffer displayed in
32one Emacs window, the buffer displayed in that window is current. 32that window is current. When there are multiple windows, the buffer
33When there are multiple windows present, the buffer displayed in the 33displayed in the @dfn{selected window} is current. @xref{Windows}.
34@dfn{selected window} is current. @xref{Windows}. 34
35 35 Aside from its textual contents, each buffer records several pieces
36 Each buffer records individually what file it is visiting (if any), 36of information, such as what file it is visiting (if any), whether it
37whether it is modified, and what major mode and minor modes are in 37is modified, and what major mode and minor modes are in effect
38effect (@pxref{Major Modes}). Any Emacs variable can be made 38(@pxref{Modes}). These are stored in @dfn{buffer-local
39@dfn{local to} a particular buffer, meaning its value in that buffer 39variables}---variables that can have a different value in each buffer.
40can be different from the value in other buffers. @xref{Locals}. 40@xref{Locals}.
41 41
42@cindex buffer size, maximum 42@cindex buffer size, maximum
43 A buffer's size cannot be larger than some maximum, which is defined 43 A buffer's size cannot be larger than some maximum, which is defined
44by the largest buffer position representable by the @dfn{Emacs 44by the largest buffer position representable by @dfn{Emacs integers}.
45integer} data type. This is because Emacs tracks buffer positions 45This is because Emacs tracks buffer positions using that data type.
46using that data type. For typical 64-bit machines, the maximum buffer size 46For typical 64-bit machines, this maximum buffer size is @math{2^61 -
47enforced by the data types is @math{2^61 - 2} bytes, or about 2 EiB. 472} bytes, or about 2 EiB. For typical 32-bit machines, the maximum is
48For typical 32-bit machines, the maximum is @math{2^29 - 2} bytes, or 48usually @math{2^29 - 2} bytes, or about 512 MiB. Buffer sizes are
49about 512 MiB. Buffer sizes are also limited by the size of Emacs's 49also limited by the amount of memory present in the system.
50virtual memory.
51 50
52@menu 51@menu
53* Select Buffer:: Creating a new buffer or reselecting an old one. 52* Select Buffer:: Creating a new buffer or reselecting an old one.
@@ -76,9 +75,9 @@ Similar, but select @var{buffer} in another window
76Similar, but select @var{buffer} in a separate frame 75Similar, but select @var{buffer} in a separate frame
77(@code{switch-to-buffer-other-frame}). 76(@code{switch-to-buffer-other-frame}).
78@item C-x @key{LEFT} 77@item C-x @key{LEFT}
79Select the previous buffer in the list of existing buffers. 78Select the previous buffer in the buffer list (@code{previous-buffer}).
80@item C-x @key{RIGHT} 79@item C-x @key{RIGHT}
81Select the next buffer in the list of existing buffers. 80Select the next buffer in the buffer list (@code{next-buffer}).
82@item C-u M-g M-g 81@item C-u M-g M-g
83@itemx C-u M-g g 82@itemx C-u M-g g
84Read a number @var{n} and move to line @var{n} in the most recently 83Read a number @var{n} and move to line @var{n} in the most recently
@@ -87,28 +86,21 @@ selected buffer other than the current buffer.
87 86
88@kindex C-x b 87@kindex C-x b
89@findex switch-to-buffer 88@findex switch-to-buffer
90 To select the buffer named @var{bufname}, type @kbd{C-x b 89 The @kbd{C-x b} (@code{switch-to-buffer}) command reads a buffer
91@var{bufname} @key{RET}}. This runs the command 90name using the minibuffer. Then it makes that buffer current, and
92@code{switch-to-buffer} with argument @var{bufname}. While entering 91displays it in the currently-selected window. An empty input
93the buffer name, you can use the usual minibuffer completion and 92specifies the buffer that was current most recently among those not
94history commands (@pxref{Minibuffer}). An empty input specifies the 93now displayed in any window. If you specify a buffer that does not
95buffer that was current most recently among those not now displayed in 94exist, @kbd{C-x b} creates a new, empty buffer that is not visiting
96any window. 95any file, and selects it for editing.
97 96
98@cindex minibuffer confirmation 97 While entering the buffer name, you can use the usual completion and
99@cindex confirming in the minibuffer 98history commands (@pxref{Minibuffer}). Note that @kbd{C-x b}, and
100 If you specify a buffer that does not exist, @kbd{C-x b} creates a 99related commands, use ``permissive completion with confirmation'' for
101new, empty buffer that is not visiting any file, and selects it for 100minibuffer completion: if you type @key{RET} immediately after
102editing. First, however, Emacs might prompt you for confirmation, in 101completing up to a nonexistent buffer name, Emacs prints
103case you entered the wrong buffer name. Emacs asks for confirmation 102@samp{[Confirm]} and you must type a second @key{RET} to submit that
104only if the last key you typed, before submitting the minibuffer input 103buffer name. @xref{Completion Exit}, for details.
105with @key{RET}, was @key{TAB} (@code{minibuffer-complete}). This
106catches a common mistake, in which one types @key{RET} before
107realizing that @key{TAB} did not complete far enough to yield the
108desired buffer name (@pxref{Completion}). Emacs asks for confirmation
109by putting the message @samp{[Confirm]} in the minibuffer; type
110@key{RET} again to confirm and visit the buffer. @xref{Visiting}, for
111information about modifying this behavior.
112 104
113 One reason to create a new buffer is to use it for making temporary 105 One reason to create a new buffer is to use it for making temporary
114notes. If you try to save it, Emacs asks for the file name to use. 106notes. If you try to save it, Emacs asks for the file name to use.
@@ -237,15 +229,11 @@ have special commands to operate on the text; also by visiting a file
237whose access control says you cannot write it. 229whose access control says you cannot write it.
238 230
239@findex toggle-read-only 231@findex toggle-read-only
240 If you wish to make changes in a read-only buffer, use the command 232 The command @kbd{C-x C-q} (@code{toggle-read-only}) makes a read-only
241@kbd{C-x C-q} (@code{toggle-read-only}). It makes a read-only buffer 233buffer writable, and makes a writable buffer read-only. This works by
242writable, and makes a writable buffer read-only. This 234setting the variable @code{buffer-read-only}, which has a local value
243works by setting the variable @code{buffer-read-only}, which has a local 235in each buffer and makes the buffer read-only if its value is
244value in each buffer and makes the buffer read-only if its value is 236non-@code{nil}.
245non-@code{nil}. If you have files under version control, you may find
246it convenient to bind @kbd{C-x C-q} to @code{vc-toggle-read-only}
247instead. This will guard you against an operation that will confuse
248most modern version-conmtrol systems. @xref{Version Control}.
249 237
250@findex rename-buffer 238@findex rename-buffer
251 @kbd{M-x rename-buffer} changes the name of the current buffer. You 239 @kbd{M-x rename-buffer} changes the name of the current buffer. You
diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi
index 71a2dba7d08..4a09d6e3d9c 100644
--- a/doc/emacs/calendar.texi
+++ b/doc/emacs/calendar.texi
@@ -893,11 +893,12 @@ Move to a date specified in the Ethiopic calendar
893(@code{calendar-ethiopic-goto-date}). 893(@code{calendar-ethiopic-goto-date}).
894@end table 894@end table
895 895
896 These commands ask you for a date on the other calendar, move point to 896 These commands ask you for a date on the other calendar, move point
897the Gregorian calendar date equivalent to that date, and display the 897to the Gregorian calendar date equivalent to that date, and display
898other calendar's date in the echo area. Emacs uses strict completion 898the other calendar's date in the echo area. Emacs uses strict
899(@pxref{Strict Completion}) whenever it asks you to type a month name, so you 899completion (@pxref{Completion Exit}) whenever it asks you to type a
900don't have to worry about the spelling of Hebrew, Islamic, or French names. 900month name, so you don't have to worry about the spelling of Hebrew,
901Islamic, or French names.
901 902
902@c FIXME move? 903@c FIXME move?
903@findex calendar-hebrew-list-yahrzeits 904@findex calendar-hebrew-list-yahrzeits
@@ -993,7 +994,7 @@ occurrence of that combination. Use @kbd{g m n c} to move point to the
993next occurrence of a combination. These commands signal an error if the 994next occurrence of a combination. These commands signal an error if the
994haab/tzolkin date combination you have typed is impossible. 995haab/tzolkin date combination you have typed is impossible.
995 996
996 Emacs uses strict completion (@pxref{Strict Completion}) whenever it 997 Emacs uses strict completion (@pxref{Completion Exit}) whenever it
997asks you to type a Mayan name, so you don't have to worry about 998asks you to type a Mayan name, so you don't have to worry about
998spelling. 999spelling.
999 1000
diff --git a/doc/emacs/commands.texi b/doc/emacs/commands.texi
index de6e7539c27..817cfc369d1 100644
--- a/doc/emacs/commands.texi
+++ b/doc/emacs/commands.texi
@@ -46,7 +46,7 @@ are certain characters found on non-English keyboards
46@cindex M- 46@cindex M-
47 Emacs also recognizes control characters that are entered using 47 Emacs also recognizes control characters that are entered using
48@dfn{modifier keys}. Two commonly-used modifier keys are 48@dfn{modifier keys}. Two commonly-used modifier keys are
49@key{Control} (usually labelled @key{Ctrl}), and @key{Meta} (usually 49@key{Control} (usually labeled @key{Ctrl}), and @key{Meta} (usually
50labeled @key{Alt})@footnote{We refer to @key{Alt} as @key{Meta} for 50labeled @key{Alt})@footnote{We refer to @key{Alt} as @key{Meta} for
51historical reasons.}. For example, @kbd{Control-a} is entered by 51historical reasons.}. For example, @kbd{Control-a} is entered by
52holding down the @key{Ctrl} key while pressing @kbd{a}; we will refer 52holding down the @key{Ctrl} key while pressing @kbd{a}; we will refer
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index 6af77374d07..d87c22ec28e 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -770,7 +770,7 @@ here's how to set up a hook to turn on Auto Fill mode when entering
770Text mode and other modes based on Text mode: 770Text mode and other modes based on Text mode:
771 771
772@example 772@example
773(add-hook 'text-mode-hook 'turn-on-auto-fill) 773(add-hook 'text-mode-hook 'auto-fill-mode)
774@end example 774@end example
775 775
776 Here is another example, showing how to use a hook to customize the 776 Here is another example, showing how to use a hook to customize the
@@ -2174,8 +2174,7 @@ Turn off Line Number mode, a global minor mode.
2174Turn on Auto Fill mode automatically in Text mode and related modes. 2174Turn on Auto Fill mode automatically in Text mode and related modes.
2175 2175
2176@example 2176@example
2177(add-hook 'text-mode-hook 2177(add-hook 'text-mode-hook 'auto-fill-mode)
2178 '(lambda () (auto-fill-mode 1)))
2179@end example 2178@end example
2180 2179
2181This shows how to add a hook function to a normal hook variable 2180This shows how to add a hook function to a normal hook variable
@@ -2183,19 +2182,9 @@ This shows how to add a hook function to a normal hook variable
2183@code{lambda}, with a single-quote in front of it to make it a list 2182@code{lambda}, with a single-quote in front of it to make it a list
2184constant rather than an expression. 2183constant rather than an expression.
2185 2184
2186It's beyond the scope of this manual to explain Lisp functions, but for 2185It's beyond the scope of this manual to explain Lisp functions, but
2187this example it is enough to know that the effect is to execute 2186for this example it is enough to know that the effect is to execute
2188@code{(auto-fill-mode 1)} when Text mode is entered. You can replace 2187the @code{auto-fill-mode} function when Text mode is entered.
2189that with any other expression that you like, or with several
2190expressions in a row.
2191
2192Emacs comes with a function named @code{turn-on-auto-fill} whose
2193definition is @code{(lambda () (auto-fill-mode 1))}. Thus, a simpler
2194way to write the above example is as follows:
2195
2196@example
2197(add-hook 'text-mode-hook 'turn-on-auto-fill)
2198@end example
2199 2188
2200@item 2189@item
2201Load the installed Lisp library named @file{foo} (actually a file 2190Load the installed Lisp library named @file{foo} (actually a file
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index 68b2209ffba..8995b1242b1 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -13,6 +13,7 @@ the text is displayed.
13 13
14@menu 14@menu
15* Scrolling:: Commands to move text up and down in a window. 15* Scrolling:: Commands to move text up and down in a window.
16* Recentering:: A scroll command that centers the current line.
16* Auto Scrolling:: Redisplay scrolls text automatically when needed. 17* Auto Scrolling:: Redisplay scrolls text automatically when needed.
17* Horizontal Scrolling:: Moving text left and right in a window. 18* Horizontal Scrolling:: Moving text left and right in a window.
18* Narrowing:: Restricting display and editing to a portion 19* Narrowing:: Restricting display and editing to a portion
@@ -48,15 +49,15 @@ portion of the buffer is displayed.
48 Scrolling ``forward'' or ``up'' advances the portion of the buffer 49 Scrolling ``forward'' or ``up'' advances the portion of the buffer
49displayed in the window; equivalently, it moves the buffer text 50displayed in the window; equivalently, it moves the buffer text
50upwards relative to the window. Scrolling ``backward'' or ``down'' 51upwards relative to the window. Scrolling ``backward'' or ``down''
51moves the displayed portion backwards, and moves the text downwards 52displays an earlier portion of the buffer, and moves the text
52relative to the window. In Emacs, scrolling ``up'' or ``down'' refers 53downwards relative to the window.
53to the direction that the text moves in the window, @emph{not} the 54
54direction that the window moves relative to the text; this terminology 55 In Emacs, scrolling ``up'' or ``down'' refers to the direction that
55was taken up by Emacs before the modern meaning of ``scrolling up'' 56the text moves in the window, @emph{not} the direction that the window
56and ``scrolling down'' became widely adopted. Hence the strange 57moves relative to the text. This terminology was adopted by Emacs
57result that @key{PageDown} scrolls ``up'' in the Emacs sense. In this 58before the modern meaning of ``scrolling up'' and ``scrolling down''
58manual, we refer to scrolling ``forward'' and ``backward'' where 59became widespread. Hence, the strange result that @key{PageDown}
59possible, in order to minimize confusion. 60scrolls ``up'' in the Emacs sense.
60 61
61 The portion of a buffer displayed in a window always contains point. 62 The portion of a buffer displayed in a window always contains point.
62If you move point past the bottom or top of the window, scrolling 63If you move point past the bottom or top of the window, scrolling
@@ -64,11 +65,6 @@ occurs automatically to bring it back onscreen (@pxref{Auto
64Scrolling}). You can also scroll explicitly with these commands: 65Scrolling}). You can also scroll explicitly with these commands:
65 66
66@table @kbd 67@table @kbd
67@item C-l
68Scroll the selected window so that the current line is the center-most
69text line; on subsequent consecutive invocations, make the current
70line the top-most line, the bottom-most line, and so on in cyclic
71order; also, maybe redisplay the screen (@code{recenter-top-bottom}).
72@item C-v 68@item C-v
73@itemx @key{next} 69@itemx @key{next}
74@itemx @key{PageDown} 70@itemx @key{PageDown}
@@ -77,6 +73,86 @@ Scroll forward by nearly a full window (@code{scroll-up-command}).
77@itemx @key{prior} 73@itemx @key{prior}
78@itemx @key{PageUp} 74@itemx @key{PageUp}
79Scroll backward (@code{scroll-down-command}). 75Scroll backward (@code{scroll-down-command}).
76@end table
77
78@kindex C-v
79@kindex M-v
80@kindex next
81@kindex prior
82@kindex PageDown
83@kindex PageUp
84@findex scroll-up-command
85@findex scroll-down-command
86 @kbd{C-v} (@code{scroll-up-command}) scrolls forward by nearly the
87whole window height. The effect is to take the two lines at the
88bottom of the window and put them at the top, followed by lines that
89were not previously visible. If point was in the text that scrolled
90off the top, it ends up on the window's new topmost line. The
91@key{next} (or @key{PageDown}) key is equivalent to @kbd{C-v}.
92
93 @kbd{M-v} (@code{scroll-down-command}) scrolls backward in a similar
94way. The @key{prior} (or @key{PageUp}) key is equivalent to
95@kbd{M-v}.
96
97@vindex next-screen-context-lines
98 The number of lines of overlap left by these scroll commands is
99controlled by the variable @code{next-screen-context-lines}, whose
100default value is 2. You can supply the commands with a numeric prefix
101argument, @var{n}, to scroll by @var{n} lines; Emacs attempts to leave
102point unchanged, so that the text and point move up or down together.
103@kbd{C-v} with a negative argument is like @kbd{M-v} and vice versa.
104
105@vindex scroll-error-top-bottom
106 By default, these commands signal an error (by beeping or flashing
107the screen) if no more scrolling is possible, because the window has
108reached the beginning or end of the buffer. If you change the
109variable @code{scroll-error-top-bottom} to @code{t}, the command moves
110point to the farthest possible position. If point is already there,
111the command signals an error.
112
113@vindex scroll-preserve-screen-position
114@cindex @code{scroll-command} property
115 Some users like scroll commands to keep point at the same screen
116position, so that scrolling back to the same screen conveniently
117returns point to its original position. You can enable this behavior
118via the variable @code{scroll-preserve-screen-position}. If the value
119is @code{t}, Emacs adjusts point to keep the cursor at the same screen
120position whenever a scroll command moves it off-window, rather than
121moving it to the topmost or bottommost line. With any other
122non-@code{nil} value, Emacs adjusts point this way even if the scroll
123command leaves point in the window. This variable affects all the
124scroll commands documented in this section, as well as scrolling with
125the mouse wheel (@pxref{Wheeled Mice}); in general, it affects any
126command that has a non-@code{nil} @code{scroll-command} property.
127@xref{Property Lists,,, elisp, The Emacs Lisp Reference Manual}.
128
129@vindex scroll-up
130@vindex scroll-down
131@findex scroll-up-line
132@findex scroll-down-line
133 The commands @kbd{M-x scroll-up} and @kbd{M-x scroll-down} behave
134similarly to @code{scroll-up-command} and @code{scroll-down-command},
135except they do not obey @code{scroll-error-top-bottom}. Prior to
136Emacs 24, these were the default commands for scrolling up and down.
137The commands @kbd{M-x scroll-up-line} and @kbd{M-x scroll-down-line}
138scroll the current window by one line at a time. If you intend to use
139any of these commands, you might want to give them key bindings
140(@pxref{Init Rebinding}).
141
142@node Recentering
143@section Recentering
144
145@table @kbd
146@item C-l
147Scroll the selected window so the current line is the center-most text
148line; on subsequent consecutive invocations, make the current line the
149top line, the bottom line, and so on in cyclic order. Possibly
150redisplay the screen too (@code{recenter-top-bottom}).
151
152@item M-x recenter
153Scroll the selected window so the current line is the center-most text
154line. Possibly redisplay the screen too.
155
80@item C-M-l 156@item C-M-l
81Scroll heuristically to bring useful information onto the screen 157Scroll heuristically to bring useful information onto the screen
82(@code{reposition-window}). 158(@code{reposition-window}).
@@ -107,14 +183,13 @@ non-zero value @var{n}, @kbd{C-l} always leaves at least @var{n}
107screen lines between point and the top or bottom of the window 183screen lines between point and the top or bottom of the window
108(@pxref{Auto Scrolling}). 184(@pxref{Auto Scrolling}).
109 185
110 You can also supply @kbd{C-l} with a prefix argument. With a plain 186 You can also give @kbd{C-l} a prefix argument. A plain prefix
111prefix argument, @kbd{C-u C-l}, Emacs simply recenters point. With a 187argument, @kbd{C-u C-l}, simply recenters point. A positive argument
112positive argument @var{n}, it scrolls to place point @var{n} lines 188@var{n} puts point @var{n} lines down from the top of the window. An
113down from the top of the window. An argument of zero puts point on 189argument of zero puts point on the topmost line. A negative argument
114the topmost line. A negative argument @var{-n} puts point @var{n} 190@var{-n} puts point @var{n} lines from the bottom of the window. When
115lines from the bottom of the window. When given an argument, 191given an argument, @kbd{C-l} does not clear the screen or cycle
116@kbd{C-l} does not clear the screen or cycle through different screen 192through different screen positions.
117positions.
118 193
119@vindex recenter-redisplay 194@vindex recenter-redisplay
120 If the variable @code{recenter-redisplay} has a non-@code{nil} 195 If the variable @code{recenter-redisplay} has a non-@code{nil}
@@ -127,62 +202,6 @@ becomes garbled for any reason (@pxref{Screen Garbled}).
127 The more primitive command @kbd{M-x recenter} behaves like 202 The more primitive command @kbd{M-x recenter} behaves like
128@code{recenter-top-bottom}, but does not cycle among screen positions. 203@code{recenter-top-bottom}, but does not cycle among screen positions.
129 204
130@kindex C-v
131@kindex M-v
132@kindex next
133@kindex prior
134@kindex PageDown
135@kindex PageUp
136@findex scroll-up-command
137@findex scroll-down-command
138 @kbd{C-v} (@code{scroll-up-command}) scrolls forward by nearly the
139whole window height. The effect is to take the two lines at the
140bottom of the window and put them at the top, followed by lines that
141were not previously visible. If point was in the text that scrolled
142off the top, it ends up on the window's new topmost line.
143
144 Similarly, @kbd{M-v} (@code{scroll-down-command}) scrolls backward.
145
146 We refer to @kbd{C-v} and @kbd{M-v} as @dfn{full-screen scroll
147commands}. The function key @key{next}, or @key{PageDown}, is
148equivalent to @kbd{C-v}; the function key @key{prior}, or
149@key{PageUp}, is equivalent to @kbd{M-v}.
150
151@vindex next-screen-context-lines
152 The variable @code{next-screen-context-lines} controls the number of
153lines of overlap left by the full-screen scroll commands; by default,
154it is 2. You can supply these commands with a numeric prefix argument
155@var{n}. This scrolls the window by @var{n} lines, while attempting
156to leave point unchanged (so that the text and point move up or down
157together). @kbd{C-v} with a negative argument is like @kbd{M-v} and
158vice versa.
159
160@vindex scroll-error-top-bottom
161 By default, the full-screen scroll commands signal an error (by
162beeping or flashing the screen) if no more scrolling is possible,
163because the window has reached the beginning or end of the buffer. If
164you change the variable @code{scroll-error-top-bottom} to @code{t},
165Emacs instead moves point to the farthest possible position. If point
166is already there, the command signals an error.
167
168@vindex scroll-preserve-screen-position
169 Some users like scroll commands to keep point at the same screen
170position. Then, scrolling back to the same screen also conveniently
171returns point to its original position. You can enable this via the
172variable @code{scroll-preserve-screen-position}. If the value is
173@code{t}, Emacs adjusts point to keep it at the same vertical position
174within the window, rather than the window edge, whenever a scroll
175command moves it off the window. With any other non-@code{nil} value,
176Emacs adjusts point this way even if the scroll command leaves point
177in the window.
178
179@vindex scroll-up
180@vindex scroll-down
181 The commands @code{scroll-up} and @code{scroll-down} behave
182similarly to @code{scroll-up-command} and @code{scroll-down-command},
183except they do not obey @code{scroll-error-top-bottom}. Prior to
184Emacs 24, these were the default commands for scrolling up and down.
185
186@kindex C-M-l 205@kindex C-M-l
187@findex reposition-window 206@findex reposition-window
188 @kbd{C-M-l} (@code{reposition-window}) scrolls the current window 207 @kbd{C-M-l} (@code{reposition-window}) scrolls the current window
@@ -554,7 +573,7 @@ Whitespace}).
554The face for displaying control characters and escape sequences 573The face for displaying control characters and escape sequences
555(@pxref{Text Display}). 574(@pxref{Text Display}).
556@item nobreak-space 575@item nobreak-space
557The face for displaying ``non-breaking'' space characters (@pxref{Text 576The face for displaying ``no-break'' space characters (@pxref{Text
558Display}). 577Display}).
559@end table 578@end table
560 579
@@ -599,7 +618,8 @@ displays. (The fringes are the narrow portions of the Emacs frame
599between the text area and the window's right and left borders.) 618between the text area and the window's right and left borders.)
600@xref{Fringes}. 619@xref{Fringes}.
601@item cursor 620@item cursor
602This face determines the color of the text cursor. 621The @code{:background} attribute of this face specifies the color of
622the text cursor. @xref{Cursor Display}.
603@item tooltip 623@item tooltip
604This face is used for tooltip text. By default, if Emacs is built 624This face is used for tooltip text. By default, if Emacs is built
605with GTK support, tooltips are drawn via GTK and this face has no 625with GTK support, tooltips are drawn via GTK and this face has no
@@ -702,16 +722,14 @@ file:
702(global-font-lock-mode 0) 722(global-font-lock-mode 0)
703@end example 723@end example
704 724
705@findex turn-on-font-lock
706@noindent 725@noindent
707If you have disabled Global Font Lock mode, you can still enable Font 726If you have disabled Global Font Lock mode, you can still enable Font
708Lock for specific major modes by adding the function 727Lock for specific major modes by adding the function
709@code{turn-on-font-lock} to the mode hooks (@pxref{Hooks}). For 728@code{font-lock-mode} to the mode hooks (@pxref{Hooks}). For example,
710example, to enable Font Lock mode for editing C files, you can do 729to enable Font Lock mode for editing C files, you can do this:
711this:
712 730
713@example 731@example
714(add-hook 'c-mode-hook 'turn-on-font-lock) 732(add-hook 'c-mode-hook 'font-lock-mode)
715@end example 733@end example
716 734
717 Font Lock mode uses several specifically named faces to do its job, 735 Font Lock mode uses several specifically named faces to do its job,
@@ -901,9 +919,14 @@ mode's symbol is a member of the list @code{hi-lock-exclude-modes}.
901@section Window Fringes 919@section Window Fringes
902@cindex fringes 920@cindex fringes
903 921
904 On a graphical display, each Emacs window normally has narrow 922@findex set-fringe-style
923@findex fringe-mode
924 On graphical displays, each Emacs window normally has narrow
905@dfn{fringes} on the left and right edges. The fringes are used to 925@dfn{fringes} on the left and right edges. The fringes are used to
906display symbols that provide information about the text in the window. 926display symbols that provide information about the text in the window.
927You can type @kbd{M-x fringe-mode} to disable the fringes, or modify
928their width. This command affects fringes in all frames; to modify
929fringes on the selected frame only, use @kbd{M-x set-fringe-style}.
907 930
908 The most common use of the fringes is to indicate a continuation 931 The most common use of the fringes is to indicate a continuation
909line (@pxref{Continuation Lines}). When one line of text is split 932line (@pxref{Continuation Lines}). When one line of text is split
@@ -924,17 +947,18 @@ scrolls the display horizontally in the direction of the arrow.
924boundaries (@pxref{Displaying Boundaries}), and where a program you 947boundaries (@pxref{Displaying Boundaries}), and where a program you
925are debugging is executing (@pxref{Debuggers}). 948are debugging is executing (@pxref{Debuggers}).
926 949
927@findex set-fringe-style 950@vindex overflow-newline-into-fringe
928@findex fringe-mode 951 The fringe is also used for drawing the cursor, if the current line
929 You can enable and disable the fringes for all frames using 952is exactly as wide as the window and point is at the end of the line.
930@kbd{M-x fringe-mode}. To enable and disable the fringes 953To disable this, change the variable
931for the selected frame, use @kbd{M-x set-fringe-style}. 954@code{overflow-newline-into-fringe} to @code{nil}; this causes Emacs
955to continue or truncate lines that are exactly as wide as the window.
932 956
933@node Displaying Boundaries 957@node Displaying Boundaries
934@section Displaying Boundaries 958@section Displaying Boundaries
935 959
936@vindex indicate-buffer-boundaries 960@vindex indicate-buffer-boundaries
937 On a graphical display, Emacs can indicate the buffer boundaries in 961 On graphical displays, Emacs can indicate the buffer boundaries in
938the fringes. If you enable this feature, the first line and the last 962the fringes. If you enable this feature, the first line and the last
939line are marked with angle images in the fringes. This can be 963line are marked with angle images in the fringes. This can be
940combined with up and down arrow images which say whether it is 964combined with up and down arrow images which say whether it is
@@ -1127,14 +1151,15 @@ set the variable @code{display-time-24hr-format} to @code{t}.
1127@vindex display-time-mail-file 1151@vindex display-time-mail-file
1128@vindex display-time-mail-directory 1152@vindex display-time-mail-directory
1129 The word @samp{Mail} appears after the load level if there is mail 1153 The word @samp{Mail} appears after the load level if there is mail
1130for you that you have not read yet. On a graphical display you can use 1154for you that you have not read yet. On graphical displays, you can
1131an icon instead of @samp{Mail} by customizing 1155use an icon instead of @samp{Mail} by customizing
1132@code{display-time-use-mail-icon}; this may save some space on the mode 1156@code{display-time-use-mail-icon}; this may save some space on the
1133line. You can customize @code{display-time-mail-face} to make the mail 1157mode line. You can customize @code{display-time-mail-face} to make
1134indicator prominent. Use @code{display-time-mail-file} to specify 1158the mail indicator prominent. Use @code{display-time-mail-file} to
1135the mail file to check, or set @code{display-time-mail-directory} 1159specify the mail file to check, or set
1136to specify the directory to check for incoming mail (any nonempty regular 1160@code{display-time-mail-directory} to specify the directory to check
1137file in the directory is considered as ``newly arrived mail''). 1161for incoming mail (any nonempty regular file in the directory is
1162considered as ``newly arrived mail'').
1138 1163
1139@cindex mail (on mode line) 1164@cindex mail (on mode line)
1140@findex display-battery-mode 1165@findex display-battery-mode
@@ -1152,7 +1177,7 @@ percentage of the total charge.
1152@cindex mode line, 3D appearance 1177@cindex mode line, 3D appearance
1153@cindex attributes of mode line, changing 1178@cindex attributes of mode line, changing
1154@cindex non-integral number of lines in a window 1179@cindex non-integral number of lines in a window
1155 On a graphical display, the mode line is drawn as a 3D box. If you 1180 On graphical displays, the mode line is drawn as a 3D box. If you
1156don't like this effect, you can disable it by customizing the 1181don't like this effect, you can disable it by customizing the
1157@code{mode-line} face and setting its @code{box} attribute to 1182@code{mode-line} face and setting its @code{box} attribute to
1158@code{nil}. @xref{Face Customization}. 1183@code{nil}. @xref{Face Customization}.
@@ -1218,17 +1243,23 @@ If you change the buffer-local variable @code{ctl-arrow} to
1218octal escape sequences instead of caret escape sequences. 1243octal escape sequences instead of caret escape sequences.
1219 1244
1220@vindex nobreak-char-display 1245@vindex nobreak-char-display
1221@cindex non-breaking space, display 1246@cindex non-breaking space
1222@cindex non-breaking hyphen, display 1247@cindex non-breaking hyphen
1223@cindex soft hyphen, display 1248@cindex soft hyphen
1224 There are two special ``non-breaking'' versions of the space and 1249 Some non-@acronym{ASCII} characters have the same appearance as an
1225hyphen characters, which are used where a line should not be broken. 1250@acronym{ASCII} space or hyphen (minus) character. Such characters
1226Emacs normally displays these characters with special faces 1251can cause problems if they are entered into a buffer without your
1227(respectively, @code{nobreak-space} and @code{escape-glyph}) to 1252realization, e.g. by yanking; for instance, source code compilers
1228distinguish them from ordinary spaces and hyphens. You can turn off 1253typically do not treat non-@acronym{ASCII} spaces as whitespace
1229this feature by setting the variable @code{nobreak-char-display} to 1254characters. To deal with this problem, Emacs displays such characters
1230@code{nil}. If you set the variable to any other value, that means to 1255specially: it displays @code{U+00A0} (no-break space) with the
1231prefix these characters with an escape character. 1256@code{nobreak-space} face, and it displays @code{U+00AD} (soft
1257hyphen), @code{U+2010} (hyphen), and @code{U+2011} (non-breaking
1258hyphen) with the @code{escape-glyph} face. To disable this, change
1259the variable @code{nobreak-char-display} to @code{nil}. If you give
1260this variable a non-@code{nil} and non-@code{t} value, Emacs instead
1261displays such characters as a highlighted backslash followed by a
1262space or hyphen.
1232 1263
1233 You can customize the way any particular character code is displayed 1264 You can customize the way any particular character code is displayed
1234by means of a display table. @xref{Display Tables,, Display Tables, 1265by means of a display table. @xref{Display Tables,, Display Tables,
@@ -1246,48 +1277,61 @@ for details.
1246 1277
1247@node Cursor Display 1278@node Cursor Display
1248@section Displaying the Cursor 1279@section Displaying the Cursor
1249 1280@cindex text cursor
1250@findex blink-cursor-mode
1251@vindex blink-cursor-alist
1252@cindex cursor, locating visually
1253@cindex cursor, blinking
1254 You can customize the cursor's color, and whether it blinks, using
1255the @code{cursor} Custom group (@pxref{Easy Customization}). On
1256a graphical display, the command @kbd{M-x blink-cursor-mode} enables
1257or disables the blinking of the cursor. (On text terminals, the
1258terminal itself blinks the cursor, and Emacs has no control over it.)
1259You can control how the cursor appears when it blinks off by setting
1260the variable @code{blink-cursor-alist}.
1261
1262@vindex cursor-type
1263 You can change the shape of the cursor from the default ``box'' look
1264to a bar by altering the @code{cursor-type} variable.
1265 1281
1266@vindex visible-cursor 1282@vindex visible-cursor
1267 Some text terminals offer two different cursors: the normal cursor 1283 On a text terminal, the cursor's appearance is controlled by the
1268and the very visible cursor, where the latter may be e.g. bigger or 1284terminal, largely out of the control of Emacs. Some terminals offer
1269blinking. By default Emacs uses the very visible cursor, and switches 1285two different cursors: a ``visible'' static cursor, and a ``very
1270to it when you start or resume Emacs. If the variable 1286visible'' blinking cursor. By default, Emacs uses the very visible
1271@code{visible-cursor} is @code{nil} when Emacs starts or resumes, it 1287cursor, and switches to it when you start or resume Emacs. If the
1272doesn't switch, so it uses the normal cursor. 1288variable @code{visible-cursor} is @code{nil} when Emacs starts or
1289resumes, it uses the normal cursor.
1290
1291@cindex cursor face
1292@vindex cursor-type
1293 On a graphical display, many more properties of the text cursor can
1294be altered. To customize its color, change the @code{:background}
1295attribute of the face named @code{cursor} (@pxref{Face
1296Customization}). (The other attributes of this face have no effect;
1297the text shown under the cursor is drawn using the frame's background
1298color.) To change its shape, customize the buffer-local variable
1299@code{cursor-type}; possible values are @code{box} (the default),
1300@code{hollow} (a hollow box), @code{bar} (a vertical bar), @code{(bar
1301. @var{n})} (a vertical bar @var{n} pixels wide), @code{hbar} (a
1302horizontal bar), @code{(hbar . @var{n})} (a horizontal bar @var{n}
1303pixels tall), or @code{nil} (no cursor at all).
1273 1304
1274@cindex cursor in non-selected windows 1305@findex blink-cursor-mode
1275@vindex cursor-in-non-selected-windows 1306@cindex cursor, blinking
1276 Normally, the cursor appears in non-selected windows without 1307@cindex blinking cursor
1277blinking, with the same appearance as when the blinking cursor blinks 1308@vindex blink-cursor-alist
1278``off.'' For a box cursor, this is a hollow box; for a bar cursor, 1309 To disable cursor blinking, change the variable
1279this is a thinner bar. To turn off cursors in non-selected windows, 1310@code{blink-cursor-mode} to @code{nil} (@pxref{Easy Customization}),
1280customize the variable @code{cursor-in-non-selected-windows} and 1311or add the line @code{(blink-cursor-mode 0)} to your init file.
1281assign it a @code{nil} value. 1312Alternatively, you can change how the cursor looks when it ``blinks
1313off'' by customizing the list variable @code{blink-cursor-alist}.
1314Each element in the list should have the form @code{(@var{on-type}
1315. @var{off-type})}; this means that if the cursor is displayed as
1316@var{on-type} when it blinks on (where @var{on-type} is one of the
1317cursor types described above), then it is displayed as @var{off-type}
1318when it blinks off.
1282 1319
1283@vindex x-stretch-cursor 1320@vindex x-stretch-cursor
1284@cindex wide block cursor 1321@cindex wide block cursor
1285 On graphical displays, Emacs can optionally draw the block cursor 1322 Some characters, such as tab characters, are ``extra wide''. When
1286as wide as the character under the cursor---for example, if the cursor 1323the cursor is positioned over such a character, it is normally drawn
1287is on a tab character, it would cover the full width occupied by that 1324with the default character width. You can make the cursor stretch to
1288tab character. To enable this feature, set the variable 1325cover wide characters, by changing the variable
1289@code{x-stretch-cursor} to a non-@code{nil} value. 1326@code{x-stretch-cursor} to a non-@code{nil} value.
1290 1327
1328@cindex cursor in non-selected windows
1329@vindex cursor-in-non-selected-windows
1330 The cursor normally appears in non-selected windows as a
1331non-blinking hollow box. (For a bar cursor, it instead appears as a
1332thinner bar.) To turn off cursors in non-selected windows, change the
1333variable @code{cursor-in-non-selected-windows} to @code{nil}.
1334
1291@findex hl-line-mode 1335@findex hl-line-mode
1292@findex global-hl-line-mode 1336@findex global-hl-line-mode
1293@cindex highlight current line 1337@cindex highlight current line
@@ -1297,18 +1341,17 @@ hl-line-mode} to enable or disable it in the current buffer. @kbd{M-x
1297global-hl-line-mode} enables or disables the same mode globally. 1341global-hl-line-mode} enables or disables the same mode globally.
1298 1342
1299@node Line Truncation 1343@node Line Truncation
1300@section Truncation of Lines 1344@section Line Truncation
1301 1345
1302@cindex truncation 1346@cindex truncation
1303@cindex line truncation, and fringes 1347@cindex line truncation, and fringes
1304 As an alternative to continuation (@pxref{Continuation Lines}), Emacs 1348 As an alternative to continuation (@pxref{Continuation Lines}),
1305can display long lines by @dfn{truncation}. This means that all the 1349Emacs can display long lines by @dfn{truncation}. This means that all
1306characters that do not fit in the width of the screen or window do not 1350the characters that do not fit in the width of the screen or window do
1307appear at all. On graphical displays, a small straight arrow in the 1351not appear at all. On graphical displays, a small straight arrow in
1308fringe indicates truncation at either end of the line. On text-only 1352the fringe indicates truncation at either end of the line. On
1309terminals, @samp{$} appears in the leftmost column when there is text 1353text-only terminals, this is indicated with @samp{$} signs in the
1310truncated to the left, and in the rightmost column when there is text 1354leftmost and/or rightmost columns.
1311truncated to the right.
1312 1355
1313@vindex truncate-lines 1356@vindex truncate-lines
1314@findex toggle-truncate-lines 1357@findex toggle-truncate-lines
@@ -1320,21 +1363,12 @@ toggle-truncate-lines}. This works by locally changing the variable
1320are truncated; if it is @code{nil}, they are continued onto multiple 1363are truncated; if it is @code{nil}, they are continued onto multiple
1321screen lines. Setting the variable @code{truncate-lines} in any way 1364screen lines. Setting the variable @code{truncate-lines} in any way
1322makes it local to the current buffer; until that time, the default 1365makes it local to the current buffer; until that time, the default
1323value is in effect. The default value is normally @code{nil}. 1366value, which is normally @code{nil}, is in effect.
1324 1367
1325@c @vindex truncate-partial-width-windows @c Idx entry is in Split Windows. 1368@vindex truncate-partial-width-windows
1326 If the variable @code{truncate-partial-width-windows} is 1369 If a split window becomes too narrow, Emacs may automatically enable
1327non-@code{nil}, it forces truncation rather than continuation in any 1370line truncation. @xref{Split Window}, for the variable
1328window less than the full width of the screen or frame, regardless of 1371@code{truncate-partial-width-windows} which controls this.
1329the value of @code{truncate-lines}. See also @ref{Display,, Display,
1330elisp, The Emacs Lisp Reference Manual}.
1331
1332@vindex overflow-newline-into-fringe
1333 If the variable @code{overflow-newline-into-fringe} is
1334non-@code{nil} on a graphical display, then Emacs does not continue or
1335truncate a line which is exactly as wide as the window. Instead, the
1336newline overflows into the right fringe, and the cursor appears in the
1337fringe when positioned on that newline.
1338 1372
1339@node Visual Line Mode 1373@node Visual Line Mode
1340@section Visual Line Mode 1374@section Visual Line Mode
@@ -1387,11 +1421,8 @@ variable @code{visual-line-fringe-indicators}.
1387@node Display Custom 1421@node Display Custom
1388@section Customization of Display 1422@section Customization of Display
1389 1423
1390 This section describes variables (@pxref{Variables}) that you can 1424 This section describes variables that control miscellaneous aspects
1391change to customize how Emacs displays. Beginning users can skip 1425of the appearance of the Emacs screen. Beginning users can skip it.
1392it.
1393@c the reason for that pxref is because an xref early in the
1394@c ``echo area'' section leads here.
1395 1426
1396@vindex visible-bell 1427@vindex visible-bell
1397 If the variable @code{visible-bell} is non-@code{nil}, Emacs attempts 1428 If the variable @code{visible-bell} is non-@code{nil}, Emacs attempts
@@ -1403,19 +1434,7 @@ to make the screen blink.
1403 The variable @code{echo-keystrokes} controls the echoing of multi-character 1434 The variable @code{echo-keystrokes} controls the echoing of multi-character
1404keys; its value is the number of seconds of pause required to cause echoing 1435keys; its value is the number of seconds of pause required to cause echoing
1405to start, or zero, meaning don't echo at all. The value takes effect when 1436to start, or zero, meaning don't echo at all. The value takes effect when
1406there is someting to echo. @xref{Echo Area}. 1437there is something to echo. @xref{Echo Area}.
1407
1408@vindex baud-rate
1409 The variable @anchor{baud-rate}@code{baud-rate} holds the output
1410speed of the terminal. Setting this variable does not change the
1411speed of actual data transmission, but the value is used for
1412calculations. On text-only terminals, it affects padding, and
1413decisions about whether to scroll part of the screen or redraw it
1414instead. It also affects the behavior of incremental search. On
1415graphical displays, @code{baud-rate} is only used to determine how
1416frequently to look for pending input during display updating. A
1417higher value of @code{baud-rate} means that check for pending input
1418will be done less frequently.
1419 1438
1420@cindex mouse pointer 1439@cindex mouse pointer
1421@cindex hourglass pointer display 1440@cindex hourglass pointer display
@@ -1458,15 +1477,3 @@ itself, in pixels; the default is 2.
1458result in text that is hard to read. Call the function 1477result in text that is hard to read. Call the function
1459@code{tty-suppress-bold-inverse-default-colors} with a non-@code{nil} 1478@code{tty-suppress-bold-inverse-default-colors} with a non-@code{nil}
1460argument to suppress the effect of bold-face in this case. 1479argument to suppress the effect of bold-face in this case.
1461
1462@vindex no-redraw-on-reenter
1463 On a text-only terminal, when you reenter Emacs after suspending, Emacs
1464normally clears the screen and redraws the entire display. On some
1465terminals with more than one page of memory, it is possible to arrange
1466the termcap entry so that the @samp{ti} and @samp{te} strings (output
1467to the terminal when Emacs is entered and exited, respectively) switch
1468between pages of memory so as to use one page for Emacs and another
1469page for other output. On such terminals, you might want to set the variable
1470@code{no-redraw-on-reenter} non-@code{nil}; this tells Emacs to
1471assume, when resumed, that the screen page it is using still contains
1472what Emacs last wrote there.
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index 44f1aed134e..b25c09aa29d 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -281,7 +281,7 @@ Completion
281 281
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* Completion Exit:: Completion and minibuffer text submission.
285* Completion Styles:: How completion matches are chosen. 285* Completion Styles:: How completion matches are chosen.
286* Completion Options:: Options for completion. 286* Completion Options:: Options for completion.
287 287
@@ -342,6 +342,7 @@ Registers
342Controlling the Display 342Controlling the Display
343 343
344* Scrolling:: Commands to move text up and down in a window. 344* Scrolling:: Commands to move text up and down in a window.
345* Recentering:: A scrolling command that centers the current line.
345* Auto Scrolling:: Redisplay scrolls text automatically when needed. 346* Auto Scrolling:: Redisplay scrolls text automatically when needed.
346* Horizontal Scrolling:: Moving text left and right in a window. 347* Horizontal Scrolling:: Moving text left and right in a window.
347* Narrowing:: Restricting display and editing to a portion 348* Narrowing:: Restricting display and editing to a portion
@@ -388,7 +389,6 @@ Incremental Search
388 or else edit the search string. 389 or else edit the search string.
389* Isearch Scroll:: Scrolling during an incremental search. 390* Isearch Scroll:: Scrolling during an incremental search.
390* Isearch Minibuffer:: Incremental search of the minibuffer history. 391* Isearch Minibuffer:: Incremental search of the minibuffer history.
391* Slow Isearch:: Incremental search features for slow terminals.
392 392
393Replacement Commands 393Replacement Commands
394 394
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 433bf617598..2317f876b08 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -47,58 +47,58 @@ on file directories.
47@section File Names 47@section File Names
48@cindex file names 48@cindex file names
49 49
50 Many Emacs commands that operate on a file require you to specify
51the file name, using the minibuffer (@pxref{Minibuffer}). You can use
52@dfn{completion} to specify long file names (@pxref{Completion}).
53Note that file name completion ignores file names whose extensions
54appear in the variable @code{completion-ignored-extensions}
55(@pxref{Completion Options}).
56
57@cindex default file name 50@cindex default file name
58 For most operations, there is a @dfn{default file name} which is 51 Many Emacs commands that operate on a file require you to specify
59used if you type just @key{RET} to enter an empty argument. Normally, 52the file name, using the minibuffer (@pxref{Minibuffer File}).
60the default file name is the name of the file visited in the current 53
61buffer. 54 While in the minibuffer, you can use the usual completion and
55history commands (@pxref{Minibuffer}). Note that file name completion
56ignores file names whose extensions appear in the variable
57@code{completion-ignored-extensions} (@pxref{Completion Options}).
58Note also that most commands use ``permissive completion with
59confirmation'' for reading file names: you are allowed to submit a
60nonexistent file name, but if you type @key{RET} immediately after
61completing up to a nonexistent file name, Emacs prints
62@samp{[Confirm]} and you must type a second @key{RET} to confirm.
63@xref{Completion Exit}, for details.
62 64
63@cindex default directory 65@cindex default directory
64@vindex default-directory 66@vindex default-directory
65@vindex insert-default-directory 67@vindex insert-default-directory
66 Each buffer has a @dfn{default directory} which is normally the same 68 Each buffer has a @dfn{default directory}, stored in the
67as the directory of the file visited in that buffer. For example, if 69buffer-local variable @code{default-directory}. Whenever Emacs reads
68the default file name is @file{/u/rms/gnu/gnu.tasks}, the default 70a file name using the minibuffer, it usually inserts the default
69directory is normally @file{/u/rms/gnu/}. The default directory is 71directory into the minibuffer as the initial contents. You can
70kept in the variable @code{default-directory}, which has a separate 72inhibit this insertion by changing the variable
71value in every buffer. When a command reads a file name using the 73@code{insert-default-directory} to @code{nil} (@pxref{Minibuffer
72minibuffer, the default directory usually serves as the initial 74File}). Regardless, Emacs always assumes that any relative file name
73contents of the minibuffer. To inhibit the insertion of the default 75is relative to the default directory, e.g. entering a file name
74directory, set the variable @code{insert-default-directory} to 76without a directory specifies a file in the default directory.
75@code{nil}.
76 77
77 If you enter a file name without a directory, that specifies a file 78@findex cd
78in the default directory. If you specify a directory in a relative 79@findex pwd
79fashion, with a name that does not start with a slash, it is 80 When you visit a file, Emacs sets @code{default-directory} in the
80interpreted with respect to the default directory. For example, 81visiting buffer to the directory of its file. When you create a new
81suppose the default directory is @file{/u/rms/gnu/}. Entering just 82buffer that is not visiting a file, via a command like @kbd{C-x b},
82@samp{foo} in the minibuffer, with a directory omitted, specifies the 83its default directory is usually copied from the buffer that was
83file @file{/u/rms/gnu/foo}; entering @samp{../.login} specifies 84current at the time (@pxref{Select Buffer}). You can use the command
85@kbd{M-x pwd} to see the value of @code{default-directory} in the
86current buffer. The command @kbd{M-x cd} prompts for a directory
87name, and sets the buffer's @code{default-directory} to that directory
88(doing this does not change the buffer's file name, if any).
89
90 As an example, when you visit the file @file{/u/rms/gnu/gnu.tasks},
91the default directory is set to @file{/u/rms/gnu/}. If you invoke a
92command that reads a file name, entering just @samp{foo} in the
93minibuffer, with a directory omitted, specifies the file
94@file{/u/rms/gnu/foo}; entering @samp{../.login} specifies
84@file{/u/rms/.login}; and entering @samp{new/foo} specifies 95@file{/u/rms/.login}; and entering @samp{new/foo} specifies
85@file{/u/rms/gnu/new/foo}. 96@file{/u/rms/gnu/new/foo}.
86 97
87 When typing a file name into the minibuffer, you can make use of a 98 When typing a file name into the minibuffer, you can make use of a
88couple of shortcuts: a double slash is interpreted as ``ignore 99couple of shortcuts: a double slash is interpreted as ``ignore
89everything before the second slash in the pair,'' and @samp{~/} is 100everything before the second slash in the pair,'' and @samp{~/} is
90interpreted as your home directory. @xref{Minibuffer File}, for more 101interpreted as your home directory. @xref{Minibuffer File}.
91information about these shortcuts.
92
93@findex cd
94@findex pwd
95 The command @kbd{M-x pwd} displays the default directory, and the
96command @kbd{M-x cd} sets it to a value read using the minibuffer. A
97buffer's default directory changes only when the @code{cd} command is
98used. A file-visiting buffer's default directory is initialized to
99the directory of the file it visits. If you create a buffer with
100@kbd{C-x b}, its default directory is copied from that of the buffer
101that was current at the time (@pxref{Select Buffer}).
102 102
103@cindex environment variables in file names 103@cindex environment variables in file names
104@cindex expansion of environment variables 104@cindex expansion of environment variables
@@ -113,10 +113,8 @@ the @samp{$}; alternatively, it can be enclosed in braces after the
113@file{/u/$@{FOO@}/test.c} are abbreviations for 113@file{/u/$@{FOO@}/test.c} are abbreviations for
114@file{/u/rms/hacks/test.c}. If the environment variable is not 114@file{/u/rms/hacks/test.c}. If the environment variable is not
115defined, no substitution occurs, so that the character @samp{$} stands 115defined, no substitution occurs, so that the character @samp{$} stands
116for itself. 116for itself. Note that environment variables affect Emacs only if they
117 117are applied before Emacs is started.
118 Note that environment variables affect Emacs only if they are
119applied before Emacs is started.
120 118
121 To access a file with @samp{$} in its name, if the @samp{$} causes 119 To access a file with @samp{$} in its name, if the @samp{$} causes
122expansion, type @samp{$$}. This pair is converted to a single 120expansion, type @samp{$$}. This pair is converted to a single
@@ -125,8 +123,7 @@ a single @samp{$}. Alternatively, quote the whole file name with
125@samp{/:} (@pxref{Quoted File Names}). File names which begin with a 123@samp{/:} (@pxref{Quoted File Names}). File names which begin with a
126literal @samp{~} should also be quoted with @samp{/:}. 124literal @samp{~} should also be quoted with @samp{/:}.
127 125
128 You can include non-@acronym{ASCII} characters in file names if you set the 126 You can include non-@acronym{ASCII} characters in file names.
129variable @code{file-name-coding-system} to a non-@code{nil} value.
130@xref{File Name Coding}. 127@xref{File Name Coding}.
131 128
132@node Visiting 129@node Visiting
@@ -159,48 +156,43 @@ Visit a file with no conversion of the contents.
159buffer so you can edit them. Emacs makes a new buffer for each file 156buffer so you can edit them. Emacs makes a new buffer for each file
160that you visit. 157that you visit.
161 158
162 Emacs normally constructs the buffer name from the file name, 159@kindex C-x C-f
163omitting the directory name. For example, a file named 160@findex find-file
164@file{/usr/rms/emacs.tex} is visited in a buffer named 161 To visit a file, type @kbd{C-x C-f} (@code{find-file}) and use the
165@samp{emacs.tex}. If there is already a buffer with that name, Emacs 162minibuffer to enter the name of the desired file. While in the
166constructs a unique name; the normal method is to append @samp{<2>}, 163minibuffer, you can abort the command by typing @kbd{C-g}. @xref{File
167@samp{<3>}, and so on, but you can select other methods. 164Names}, for details about entering file names into minibuffers.
165
166 If the specified file exists but the system does not allow you to
167read it, an error message is displayed in the echo area. Otherwise,
168you can tell that @kbd{C-x C-f} has completed successfully by the
169appearance of new text on the screen, and by the buffer name shown in
170the mode line (@pxref{Mode Line}). Emacs normally constructs the
171buffer name from the file name, omitting the directory name. For
172example, a file named @file{/usr/rms/emacs.tex} is visited in a buffer
173named @samp{emacs.tex}. If there is already a buffer with that name,
174Emacs constructs a unique name; the normal method is to append
175@samp{<2>}, @samp{<3>}, and so on, but you can select other methods.
168@xref{Uniquify}. 176@xref{Uniquify}.
169 177
170 Each window's mode line shows the name of the buffer that is being 178@cindex creating files
171displayed in that window, so you can always tell what buffer you are 179 To create a new file, just visit it using the same command, @kbd{C-x
172editing. @pxref{Mode Line}. 180C-f}. Emacs displays @samp{(New file)} in the echo area, but in other
173 181respects behaves as if you had visited an existing empty file.
174 The changes you make with editing commands are made in the Emacs
175buffer. They do not take effect in the file that you visited, or any
176permanent place, until you @dfn{save} the buffer (@pxref{Saving}).
177 182
178@cindex modified (buffer) 183@cindex modified (buffer)
179 If a buffer contains changes that have not been saved, we say the 184 After visiting a file, the changes you make with editing commands are
180buffer is @dfn{modified}. This implies that some changes will be lost 185made in the Emacs buffer. They do not take effect in the visited
181if the buffer is not saved. The mode line displays two stars near the 186file, until you @dfn{save} the buffer (@pxref{Saving}). If a buffer
182left margin to indicate that the buffer is modified. 187contains changes that have not been saved, we say the buffer is
183 188@dfn{modified}. This implies that some changes will be lost if the
184@kindex C-x C-f 189buffer is not saved. The mode line displays two stars near the left
185@findex find-file 190margin to indicate that the buffer is modified.
186 To visit a file, type @kbd{C-x C-f} (@code{find-file}) and use the 191
187minibuffer to enter the name of the desired file. The usual 192 If you visit a file that is already in Emacs, @kbd{C-x C-f} switches
188defaulting and completion behavior is available in this minibuffer 193to the existing buffer instead of making another copy. Before doing
189(@pxref{Minibuffer File}). Note, also, that completion ignores 194so, it checks whether the file has changed since you last visited or
190certain file names (@pxref{Completion Options}). While in the 195saved it. If the file has changed, Emacs offers to reread it.
191minibuffer, you can abort @kbd{C-x C-f} by typing @kbd{C-g}.
192
193 Your can tell that @kbd{C-x C-f} has completed successfully by the
194appearance of new text on the screen and a new buffer name in the mode
195line. If the specified file does not exist and you could not create
196it, or exists but you can't read it, an error message is displayed in
197the echo area.
198
199 If you visit a file that is already in Emacs, @kbd{C-x C-f} does not make
200another copy. It selects the existing buffer containing that file.
201However, before doing so, it checks whether the file itself has changed
202since you visited or saved it last. If the file has changed, Emacs offers
203to reread it.
204 196
205@vindex large-file-warning-threshold 197@vindex large-file-warning-threshold
206@cindex file, warning when size is large 198@cindex file, warning when size is large
@@ -211,10 +203,10 @@ to reread it.
211about 10 megabytes), Emacs asks you for confirmation first. You can 203about 10 megabytes), Emacs asks you for confirmation first. You can
212answer @kbd{y} to proceed with visiting the file. Note, however, that 204answer @kbd{y} to proceed with visiting the file. Note, however, that
213Emacs cannot visit files that are larger than the maximum Emacs buffer 205Emacs cannot visit files that are larger than the maximum Emacs buffer
214size, which is limited by the amount of memory Emacs can allocate 206size, which is limited by the amount of memory Emacs can allocate and
215and by the integers that Emacs can represent 207by the integers that Emacs can represent (@pxref{Buffers}). If you
216(@pxref{Buffers}). If you try, Emacs will display an error message 208try, Emacs displays an error message saying that the maximum buffer
217saying that the maximum buffer size has been exceeded. 209size has been exceeded.
218 210
219@cindex wildcard characters in file names 211@cindex wildcard characters in file names
220@vindex find-file-wildcards 212@vindex find-file-wildcards
@@ -228,63 +220,21 @@ File Names}, for information on how to visit a file whose name
228actually contains wildcard characters. You can disable the wildcard 220actually contains wildcard characters. You can disable the wildcard
229feature by customizing @code{find-file-wildcards}. 221feature by customizing @code{find-file-wildcards}.
230 222
231@cindex file selection dialog
232 On graphical displays, there are two additional methods for visiting
233files. Firstly, when Emacs is built with a suitable GUI toolkit,
234commands invoked with the mouse (by clicking on the menu bar or tool
235bar) use the toolkit's standard ``File Selection'' dialog instead of
236prompting for the file name in the minibuffer. On GNU/Linux and Unix
237platforms, Emacs does this when built with GTK, LessTif, and Motif
238toolkits; on MS-Windows and Mac, the GUI version does that by default.
239For information on how to customize this, see @ref{Dialog Boxes}.
240
241 Secondly, Emacs supports ``drag and drop'': dropping a file into an
242ordinary Emacs window visits the file using that window. As an
243exception, dropping a file into a window displaying a Dired buffer
244moves or copies the file into the displayed directory. For details,
245see @ref{Drag and Drop}, and @ref{Misc Dired Features}.
246
247@cindex creating files
248 What if you want to create a new file? Just visit it. Emacs
249displays @samp{(New file)} in the echo area, but in other respects
250behaves as if you had visited an existing empty file. If you make
251changes and save them, the file is created.
252
253@cindex minibuffer confirmation
254@cindex confirming in the minibuffer
255@vindex confirm-nonexistent-file-or-buffer
256 When @key{TAB} completion results in a nonexistent file name and you
257type @key{RET} immediately to visit it, Emacs asks for confirmation;
258this is because it's possible that you expected completion to go
259further and give you an existing file's name. The string
260@samp{[Confirm]} appears for a short time after the file name to
261indicate the need to confirm in this way. Type @key{RET} to confirm
262and visit the nonexistent file. The variable
263@code{confirm-nonexistent-file-or-buffer} controls whether Emacs asks
264for confirmation before visiting a new file. The default value,
265@code{after-completion}, gives the behavior we have just described.
266If the value is @code{nil}, Emacs never asks for confirmation; for any
267other non-@code{nil} value, Emacs always asks for confirmation. This
268variable also affects the @code{switch-to-buffer} command
269(@pxref{Select Buffer}). @xref{Completion}, for more information
270about completion.
271
272@kindex C-x C-v 223@kindex C-x C-v
273@findex find-alternate-file 224@findex find-alternate-file
274 If you visit a nonexistent file unintentionally (because you typed 225 If you visit the wrong file unintentionally by typing its name
275the wrong file name), type @kbd{C-x C-v} (@code{find-alternate-file}) 226incorrectly, type @kbd{C-x C-v} (@code{find-alternate-file}) to visit
276to visit the file you really wanted. @kbd{C-x C-v} is similar to 227the file you really wanted. @kbd{C-x C-v} is similar to @kbd{C-x
277@kbd{C-x C-f}, but it kills the current buffer (after first offering 228C-f}, but it kills the current buffer (after first offering to save it
278to save it if it is modified). When @kbd{C-x C-v} reads the file name 229if it is modified). When @kbd{C-x C-v} reads the file name to visit,
279to visit, it inserts the entire default file name in the buffer, with 230it inserts the entire default file name in the buffer, with point just
280point just after the directory part; this is convenient if you made a 231after the directory part; this is convenient if you made a slight
281slight error in typing the name. 232error in typing the name.
282 233
283@vindex find-file-run-dired 234@vindex find-file-run-dired
284 If you ``visit'' a file that is actually a directory, Emacs invokes 235 If you ``visit'' a file that is actually a directory, Emacs invokes
285Dired, the Emacs directory browser; this lets you ``edit'' the 236Dired, the Emacs directory browser. @xref{Dired}. You can disable
286contents of the directory. @xref{Dired}. You can disable this 237this behavior by setting the variable @code{find-file-run-dired} to
287behavior by setting the variable @code{find-file-run-dired} to
288@code{nil}; in that case, it is an error to try to visit a directory. 238@code{nil}; in that case, it is an error to try to visit a directory.
289 239
290 Files which are actually collections of other files, or @dfn{file 240 Files which are actually collections of other files, or @dfn{file
@@ -321,17 +271,28 @@ new frame, or makes visible any existing frame showing the file you
321seek. This feature is available only when you are using a window 271seek. This feature is available only when you are using a window
322system. @xref{Frames}. 272system. @xref{Frames}.
323 273
324 Emacs recognizes from the contents of a file which end-of-line 274@cindex file selection dialog
325convention it uses to separate lines---newline (used on GNU/Linux and 275 On graphical displays, there are two additional methods for visiting
326on Unix), carriage-return linefeed (used on Microsoft systems), or 276files. Firstly, when Emacs is built with a suitable GUI toolkit,
327just carriage-return (used on the Macintosh)---and automatically 277commands invoked with the mouse (by clicking on the menu bar or tool
328converts the contents to the normal Emacs convention, which is that 278bar) use the toolkit's standard ``File Selection'' dialog instead of
329the newline character separates lines. This is a part of the general 279prompting for the file name in the minibuffer. On GNU/Linux and Unix
330feature of coding system conversion (@pxref{Coding Systems}), and 280platforms, Emacs does this when built with GTK, LessTif, and Motif
331makes it possible to edit files imported from different operating 281toolkits; on MS-Windows and Mac, the GUI version does that by default.
332systems with equal convenience. If you change the text and save the 282For information on how to customize this, see @ref{Dialog Boxes}.
333file, Emacs performs the inverse conversion, changing newlines back 283
334into carriage-return linefeed or just carriage-return if appropriate. 284 Secondly, Emacs supports ``drag and drop'': dropping a file into an
285ordinary Emacs window visits the file using that window. As an
286exception, dropping a file into a window displaying a Dired buffer
287moves or copies the file into the displayed directory. For details,
288see @ref{Drag and Drop}, and @ref{Misc Dired Features}.
289
290 Each time you visit a file, Emacs automatically scans its contents
291to detect what character encoding and end-of-line convention it uses,
292and converts these to Emacs' internal encoding and end-of-line
293convention within the buffer. When you save the buffer, Emacs
294performs the inverse conversion, writing the file to disk with its
295original encoding and end-of-line convention. @xref{Coding Systems}.
335 296
336@findex find-file-literally 297@findex find-file-literally
337 If you wish to edit a file as a sequence of @acronym{ASCII} 298 If you wish to edit a file as a sequence of @acronym{ASCII}
@@ -346,17 +307,17 @@ command asks you whether to visit it literally instead.
346 307
347@vindex find-file-hook 308@vindex find-file-hook
348@vindex find-file-not-found-functions 309@vindex find-file-not-found-functions
349 Two special hook variables allow extensions to modify the operation of 310 Two special hook variables allow extensions to modify the operation
350visiting files. Visiting a file that does not exist runs the functions 311of visiting files. Visiting a file that does not exist runs the
351in the list @code{find-file-not-found-functions}; this variable holds a list 312functions in @code{find-file-not-found-functions}; this variable holds
352of functions, and the functions are called one by one (with no 313a list of functions, which are called one by one (with no arguments)
353arguments) until one of them returns non-@code{nil}. This is not a 314until one of them returns non-@code{nil}. This is not a normal hook,
354normal hook, and the name ends in @samp{-functions} rather than @samp{-hook} 315and the name ends in @samp{-functions} rather than @samp{-hook} to
355to indicate that fact. 316indicate that fact.
356 317
357 Successful visiting of any file, whether existing or not, calls the 318 Successful visiting of any file, whether existing or not, calls the
358functions in the list @code{find-file-hook}, with no arguments. 319functions in @code{find-file-hook}, with no arguments. This variable
359This variable is a normal hook. In the case of a nonexistent file, the 320is a normal hook. In the case of a nonexistent file, the
360@code{find-file-not-found-functions} are run first. @xref{Hooks}. 321@code{find-file-not-found-functions} are run first. @xref{Hooks}.
361 322
362 There are several ways to specify automatically the major mode for 323 There are several ways to specify automatically the major mode for
@@ -386,9 +347,9 @@ that was visited in the buffer.
386 347
387@table @kbd 348@table @kbd
388@item C-x C-s 349@item C-x C-s
389Save the current buffer in its visited file on disk (@code{save-buffer}). 350Save the current buffer to its file (@code{save-buffer}).
390@item C-x s 351@item C-x s
391Save any or all buffers in their visited files (@code{save-some-buffers}). 352Save any or all buffers to their files (@code{save-some-buffers}).
392@item M-~ 353@item M-~
393Forget that the current buffer has been changed (@code{not-modified}). 354Forget that the current buffer has been changed (@code{not-modified}).
394With prefix argument (@kbd{C-u}), mark the current buffer as changed. 355With prefix argument (@kbd{C-u}), mark the current buffer as changed.
@@ -409,10 +370,10 @@ Wrote /u/rms/gnu/gnu.tasks
409@end example 370@end example
410 371
411@noindent 372@noindent
412If the selected buffer is not modified (no changes have been made in it 373If the current buffer is not modified (no changes have been made in it
413since the buffer was created or last saved), saving is not really done, 374since the buffer was created or last saved), saving is not really
414because it would have no effect. Instead, @kbd{C-x C-s} displays a message 375done, because it would have no effect. Instead, @kbd{C-x C-s}
415like this in the echo area: 376displays a message like this in the echo area:
416 377
417@example 378@example
418(No changes need to be saved) 379(No changes need to be saved)
@@ -597,8 +558,8 @@ Never make numbered backups; always make single backups.
597@end table 558@end table
598 559
599@noindent 560@noindent
600The usual way to set this variable is globally, through your 561The usual way to set this variable is globally, through your init file
601@file{.emacs} file or the customization buffer. However, you can set 562or the customization buffer. However, you can set
602@code{version-control} locally in an individual buffer to control the 563@code{version-control} locally in an individual buffer to control the
603making of backups for that buffer's file (@pxref{Locals}). You can 564making of backups for that buffer's file (@pxref{Locals}). You can
604have Emacs set @code{version-control} locally whenever you visit a 565have Emacs set @code{version-control} locally whenever you visit a
@@ -679,34 +640,38 @@ and group. If copying is used, these do not change. If renaming is used,
679you become the file's owner, and the file's group becomes the default 640you become the file's owner, and the file's group becomes the default
680(different operating systems have different defaults for the group). 641(different operating systems have different defaults for the group).
681 642
682 Having the owner change is usually a good idea, because then the owner
683always shows who last edited the file. Also, the owners of the backups
684show who produced those versions. Occasionally there is a file whose
685owner should not change; it is a good idea for such files to contain
686local variable lists to set @code{backup-by-copying-when-mismatch}
687locally (@pxref{File Variables}).
688
689@vindex backup-by-copying 643@vindex backup-by-copying
690@vindex backup-by-copying-when-linked 644@vindex backup-by-copying-when-linked
691@vindex backup-by-copying-when-mismatch 645@vindex backup-by-copying-when-mismatch
692@vindex backup-by-copying-when-privileged-mismatch 646@vindex backup-by-copying-when-privileged-mismatch
693@cindex file ownership, and backup 647@cindex file ownership, and backup
694@cindex backup, and user-id 648@cindex backup, and user-id
695 The choice of renaming or copying is controlled by four variables. 649 The choice of renaming or copying is made as follows:
696Renaming is the default choice. If the variable 650
697@code{backup-by-copying} is non-@code{nil}, copying is used. Otherwise, 651@itemize
698if the variable @code{backup-by-copying-when-linked} is non-@code{nil}, 652@item
699then copying is used for files that have multiple names, but renaming 653If the variable @code{backup-by-copying} is non-@code{nil} (the
700may still be used when the file being edited has only one name. If the 654default is @code{nil}), use copying.
701variable @code{backup-by-copying-when-mismatch} is non-@code{nil}, then 655
702copying is used if renaming would cause the file's owner or group to 656@item
703change. @code{backup-by-copying-when-mismatch} is @code{t} by default 657Otherwise, if the variable @code{backup-by-copying-when-linked} is
704if you start Emacs as the superuser. The fourth variable, 658non-@code{nil} (the default is @code{nil}), and the file has multiple
705@code{backup-by-copying-when-privileged-mismatch}, gives the highest 659names, use copying.
706numeric user-id for which @code{backup-by-copying-when-mismatch} will be 660
707forced on. This is useful when low-numbered user-ids are assigned to 661@item
708special system users, such as @code{root}, @code{bin}, @code{daemon}, 662Otherwise, if the variable @code{backup-by-copying-when-mismatch} is
709etc., which must maintain ownership of files. 663non-@code{nil} (the default is @code{t}), and renaming would change
664the file's owner or group, use copying.
665
666If you change @code{backup-by-copying-when-mismatch} to @code{nil},
667Emacs checks the numeric user-id of the file's owner. If this is
668higher than @code{backup-by-copying-when-privileged-mismatch}, then it
669behaves as though @code{backup-by-copying-when-mismatch} is
670non-@code{nil} anyway.
671
672@item
673Otherwise, renaming is the default choice.
674@end itemize
710 675
711 When a file is managed with a version control system (@pxref{Version 676 When a file is managed with a version control system (@pxref{Version
712Control}), Emacs does not normally make backups in the usual way for 677Control}), Emacs does not normally make backups in the usual way for
@@ -725,28 +690,28 @@ Emacs---the version control system does it.
725if there isn't already one there. If the value is @code{visit}, Emacs 690if there isn't already one there. If the value is @code{visit}, Emacs
726adds a newline at the end of any file that doesn't have one, just 691adds a newline at the end of any file that doesn't have one, just
727after it visits the file. (This marks the buffer as modified, and you 692after it visits the file. (This marks the buffer as modified, and you
728can undo it.) If the value is @code{visit-save}, that means to add 693can undo it.) If the value is @code{visit-save}, Emacs adds such
729newlines both on visiting and on saving. If the value is @code{nil}, 694newlines both on visiting and on saving. If the value is @code{nil},
730Emacs leaves the end of the file unchanged; if it's neither @code{nil} 695Emacs leaves the end of the file unchanged; any other non-@code{nil}
731nor @code{t}, Emacs asks you whether to add a newline. The default is 696value means to asks you whether to add a newline. The default is
732@code{nil}. 697@code{nil}.
733 698
734@vindex mode-require-final-newline 699@vindex mode-require-final-newline
735 Many major modes are designed for specific kinds of files that are 700 Some major modes are designed for specific kinds of files that are
736always supposed to end in newlines. These major modes set the 701always supposed to end in newlines. Such major modes set the variable
737variable @code{require-final-newline} according to 702@code{require-final-newline} to the value of
738@code{mode-require-final-newline}. By setting the latter variable, 703@code{mode-require-final-newline}, which defaults to @code{t}. By
739you can control how these modes handle final newlines. 704setting the latter variable, you can control how these modes handle
705final newlines.
740 706
741@vindex write-region-inhibit-fsync 707@vindex write-region-inhibit-fsync
742 When Emacs saves a file, it invokes the @code{fsync} system call to 708 When Emacs saves a file, it invokes the @code{fsync} system call to
743force the data immediately out to disk. This is important for safety 709force the data immediately out to disk. This is important for safety
744if the system crashes or in case of power outage. However, it can be 710if the system crashes or in case of power outage. However, it can be
745disruptive on laptops using power saving, because it requires the disk 711disruptive on laptops using power saving, as it may force a disk
746to spin up each time you save a file. Setting 712spin-up each time you save a file. If you accept an increased risk of
747@code{write-region-inhibit-fsync} to a non-@code{nil} value disables 713data loss, you can set @code{write-region-inhibit-fsync} to a
748this synchronization. Be careful---this means increased risk of data 714non-@code{nil} value to disable the synchronization.
749loss.
750 715
751@node Interlocking 716@node Interlocking
752@subsection Protection against Simultaneous Editing 717@subsection Protection against Simultaneous Editing
@@ -754,9 +719,9 @@ loss.
754@cindex file dates 719@cindex file dates
755@cindex simultaneous editing 720@cindex simultaneous editing
756 Simultaneous editing occurs when two users visit the same file, both 721 Simultaneous editing occurs when two users visit the same file, both
757make changes, and then both save them. If nobody were informed that 722make changes, and then both save them. If nobody is informed that
758this was happening, whichever user saved first would later find that his 723this is happening, whichever user saves first would later find that
759changes were lost. 724his changes were lost.
760 725
761 On some systems, Emacs notices immediately when the second user starts 726 On some systems, Emacs notices immediately when the second user starts
762to change the file, and issues an immediate warning. On all systems, 727to change the file, and issues an immediate warning. On all systems,
@@ -794,38 +759,28 @@ contents remain unchanged---the modification you were trying to make
794does not actually take place. 759does not actually take place.
795@end table 760@end table
796 761
797 Note that locking works on the basis of a file name; if a file has
798multiple names, Emacs does not realize that the two names are the same file
799and cannot prevent two users from editing it simultaneously under different
800names. However, basing locking on names means that Emacs can interlock the
801editing of new files that will not really exist until they are saved.
802
803 Some systems are not configured to allow Emacs to make locks, and
804there are cases where lock files cannot be written. In these cases,
805Emacs cannot detect trouble in advance, but it still can detect the
806collision when you try to save a file and overwrite someone else's
807changes. Every time Emacs saves a buffer, it first checks the
808last-modification date of the existing file on disk to verify that it
809has not changed since the file was last visited or saved. If the date
810does not match, it implies that changes were made in the file in some
811other way, and these changes are about to be lost if Emacs actually
812does save. To prevent this, Emacs displays a warning message and asks
813for confirmation before saving. Occasionally you will know why the
814file was changed and know that it does not matter; then you can answer
815@kbd{yes} and proceed. Otherwise, you should cancel the save with
816@kbd{C-g} and investigate the situation.
817
818 If Emacs or the operating system crashes, this may leave behind lock 762 If Emacs or the operating system crashes, this may leave behind lock
819files which are stale, so you may occasionally get warnings about 763files which are stale, so you may occasionally get warnings about
820spurious collisions. When you determine that the collision is spurious, 764spurious collisions. When you determine that the collision is
821just use @kbd{p} to tell Emacs to go ahead anyway. 765spurious, just use @kbd{p} to tell Emacs to go ahead anyway.
822 766
823 The first thing you should do when notified that simultaneous editing 767 Note that locking works on the basis of a file name; if a file has
824has already taken place is to list the directory with @kbd{C-u C-x C-d} 768multiple names, Emacs does not prevent two users from editing it
825(@pxref{Directories}). This shows the file's current author. You 769simultaneously under different names.
826should attempt to contact him to warn him not to continue editing. 770
827Often the next step is to save the contents of your Emacs buffer under a 771 A lock file cannot be written in some circumstances, e.g. if Emacs
828different name, and use @code{diff} to compare the two files.@refill 772lacks the system permissions or the system does not support symbolic
773links. In these cases, Emacs can still detect the collision when you
774try to save a file, by checking the file's last-modification date. If
775the file has changed since the last time Emacs visited or saved it,
776that implies that changes have been made in some other way, and will
777be lost if Emacs proceeds with saving. Emacs then displays a warning
778message and asks for confirmation before saving; answer @kbd{yes} to
779save, and @kbd{no} or @kbd{C-g} cancel the save.
780
781 If you are notified that simultaneous editing has already taken
782place, one way to compare the buffer to its file is the @kbd{M-x
783diff-buffer-with-file} command. @xref{Comparing Files}.
829 784
830@node File Shadowing 785@node File Shadowing
831@subsection Shadowing Files 786@subsection Shadowing Files
@@ -881,10 +836,10 @@ shadow-define-cluster}.
881@cindex modification dates 836@cindex modification dates
882@cindex locale, date format 837@cindex locale, date format
883 838
884You can arrange to put a time stamp in a file, so that it will be updated 839You can arrange to put a time stamp in a file, so that it is updated
885automatically each time you edit and save the file. The time stamp 840automatically each time you edit and save the file. The time stamp
886has to be in the first eight lines of the file, and you should 841must be in the first eight lines of the file, and you should insert it
887insert it like this: 842like this:
888 843
889@example 844@example
890Time-stamp: <> 845Time-stamp: <>
@@ -898,13 +853,13 @@ Time-stamp: " "
898@end example 853@end example
899 854
900@findex time-stamp 855@findex time-stamp
901 Then add the hook function @code{time-stamp} to the hook 856 Then add the function @code{time-stamp} to the hook
902@code{before-save-hook}; that hook function will automatically update 857@code{before-save-hook} (@pxref{Hooks}). When you save the file, this
903the time stamp, inserting the current date and time when you save the 858function then automatically updates the time stamp with the current
904file. You can also use the command @kbd{M-x time-stamp} to update the 859date and time. You can also use the command @kbd{M-x time-stamp} to
905time stamp manually. For other customizations, see the Custom group 860update the time stamp manually. For other customizations, see the
906@code{time-stamp}. Note that non-numeric fields in the time stamp are 861Custom group @code{time-stamp}. Note that the time stamp is formatted
907formatted according to your locale setting (@pxref{Environment}). 862according to your locale setting (@pxref{Environment}).
908 863
909@node Reverting 864@node Reverting
910@section Reverting a Buffer 865@section Reverting a Buffer
@@ -912,18 +867,21 @@ formatted according to your locale setting (@pxref{Environment}).
912@cindex drastic changes 867@cindex drastic changes
913@cindex reread a file 868@cindex reread a file
914 869
915 If you have made extensive changes to a file and then change your mind 870 If you have made extensive changes to a file-visiting buffer and
916about them, you can get rid of them by reading in the previous version 871then change your mind, you can @dfn{revert} the changes and go back to
917of the file. To do this, use @kbd{M-x revert-buffer}, which operates on 872the saved version of the file. To do this, type @kbd{M-x
918the current buffer. Since reverting a buffer unintentionally could lose 873revert-buffer}. Since reverting unintentionally could lose a lot of
919a lot of work, you must confirm this command with @kbd{yes}. 874work, Emacs asks for confirmation first.
920 875
921 @code{revert-buffer} tries to position point in such a way that, if 876 The @code{revert-buffer} command tries to position point in such a
922the file was edited only slightly, you will be at approximately the 877way that, if the file was edited only slightly, you will be at
923same piece of text after reverting as before. However, if you have made 878approximately the same part of the text as before. But if you have
924drastic changes, point may wind up in a totally different piece of text. 879made major changes, point may end up in a totally different location.
925 880
926 Reverting marks the buffer as ``not modified''. 881 Reverting marks the buffer as ``not modified''. It also clears the
882buffer's undo history (@pxref{Undo}). Thus, the reversion cannot be
883undone---if you change your mind yet again, you can't use the undo
884commands to bring the reverted changes back.
927 885
928 Some kinds of buffers that are not associated with files, such as 886 Some kinds of buffers that are not associated with files, such as
929Dired buffers, can also be reverted. For them, reverting means 887Dired buffers, can also be reverted. For them, reverting means
@@ -950,15 +908,14 @@ discard your changes.)
950@findex auto-revert-mode 908@findex auto-revert-mode
951@findex auto-revert-tail-mode 909@findex auto-revert-tail-mode
952@vindex auto-revert-interval 910@vindex auto-revert-interval
953 911 You can also tell Emacs to revert buffers periodically. To do this
954 In addition, you can tell Emacs to periodically revert a buffer by 912for a specific buffer, enable the minor mode Auto-Revert mode by
955typing @kbd{M-x auto-revert-mode}. This turns on Auto-Revert mode, a 913typing @kbd{M-x auto-revert-mode}. This automatically reverts the
956minor mode that makes Emacs automatically revert the current buffer 914current buffer every five seconds; you can change the interval through
957every five seconds. You can change this interval through the variable 915the variable @code{auto-revert-interval}. To do the same for all file
958@code{auto-revert-interval}. Typing @kbd{M-x global-auto-revert-mode} 916buffers, type @kbd{M-x global-auto-revert-mode} to enable Global
959enables Global Auto-Revert mode, which does the same for all file 917Auto-Revert mode. These minor modes do not check or revert remote
960buffers. Auto-Revert mode and Global Auto-Revert modes do not check 918files, because that is usually too slow.
961or revert remote files, because that is usually too slow.
962 919
963 One use of Auto-Revert mode is to ``tail'' a file such as a system 920 One use of Auto-Revert mode is to ``tail'' a file such as a system
964log, so that changes made to that file by other programs are 921log, so that changes made to that file by other programs are
@@ -969,8 +926,9 @@ the end, use Auto-Revert Tail mode instead
969(@code{auto-revert-tail-mode}). It is more efficient for this. 926(@code{auto-revert-tail-mode}). It is more efficient for this.
970Auto-Revert Tail mode works also for remote files. 927Auto-Revert Tail mode works also for remote files.
971 928
972 @xref{VC Mode Line}, for Auto Revert peculiarities in buffers that 929 @xref{VC Undo}, for commands to revert to earlier versions of files
973visit files under version control. 930under version control. @xref{VC Mode Line}, for Auto Revert
931peculiarities when visiting files under version control.
974 932
975@ifnottex 933@ifnottex
976@include arevert-xtra.texi 934@include arevert-xtra.texi
@@ -1061,40 +1019,41 @@ any auto-save file to go with the new visited name.
1061@vindex auto-save-default 1019@vindex auto-save-default
1062@findex auto-save-mode 1020@findex auto-save-mode
1063 Each time you visit a file, auto-saving is turned on for that file's 1021 Each time you visit a file, auto-saving is turned on for that file's
1064buffer if the variable @code{auto-save-default} is non-@code{nil} (but not 1022buffer if the variable @code{auto-save-default} is non-@code{nil} (but
1065in batch mode; @pxref{Entering Emacs}). The default for this variable is 1023not in batch mode; @pxref{Initial Options}). The default for this
1066@code{t}, so auto-saving is the usual practice for file-visiting buffers. 1024variable is @code{t}, so auto-saving is the usual practice for
1067Auto-saving can be turned on or off for any existing buffer with the 1025file-visiting buffers. To toggle auto-saving in the current buffer,
1068command @kbd{M-x auto-save-mode}. Like other minor mode commands, @kbd{M-x 1026type @kbd{M-x auto-save-mode}. Auto Save mode acts as a buffer-local
1069auto-save-mode} turns auto-saving on with a positive argument, off with a 1027minor mode (@pxref{Minor Modes}).
1070zero or negative argument; with no argument, it toggles.
1071 1028
1072@vindex auto-save-interval 1029@vindex auto-save-interval
1073 Emacs does auto-saving periodically based on counting how many characters 1030 Emacs auto-saves periodically based on how many characters you have
1074you have typed since the last time auto-saving was done. The variable 1031typed since the last auto-save. The variable
1075@code{auto-save-interval} specifies how many characters there are between 1032@code{auto-save-interval} specifies how many characters there are
1076auto-saves. By default, it is 300. Emacs doesn't accept values that are 1033between auto-saves. By default, it is 300. Emacs doesn't accept
1077too small: if you customize @code{auto-save-interval} to a value less 1034values that are too small: if you customize @code{auto-save-interval}
1078than 20, Emacs will behave as if the value is 20. 1035to a value less than 20, Emacs will behave as if the value is 20.
1079 1036
1080@vindex auto-save-timeout 1037@vindex auto-save-timeout
1081 Auto-saving also takes place when you stop typing for a while. The 1038 Auto-saving also takes place when you stop typing for a while. By
1082variable @code{auto-save-timeout} says how many seconds Emacs should 1039default, it does this after 30 seconds of idleness (at this time,
1083wait before it does an auto save (and perhaps also a garbage 1040Emacs may also perform garbage collection; @pxref{Garbage
1084collection). (The actual time period is longer if the current buffer is 1041Collection,,, elisp, The Emacs Lisp Reference Manual}). To change
1085long; this is a heuristic which aims to keep out of your way when you 1042this interval, customize the variable @code{auto-save-timeout}. The
1086are editing long buffers, in which auto-save takes an appreciable amount 1043actual time period is longer if the current buffer is long; this is a
1087of time.) Auto-saving during idle periods accomplishes two things: 1044heuristic which aims to keep out of your way when you are editing long
1088first, it makes sure all your work is saved if you go away from the 1045buffers, in which auto-save takes an appreciable amount of time.
1089terminal for a while; second, it may avoid some auto-saving while you 1046Auto-saving during idle periods accomplishes two things: first, it
1090are actually typing. 1047makes sure all your work is saved if you go away from the terminal for
1048a while; second, it may avoid some auto-saving while you are actually
1049typing.
1091 1050
1092 Emacs also does auto-saving whenever it gets a fatal error. This 1051 Emacs also does auto-saving whenever it gets a fatal error. This
1093includes killing the Emacs job with a shell command such as @samp{kill 1052includes killing the Emacs job with a shell command such as @samp{kill
1094%emacs}, or disconnecting a phone line or network connection. 1053%emacs}, or disconnecting a phone line or network connection.
1095 1054
1096@findex do-auto-save 1055@findex do-auto-save
1097 You can request an auto-save explicitly with the command @kbd{M-x 1056 You can perform an auto-save explicitly with the command @kbd{M-x
1098do-auto-save}. 1057do-auto-save}.
1099 1058
1100@node Recover 1059@node Recover
@@ -1138,13 +1097,11 @@ this---saving them---updates the files themselves.
1138 1097
1139@vindex auto-save-list-file-prefix 1098@vindex auto-save-list-file-prefix
1140 Emacs records information about interrupted sessions for later 1099 Emacs records information about interrupted sessions for later
1141recovery in files named 1100recovery in files named @file{.saves-@var{pid}-@var{hostname}} in the
1142@file{~/.emacs.d/auto-save-list/.saves-@var{pid}-@var{hostname}}. The 1101directory @file{~/.emacs.d/auto-save-list/}. This directory is
1143directory used, @file{~/.emacs.d/auto-save-list/}, is determined by 1102determined by the variable @code{auto-save-list-file-prefix}. If you
1144the variable @code{auto-save-list-file-prefix}. You can record 1103set @code{auto-save-list-file-prefix} to @code{nil}, sessions are not
1145sessions in a different place by customizing that variable. If you 1104recorded for recovery.
1146set @code{auto-save-list-file-prefix} to @code{nil} in your
1147@file{.emacs} file, sessions are not recorded for recovery.
1148 1105
1149@node File Aliases 1106@node File Aliases
1150@section File Name Aliases 1107@section File Name Aliases
@@ -1292,8 +1249,8 @@ buffer named @samp{*diff*}. This works by running the @command{diff}
1292program, using options taken from the variable @code{diff-switches}. 1249program, using options taken from the variable @code{diff-switches}.
1293The value of @code{diff-switches} should be a string; the default is 1250The value of @code{diff-switches} should be a string; the default is
1294@code{"-c"} to specify a context diff. @xref{Top,, Diff, diff, 1251@code{"-c"} to specify a context diff. @xref{Top,, Diff, diff,
1295Comparing and Merging Files}, for more information about 1252Comparing and Merging Files}, for more information about the
1296@command{diff} output formats. 1253@command{diff} program.
1297 1254
1298 The output of the @code{diff} command is shown using a major mode 1255 The output of the @code{diff} command is shown using a major mode
1299called Diff mode. @xref{Diff Mode}. 1256called Diff mode. @xref{Diff Mode}.
@@ -1361,11 +1318,10 @@ merging files.
1361@cindex patches, editing 1318@cindex patches, editing
1362 1319
1363 Diff mode is a major mode used for the output of @kbd{M-x diff} and 1320 Diff mode is a major mode used for the output of @kbd{M-x diff} and
1364other similar commands, as well as the output of the @command{diff} 1321other similar commands. This kind of output is called a @dfn{patch},
1365program. This kind of output is called a @dfn{patch}, because it can 1322because it can be passed to the @command{patch} command to
1366be passed to the @command{patch} command to automatically apply the 1323automatically apply the specified changes. To select Diff mode
1367specified changes. To select Diff mode manually, type @kbd{M-x 1324manually, type @kbd{M-x diff-mode}.
1368diff-mode}.
1369 1325
1370@cindex hunk, diff 1326@cindex hunk, diff
1371 The changes specified in a patch are grouped into @dfn{hunks}, which 1327 The changes specified in a patch are grouped into @dfn{hunks}, which
@@ -1659,21 +1615,18 @@ Tar mode is used also for compressed archives---files with extensions
1659 The keys @kbd{e}, @kbd{f} and @key{RET} all extract a component file 1615 The keys @kbd{e}, @kbd{f} and @key{RET} all extract a component file
1660into its own buffer. You can edit it there, and if you save the 1616into its own buffer. You can edit it there, and if you save the
1661buffer, the edited version will replace the version in the Tar buffer. 1617buffer, the edited version will replace the version in the Tar buffer.
1662@kbd{v} extracts a file into a buffer in View mode (@pxref{View 1618Clicking with the mouse on the file name in the Tar buffer does
1663Mode}). @kbd{o} extracts the file and displays it in another window, 1619likewise. @kbd{v} extracts a file into a buffer in View mode
1664so you could edit the file and operate on the archive simultaneously. 1620(@pxref{View Mode}). @kbd{o} extracts the file and displays it in
1665@kbd{d} marks a file for deletion when you later use @kbd{x}, and 1621another window, so you could edit the file and operate on the archive
1622simultaneously.
1623
1624 @kbd{d} marks a file for deletion when you later use @kbd{x}, and
1666@kbd{u} unmarks a file, as in Dired. @kbd{C} copies a file from the 1625@kbd{u} unmarks a file, as in Dired. @kbd{C} copies a file from the
1667archive to disk and @kbd{R} renames a file within the archive. 1626archive to disk and @kbd{R} renames a file within the archive.
1668@kbd{g} reverts the buffer from the archive on disk. 1627@kbd{g} reverts the buffer from the archive on disk. The keys
1669 1628@kbd{M}, @kbd{G}, and @kbd{O} change the file's permission bits,
1670 The keys @kbd{M}, @kbd{G}, and @kbd{O} change the file's permission 1629group, and owner, respectively.
1671bits, group, and owner, respectively.
1672
1673 If your display supports colors and the mouse, moving the mouse
1674pointer across a file name highlights that file name, indicating that
1675you can click on it. Clicking @kbd{Mouse-2} on the highlighted file
1676name extracts the file into a buffer and displays that buffer.
1677 1630
1678 Saving the Tar buffer writes a new version of the archive to disk with 1631 Saving the Tar buffer writes a new version of the archive to disk with
1679the changes you made to the components. 1632the changes you made to the components.
@@ -1690,19 +1643,20 @@ requires the appropriate uncompression program.
1690@cindex @code{zip} 1643@cindex @code{zip}
1691@cindex @code{lzh} 1644@cindex @code{lzh}
1692@cindex @code{zoo} 1645@cindex @code{zoo}
1646@cindex @code{7z}
1693@pindex arc 1647@pindex arc
1694@pindex jar 1648@pindex jar
1695@pindex zip 1649@pindex zip
1696@pindex rar 1650@pindex rar
1697@pindex lzh 1651@pindex lzh
1698@pindex zoo 1652@pindex zoo
1653@pindex 7z
1699@cindex Java class archives 1654@cindex Java class archives
1700@cindex unzip archives 1655@cindex unzip archives
1701 A separate but similar Archive mode is used for archives produced by 1656 A separate but similar Archive mode is used for @code{arc},
1702the programs @code{arc}, @code{jar}, @code{lzh}, @code{zip}, 1657@code{jar}, @code{lzh}, @code{zip}, @code{rar}, @code{7z}, and
1703@code{rar}, and @code{zoo}, which have extensions corresponding to the 1658@code{zoo} archives, as well as @code{exe} files that are
1704program names. Archive mode also works for those @code{exe} files 1659self-extracting executables.
1705that are self-extracting executables.
1706 1660
1707 The key bindings of Archive mode are similar to those in Tar mode, 1661 The key bindings of Archive mode are similar to those in Tar mode,
1708with the addition of the @kbd{m} key which marks a file for subsequent 1662with the addition of the @kbd{m} key which marks a file for subsequent
@@ -1712,11 +1666,11 @@ information, for those archive types where it won't fit in a single
1712line. Operations such as renaming a subfile, or changing its mode or 1666line. Operations such as renaming a subfile, or changing its mode or
1713owner, are supported only for some of the archive formats. 1667owner, are supported only for some of the archive formats.
1714 1668
1715 Unlike Tar mode, Archive mode runs the archiving program to unpack 1669 Unlike Tar mode, Archive mode runs the archiving programs to unpack
1716and repack archives. Details of the program names and their options 1670and repack archives. However, you don't need these programs to look
1717can be set in the @samp{Archive} Customize group. However, you don't 1671at the archive table of contents, only to extract or manipulate the
1718need these programs to look at the archive table of contents, only to 1672subfiles in the archive. Details of the program names and their
1719extract or manipulate the subfiles in the archive. 1673options can be set in the @samp{Archive} Customize group.
1720 1674
1721@node Remote Files 1675@node Remote Files
1722@section Remote Files 1676@section Remote Files
@@ -1748,16 +1702,14 @@ Emacs chooses the method as follows:
1748 1702
1749@enumerate 1703@enumerate
1750@item 1704@item
1751If the host name starts with @samp{ftp.} (with dot), then Emacs uses 1705If the host name starts with @samp{ftp.} (with dot), Emacs uses FTP.
1752FTP.
1753@item 1706@item
1754If the user name is @samp{ftp} or @samp{anonymous}, then Emacs uses 1707If the user name is @samp{ftp} or @samp{anonymous}, Emacs uses FTP.
1755FTP.
1756@item 1708@item
1757If the variable @code{tramp-default-method} is set to @samp{ftp}, 1709If the variable @code{tramp-default-method} is set to @samp{ftp},
1758then Emacs uses FTP. 1710Emacs uses FTP.
1759@item 1711@item
1760If @command{ssh-agent} is running, then Emacs uses @command{scp}. 1712If @command{ssh-agent} is running, Emacs uses @command{scp}.
1761@item 1713@item
1762Otherwise, Emacs uses @command{ssh}. 1714Otherwise, Emacs uses @command{ssh}.
1763@end enumerate 1715@end enumerate
@@ -1769,32 +1721,31 @@ variable @code{tramp-mode} to @code{nil}. You can turn off the
1769feature in individual cases by quoting the file name with @samp{/:} 1721feature in individual cases by quoting the file name with @samp{/:}
1770(@pxref{Quoted File Names}). 1722(@pxref{Quoted File Names}).
1771 1723
1724@cindex ange-ftp
1772 Remote file access through FTP is handled by the Ange-FTP package, which 1725 Remote file access through FTP is handled by the Ange-FTP package, which
1773is documented in the following. Remote file access through the other 1726is documented in the following. Remote file access through the other
1774methods is handled by the Tramp package, which has its own manual. 1727methods is handled by the Tramp package, which has its own manual.
1775@xref{Top, The Tramp Manual,, tramp, The Tramp Manual}. 1728@xref{Top, The Tramp Manual,, tramp, The Tramp Manual}.
1776 1729
1777When the Ange-FTP package is used, Emacs logs in through FTP using 1730@vindex ange-ftp-default-user
1778your user name or the name @var{user}. It may ask you for a password 1731@cindex user name for remote file access
1779from time to time (@pxref{Passwords}); this is used for logging in on 1732 When the Ange-FTP package is used, Emacs logs in through FTP using
1780@var{host}. The form using @var{port} allows you to access servers 1733the name @var{user}, if that is specified in the remote file name. If
1781running on a non-default TCP port. 1734@var{user} is unspecified, Emacs logs in using your user name on the
1735local system; but if you set the variable @code{ange-ftp-default-user}
1736to a string, that string is used instead. When logging in, Emacs may
1737also ask for a password.
1782 1738
1783@cindex backups for remote files 1739@cindex backups for remote files
1784@vindex ange-ftp-make-backup-files 1740@vindex ange-ftp-make-backup-files
1785 If you want to disable backups for remote files, set the variable 1741 For performance reasons, Emacs does not make backup files for files
1786@code{ange-ftp-make-backup-files} to @code{nil}. 1742accessed via FTP by default. To make it do so, change the variable
1743@code{ange-ftp-make-backup-files} to a non-@code{nil} value.
1787 1744
1788 By default, the auto-save files (@pxref{Auto Save Files}) for remote 1745 By default, auto-save files for remote files are made in the
1789files are made in the temporary file directory on the local machine. 1746temporary file directory on the local machine, as specified by the
1790This is achieved using the variable @code{auto-save-file-name-transforms}. 1747variable @code{auto-save-file-name-transforms}. @xref{Auto Save
1791 1748Files}.
1792@cindex ange-ftp
1793@vindex ange-ftp-default-user
1794@cindex user name for remote file access
1795 Normally, if you do not specify a user name in a remote file name,
1796that means to use your own user name. But if you set the variable
1797@code{ange-ftp-default-user} to a string, that string is used instead.
1798 1749
1799@cindex anonymous FTP 1750@cindex anonymous FTP
1800@vindex ange-ftp-generate-anonymous-password 1751@vindex ange-ftp-generate-anonymous-password
@@ -1950,10 +1901,10 @@ images as thumbnails.
1950@findex filesets-init 1901@findex filesets-init
1951 If you regularly edit a certain group of files, you can define them 1902 If you regularly edit a certain group of files, you can define them
1952as a @dfn{fileset}. This lets you perform certain operations, such as 1903as a @dfn{fileset}. This lets you perform certain operations, such as
1953visiting, @code{query-replace}, and shell commands on all the files 1904visiting, @code{query-replace}, and shell commands on all the files at
1954at once. To make use of filesets, you must first add the expression 1905once. To make use of filesets, you must first add the expression
1955@code{(filesets-init)} to your @file{.emacs} file (@pxref{Init File}). 1906@code{(filesets-init)} to your init file (@pxref{Init File}). This
1956This adds a @samp{Filesets} menu to the menu bar. 1907adds a @samp{Filesets} menu to the menu bar.
1957 1908
1958@findex filesets-add-buffer 1909@findex filesets-add-buffer
1959@findex filesets-remove-buffer 1910@findex filesets-remove-buffer
@@ -1980,7 +1931,7 @@ files in a fileset, and @kbd{M-x filesets-close} to close them. Use
1980a fileset. These commands are also available from the @samp{Filesets} 1931a fileset. These commands are also available from the @samp{Filesets}
1981menu, where each existing fileset is represented by a submenu. 1932menu, where each existing fileset is represented by a submenu.
1982 1933
1983 Emacs uses the concept of a fileset elsewhere @pxref{Version 1934 @xref{Version Control}, for a different concept of ``filesets'':
1984Control} to describe sets of files to be treated as a group for 1935groups of files bundled together for version control operations.
1985purposes of version control operations. Those filesets are unnamed 1936Filesets of that type are unnamed, and do not persist across Emacs
1986and do not persist across Emacs sessions. 1937sessions.
diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi
index 7a605100796..bae78d94744 100644
--- a/doc/emacs/fixit.texi
+++ b/doc/emacs/fixit.texi
@@ -7,17 +7,14 @@
7@cindex typos, fixing 7@cindex typos, fixing
8@cindex mistakes, correcting 8@cindex mistakes, correcting
9 9
10 In this chapter we describe the commands that are especially useful 10 In this chapter we describe commands that are useful when you catch
11when you catch a mistake in your text after you have made it, or 11a mistake while editing. The most fundamental command for correcting
12change your mind while composing text on the fly. 12erroneous editing is the undo command @kbd{C-/} (which is also bound
13 13to @kbd{C-x u} and @kbd{C-_}). This undoes a single command, or a
14 The most fundamental command for correcting erroneous editing is the 14part of a command (as in the case of @code{query-replace}), or several
15undo command @kbd{C-/} (which is also bound to @kbd{C-x u} and 15consecutive character insertions. Consecutive repetitions of
16@kbd{C-_}). This undoes a single command, or a part of a command (as 16@kbd{C-/} undo earlier and earlier changes, back to the limit of the
17in the case of @code{query-replace}), or several consecutive 17undo information available.
18self-inserting characters. Consecutive repetitions of @kbd{C-/} undo
19earlier and earlier changes, back to the limit of the undo information
20available.
21 18
22 Aside from the commands described here, you can erase text using 19 Aside from the commands described here, you can erase text using
23deletion commands such as @key{DEL} (@code{delete-backward-char}). 20deletion commands such as @key{DEL} (@code{delete-backward-char}).
@@ -231,18 +228,19 @@ case-convert it and go on typing. @xref{Case}.@refill
231 This section describes the commands to check the spelling of a 228 This section describes the commands to check the spelling of a
232single word or of a portion of a buffer. These commands only work if 229single word or of a portion of a buffer. These commands only work if
233the spelling checker program Aspell, Ispell or Hunspell is installed. 230the spelling checker program Aspell, Ispell or Hunspell is installed.
234Aspell, Ispell or Hunspell are not part of Emacs, but one or the other 231These programs are not part of Emacs, but one of them is usually
235is usually installed in GNU/Linux and other free operating systems. 232installed in GNU/Linux and other free operating systems.
236@ifnottex 233@ifnottex
237@xref{Top, Aspell,, aspell, The Aspell Manual}. 234@xref{Top, Aspell,, aspell, The Aspell Manual}.
238@end ifnottex 235@end ifnottex
239 236
240@table @kbd 237@table @kbd
241@item M-$ 238@item M-$
242Check and correct spelling of the active region or the word at point 239Check and correct spelling of the word at point (@code{ispell-word}).
243(@code{ispell-word}). 240If the region is active, do it for all words in the region instead.
244@item M-x ispell 241@item M-x ispell
245Check and correct spelling in the active region or the entire buffer. 242Check and correct spelling of all words in the buffer. If the region
243is active, do it for all words in the region instead.
246@item M-x ispell-buffer 244@item M-x ispell-buffer
247Check and correct spelling in the buffer. 245Check and correct spelling in the buffer.
248@item M-x ispell-region 246@item M-x ispell-region
@@ -355,14 +353,13 @@ Show the list of options.
355@end table 353@end table
356 354
357@findex ispell-complete-word 355@findex ispell-complete-word
358 In Text mode and related modes, the command @kbd{M-@key{TAB}} 356 In Text mode and related modes, @kbd{M-@key{TAB}}
359(@code{ispell-complete-word}) shows a list of completions based on 357(@code{ispell-complete-word}) performs in-buffer completion based on
360spelling correction. Insert the beginning of a word, and then type 358spelling correction. Insert the beginning of a word, and then type
361@kbd{M-@key{TAB}}; the command displays a completion list window. (If 359@kbd{M-@key{TAB}}; this shows shows a list of completions. (If your
362your window manager intercepts @kbd{M-@key{TAB}}, type @kbd{@key{ESC} 360window manager intercepts @kbd{M-@key{TAB}}, type @kbd{@key{ESC}
363@key{TAB}} or @kbd{C-M-i}.) To choose one of the completions listed, 361@key{TAB}} or @kbd{C-M-i}.) Each completion is listed with a digit or
364click @kbd{Mouse-2} or @kbd{Mouse-1} fast on it, or move the cursor 362character; type that digit or character to choose it.
365there in the completions window and type @key{RET}. @xref{Text Mode}.
366 363
367@cindex @code{ispell} program 364@cindex @code{ispell} program
368@findex ispell-kill-ispell 365@findex ispell-kill-ispell
@@ -370,29 +367,27 @@ there in the completions window and type @key{RET}. @xref{Text Mode}.
370to run, waiting for something to do, so that subsequent spell checking 367to run, waiting for something to do, so that subsequent spell checking
371commands complete more quickly. If you want to get rid of the 368commands complete more quickly. If you want to get rid of the
372process, use @kbd{M-x ispell-kill-ispell}. This is not usually 369process, use @kbd{M-x ispell-kill-ispell}. This is not usually
373necessary, since the process uses no time except when you do spelling 370necessary, since the process uses no processor time except when you do
374correction. 371spelling correction.
375 372
376@vindex ispell-dictionary 373@vindex ispell-dictionary
377@vindex ispell-local-dictionary 374@vindex ispell-local-dictionary
378@vindex ispell-personal-dictionary 375@vindex ispell-personal-dictionary
379@vindex ispell-complete-word-dict 376@findex ispell-change-dictionary
380 Ispell, Aspell and Hunspell use two dictionaries together for spell checking: 377 Ispell, Aspell and Hunspell look up spelling in two dictionaries:
381the standard dictionary and your private dictionary. The standard 378the standard dictionary and your personal dictionary. The standard
382dictionary is specified by @code{ispell-local-dictionary} or, 379dictionary is specified by the variable @code{ispell-local-dictionary}
383if @code{nil}, by @code{ispell-dictionary}. If both are @code{nil} 380or, if that is @code{nil}, by the variable @code{ispell-dictionary}.
384the default dictionary is selected. The command 381If both are @code{nil}, the spelling program's default dictionary is
385@kbd{M-x ispell-change-dictionary} sets the standard dictionary for 382used. The command @kbd{M-x ispell-change-dictionary} sets the
386the buffer and then restarts the subprocess, so that it will use a 383standard dictionary for the buffer and then restarts the subprocess,
387different standard dictionary. Personal dictionary is specified by 384so that it will use a different standard dictionary. Your personal
388@code{ispell-personal-dictionary}. If @code{nil}, default value is 385dictionary is specified by the variable
389used. 386@code{ispell-personal-dictionary}. If that is @code{nil}, the
390 387spelling program looks for a personal dictionary in a default
391 Set variable @code{ispell-dictionary} to select a specific default 388location.
392dictionary for all your documents. Set variable
393@code{ispell-local-dictionary} in the local variables section to
394select a specific dictionary for a given document.
395 389
390@vindex ispell-complete-word-dict
396 A separate dictionary is used for word completion. The variable 391 A separate dictionary is used for word completion. The variable
397@code{ispell-complete-word-dict} specifies the file name of this 392@code{ispell-complete-word-dict} specifies the file name of this
398dictionary. The completion dictionary must be different because it 393dictionary. The completion dictionary must be different because it
@@ -400,16 +395,14 @@ cannot use root and affix information. For some languages, there
400is a spell checking dictionary but no word completion dictionary. 395is a spell checking dictionary but no word completion dictionary.
401 396
402@cindex Flyspell mode 397@cindex Flyspell mode
398@cindex mode, Flyspell
403@findex flyspell-mode 399@findex flyspell-mode
404@findex turn-on-flyspell 400 Flyspell mode is a minor mode that performs automatic spell checking
405 Flyspell mode is a fully-automatic way to check spelling as you edit 401as you type. When it finds a word that it does not recognize, it
406in Emacs. It operates by checking words as you change or insert them. 402highlights that word. Type @kbd{M-x flyspell-mode} to toggle Flyspell
407When it finds a word that it does not recognize, it highlights that 403mode in the current buffer. To enable Flyspell mode in all text mode
408word. This does not interfere with your editing, but when you see the 404buffers, add @code{flyspell-mode} to @code{text-mode-hook}.
409highlighted word, you can move to it and fix it. Type @kbd{M-x 405@xref{Hooks}.
410flyspell-mode} to enable or disable this mode in the current buffer.
411To enable Flyspell mode in all text mode buffers, add
412@code{turn-on-flyspell} to @code{text-mode-hook}.
413 406
414 When Flyspell mode highlights a word as misspelled, you can click on 407 When Flyspell mode highlights a word as misspelled, you can click on
415it with @kbd{Mouse-2} to display a menu of possible corrections and 408it with @kbd{Mouse-2} to display a menu of possible corrections and
diff --git a/doc/emacs/fortran-xtra.texi b/doc/emacs/fortran-xtra.texi
index ee417624120..e5853a17dd0 100644
--- a/doc/emacs/fortran-xtra.texi
+++ b/doc/emacs/fortran-xtra.texi
@@ -479,7 +479,7 @@ variable @code{fortran-break-before-delimiters} is @code{nil}.
479Otherwise (and by default), the break comes before the delimiter. 479Otherwise (and by default), the break comes before the delimiter.
480 480
481 To enable Auto Fill in all Fortran buffers, add 481 To enable Auto Fill in all Fortran buffers, add
482@code{turn-on-auto-fill} to @code{fortran-mode-hook}. 482@code{auto-fill-mode} to @code{fortran-mode-hook}.
483@iftex 483@iftex
484@xref{Hooks,,, emacs, the Emacs Manual}. 484@xref{Hooks,,, emacs, the Emacs Manual}.
485@end iftex 485@end iftex
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index 4c239d364f0..49222451cce 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -956,55 +956,43 @@ Parameters,,, elisp, The Emacs Lisp Reference Manual}.
956@cindex Scroll Bar mode 956@cindex Scroll Bar mode
957@cindex mode, Scroll Bar 957@cindex mode, Scroll Bar
958 958
959 On graphical displays, Emacs normally makes a @dfn{scroll bar} at 959 On graphical displays, there is a @dfn{scroll bar} on the side of
960the left of each Emacs window, running the height of the 960each Emacs window. Clicking @kbd{Mouse-1} on the scroll bar's up and
961window.@footnote{Placing it at the left is usually more useful with 961down buttons scrolls the window by one line at a time. Clicking
962overlapping frames with text starting at the left margin.} 962@kbd{Mouse-1} above or below the scroll bar's inner box scrolls the
963 963window by nearly the entire height of the window, like @kbd{M-v} and
964 When Emacs is compiled with GTK+ support on the X Window System, or 964@kbd{C-v} respectively (@pxref{Moving Point}). Dragging the inner box
965in operating systems such as Microsoft Windows or Mac OS, you can use 965scrolls continuously.
966the scroll bar as you do in other graphical applications. If you 966
967click @kbd{Mouse-1} on the scroll bar's up and down buttons, that 967 If Emacs is compiled on the X Window System without X toolkit
968scrolls the window by one line at a time. Clicking @kbd{Mouse-1} 968support, the scroll bar behaves differently. Clicking @kbd{Mouse-1}
969above or below the scroll bar's inner box scrolls the window by nearly 969anywhere on the scroll bar scrolls forward like @kbd{C-v}, while
970the entire height of the window, like @kbd{M-v} and @kbd{C-v} 970@kbd{Mouse-3} scrolls backward like @kbd{M-v}. Clicking @kbd{Mouse-2}
971respectively (@pxref{Moving Point}). Dragging the inner box with 971in the scroll bar lets you drag the inner box up and down.
972@kbd{Mouse-1} scrolls the window continuously.
973
974 If Emacs is compiled without GTK+ support on the X Window System,
975the scroll bar behaves differently. The scroll bar's inner box is
976drawn to represent the portion of the buffer currently displayed, with
977the entire height of the scroll bar representing the entire length of
978the buffer. @kbd{Mouse-1} anywhere on the scroll bar scrolls forward
979like @kbd{C-v}, and @kbd{Mouse-3} scrolls backward like @kbd{M-v}.
980Clicking @kbd{Mouse-2} in the scroll bar lets you move or drag the
981inner box up and down.
982
983 You can also click @kbd{C-Mouse-2} in the scroll bar to split a
984window vertically. The split occurs on the line where you click.
985 972
986@findex scroll-bar-mode 973@findex scroll-bar-mode
987@vindex scroll-bar-mode
988 You can toggle the use of the scroll bar with the command @kbd{M-x
989scroll-bar-mode}. With a prefix argument, this command turns use of
990scroll bars on if and only if the argument is positive. This command
991applies to all frames, including frames yet to be created. Customize
992the variable @code{scroll-bar-mode} to control the use of scroll bars
993at startup. You can use it to specify that they are placed at the
994right of windows if you prefer that. You have to set this variable
995through the @samp{Customize} interface (@pxref{Easy Customization}),
996or it will not work properly. You can also use the X resource
997@samp{verticalScrollBars} to control the initial setting of Scroll Bar
998mode. @xref{Resources}.
999
1000@findex toggle-scroll-bar 974@findex toggle-scroll-bar
1001 To enable or disable scroll bars for just the selected frame, use the 975 To toggle the use of scroll bars, type @kbd{M-x scroll-bar-mode}.
976This command applies to all frames, including frames yet to be
977created. To toggle scroll bars for just the selected frame, use the
1002command @kbd{M-x toggle-scroll-bar}. 978command @kbd{M-x toggle-scroll-bar}.
1003 979
980@vindex scroll-bar-mode
981 To control the use of scroll bars at startup, customize the variable
982@code{scroll-bar-mode}. Its value should be either @code{right} (put
983scroll bars on the right side of windows), @code{left} (put them on
984the left), or @code{nil} (disable scroll bars). By default, Emacs
985puts scroll bars on the right if it was compiled with GTK+ support on
986the X Window System, and on MS-Windows or Mac OS; Emacs puts scroll
987bars on the left if compiled on the X Window system without GTK+
988support (following the old convention for X applications).
989
1004@vindex scroll-bar-width 990@vindex scroll-bar-width
1005@cindex width of the scroll bar 991@cindex width of the scroll bar
1006 You can control the scroll bar width by changing the value of the 992 You can also use the X resource @samp{verticalScrollBars} to enable
1007@code{scroll-bar-width} frame parameter. 993or disable the scroll bars (@pxref{Resources}). To control the scroll
994bar width, change the @code{scroll-bar-width} frame parameter
995(@pxref{Frame Parameters,,, elisp, The Emacs Lisp Reference Manual}).
1008 996
1009@node Wheeled Mice 997@node Wheeled Mice
1010@section Scrolling With ``Wheeled'' Mice 998@section Scrolling With ``Wheeled'' Mice
@@ -1082,36 +1070,33 @@ menus' visual appearance.
1082@cindex mode, Tool Bar 1070@cindex mode, Tool Bar
1083@cindex icons, toolbar 1071@cindex icons, toolbar
1084 1072
1085 The @dfn{tool bar} is a line (or lines) of icons at the top of the 1073 On graphical displays, Emacs puts a @dfn{tool bar} at the top of
1086Emacs window, just below the menu bar. You can click on these icons 1074each frame, just below the menu bar. This is a row of icons which you
1087with the mouse to do various jobs. 1075can click on with the mouse to invoke various commands.
1088
1089 The global tool bar contains general commands. Some major modes
1090define their own tool bars to replace it. A few ``special'' modes
1091that are not designed for ordinary editing remove some items from the
1092global tool bar.
1093 1076
1094 Tool bars work only on a graphical display. The tool bar uses colored 1077 The global (default) tool bar contains general commands. Some major
1095XPM icons if Emacs was built with XPM support. Otherwise, the tool 1078modes define their own tool bars; whenever a buffer with such a major
1096bar uses monochrome icons (PBM or XBM format). 1079mode is current, the mode's tool bar replaces the global tool bar.
1097 1080
1098@findex tool-bar-mode 1081@findex tool-bar-mode
1099@vindex tool-bar-mode 1082@vindex tool-bar-mode
1100 You can turn display of tool bars on or off with @kbd{M-x 1083 To toggle the use of tool bars, type @kbd{M-x tool-bar-mode}. This
1101tool-bar-mode} or by customizing the option @code{tool-bar-mode}. 1084command applies to all frames, including frames yet to be created. To
1085control the use of tool bars at startup, customize the variable
1086@code{tool-bar-mode}.
1102 1087
1103@vindex tool-bar-style 1088@vindex tool-bar-style
1104@cindex Tool Bar style 1089@cindex Tool Bar style
1105 When Emacs is compiled with GTK+ support, tool bars can have text and images. 1090 When Emacs is compiled with GTK+ support, each tool bar item can
1106Customize @code{tool-bar-style} to select style. The default style is 1091consist of an image, or a text label, or both. By default, Emacs
1107the same as for the desktop in the Gnome case. If no default is found, 1092follows the Gnome desktop's tool bar style setting; if none is
1108the tool bar uses just images. 1093defined, it displays tool bar items as just images. To impose a
1094specific tool bar style, customize the variable @code{tool-bar-style}.
1109 1095
1110@cindex Tool Bar position 1096@cindex Tool Bar position
1111 You can also control the placement of the tool bar for the GTK+ tool bar 1097 You can also control the placement of the tool bar for the GTK+ tool
1112with the frame parameter @code{tool-bar-position}. 1098bar with the frame parameter @code{tool-bar-position}. @xref{Frame
1113For a detailed description of frame parameters and customization, 1099Parameters,,, elisp, The Emacs Lisp Reference Manual}.
1114see @ref{Frame Parameters,,, elisp, The Emacs Lisp Reference Manual}.
1115 1100
1116@node Dialog Boxes 1101@node Dialog Boxes
1117@section Using Dialog Boxes 1102@section Using Dialog Boxes
@@ -1186,11 +1171,11 @@ options for displaying tooltips, use @kbd{M-x customize-group
1186customizing the windows that display tooltips. 1171customizing the windows that display tooltips.
1187 1172
1188@vindex x-gtk-use-system-tooltips 1173@vindex x-gtk-use-system-tooltips
1189 If Emacs is built with GTK support, it displays tooltips via GTK, 1174 If Emacs is built with GTK+ support, it displays tooltips via GTK+,
1190using the default appearance of GTK tooltips. To disable this, change 1175using the default appearance of GTK+ tooltips. To disable this,
1191the variable @code{x-gtk-use-system-tooltips} to @code{nil}. If you 1176change the variable @code{x-gtk-use-system-tooltips} to @code{nil}.
1192do this, or if Emacs is built without GTK support, the @code{tooltip} 1177If you do this, or if Emacs is built without GTK+ support, the
1193face specifies most attributes of the tooltip text. 1178@code{tooltip} face specifies most attributes of the tooltip text.
1194 1179
1195@node Mouse Avoidance 1180@node Mouse Avoidance
1196@section Mouse Avoidance 1181@section Mouse Avoidance
diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi
index a85edf101e5..c024d428511 100644
--- a/doc/emacs/help.texi
+++ b/doc/emacs/help.texi
@@ -70,7 +70,7 @@ meanings for it, but they all support @key{F1} for help.)
70* Package Keywords:: Finding Lisp libraries by keywords (topics). 70* Package Keywords:: Finding Lisp libraries by keywords (topics).
71* Language Help:: Help relating to international language support. 71* Language Help:: Help relating to international language support.
72* Misc Help:: Other help commands. 72* Misc Help:: Other help commands.
73* Help Files:: Commands to display auxilliary help files. 73* Help Files:: Commands to display auxiliary help files.
74* Help Echo:: Help on active text and tooltips (`balloon help'). 74* Help Echo:: Help on active text and tooltips (`balloon help').
75@end menu 75@end menu
76 76
diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi
index 8689e9c8324..6237b00c2ee 100644
--- a/doc/emacs/killing.texi
+++ b/doc/emacs/killing.texi
@@ -736,7 +736,7 @@ insert rectangles, and commands to make blank rectangles.
736k} (@code{kill-rectangle}) to remove the text and and save it as the 736k} (@code{kill-rectangle}) to remove the text and and save it as the
737@dfn{last killed rectangle}. In both cases, erasing the 737@dfn{last killed rectangle}. In both cases, erasing the
738region-rectangle is like erasing the specified text on each line of 738region-rectangle is like erasing the specified text on each line of
739the rectange; if there is any following text on the line, it moves 739the rectangle; if there is any following text on the line, it moves
740backwards to fill the gap. 740backwards to fill the gap.
741 741
742 ``Killing'' a rectangle is not killing in the usual sense; the 742 ``Killing'' a rectangle is not killing in the usual sense; the
diff --git a/doc/emacs/kmacro.texi b/doc/emacs/kmacro.texi
index ac81377aec9..4676983fc67 100644
--- a/doc/emacs/kmacro.texi
+++ b/doc/emacs/kmacro.texi
@@ -147,7 +147,7 @@ beginning of the line and then executing the macro.
147@findex kmacro-start-macro 147@findex kmacro-start-macro
148@findex kmacro-end-macro 148@findex kmacro-end-macro
149 In addition to the @key{F3} and @key{F4} commands described above, 149 In addition to the @key{F3} and @key{F4} commands described above,
150Emacs also supports an older set of keybindings for defining and 150Emacs also supports an older set of key bindings for defining and
151executing keyboard macros. To begin a macro definition, type @kbd{C-x 151executing keyboard macros. To begin a macro definition, type @kbd{C-x
152(} (@code{kmacro-start-macro}); as with @key{F3}, a prefix argument 152(} (@code{kmacro-start-macro}); as with @key{F3}, a prefix argument
153appends this definition to the last keyboard macro. To end a macro 153appends this definition to the last keyboard macro. To end a macro
diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi
index f4a5a2858cf..5a97fa8460b 100644
--- a/doc/emacs/macos.texi
+++ b/doc/emacs/macos.texi
@@ -36,7 +36,7 @@ Support}), but we hope to improve it in the future.
36 36
37 By default, the @key{alt} and @key{option} keys are the same as 37 By default, the @key{alt} and @key{option} keys are the same as
38@key{Meta}. The Mac @key{Cmd} key is the same as @key{Super}, and 38@key{Meta}. The Mac @key{Cmd} key is the same as @key{Super}, and
39Emacs provides a set of keybindings using this modifier key that mimic 39Emacs provides a set of key bindings using this modifier key that mimic
40other Mac / GNUstep applications (@pxref{Mac / GNUstep Events}). You 40other Mac / GNUstep applications (@pxref{Mac / GNUstep Events}). You
41can change these bindings in the usual way (@pxref{Key Bindings}). 41can change these bindings in the usual way (@pxref{Key Bindings}).
42 42
diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi
index e84b4c9f080..bbe42551345 100644
--- a/doc/emacs/mini.texi
+++ b/doc/emacs/mini.texi
@@ -219,11 +219,11 @@ is sometimes available in ordinary buffers too. @xref{Symbol
219Completion}. 219Completion}.
220 220
221@menu 221@menu
222* Example: Completion Example. Examples of using completion. 222* Completion Example:: Examples of using completion.
223* Commands: Completion Commands. A list of completion commands. 223* Completion Commands:: A list of completion commands.
224* Strict Completion:: Different types of completion. 224* Completion Exit:: Completion and minibuffer text submission.
225* Completion Styles:: How completion matches are chosen. 225* Completion Styles:: How completion matches are chosen.
226* Options: Completion Options. Options for completion. 226* Completion Options:: Options for completion.
227@end menu 227@end menu
228 228
229@node Completion Example 229@node Completion Example
@@ -274,7 +274,7 @@ Complete up to one word from the minibuffer text before point
274arguments that often include spaces, such as file names. 274arguments that often include spaces, such as file names.
275@item @key{RET} 275@item @key{RET}
276Submit the text in the minibuffer as the argument, possibly completing 276Submit the text in the minibuffer as the argument, possibly completing
277first (@code{minibuffer-complete-and-exit}). @xref{Strict Completion}. 277first (@code{minibuffer-complete-and-exit}). @xref{Completion Exit}.
278@item ? 278@item ?
279Display a list of completions (@code{minibuffer-completion-help}). 279Display a list of completions (@code{minibuffer-completion-help}).
280@end table 280@end table
@@ -337,42 +337,68 @@ While in the completion list buffer, this moves point to the previous
337completion alternative (@code{previous-completion}). 337completion alternative (@code{previous-completion}).
338@end table 338@end table
339 339
340@node Strict Completion 340@node Completion Exit
341@subsection Strict Completion 341@subsection Completion Exit
342 342
343 There are three ways that the @key{RET} 343@kindex RET @r{(completion in minibuffer)}
344(@code{minibuffer-complete-and-exit}) completion command can act, 344@findex minibuffer-complete-and-exit
345depending on how the argument will be used. 345 When a command reads an argument using the minibuffer with
346completion, it also controls what happens when you type @key{RET}
347(@code{minibuffer-complete-and-exit}) to submit the argument. There
348are four types of behavior:
346 349
347@itemize @bullet 350@itemize @bullet
348@item 351@item
349@dfn{Strict} completion accepts only known completion candidates. For 352@dfn{Strict completion} accepts only exact completion matches. Typing
350example, when @kbd{C-x k} reads the name of a buffer to kill, only the 353@key{RET} exits the minibuffer only if the minibuffer text is an exact
351name of an existing buffer makes sense. In strict completion, 354match, or completes to one. Otherwise, Emacs refuses to exit the
352@key{RET} refuses to exit if the text in the minibuffer does not 355minibuffer; instead it tries to complete, and if no completion can be
353complete to an exact match. 356done it momentarily displays @samp{[No match]} after the minibuffer
357text. (You can still leave the minibuffer by typing @kbd{C-g} to
358cancel the command.)
359
360An example of a command that uses this behavior is @kbd{M-x}, since it
361is meaningless for it to accept a non-existent command name.
354 362
355@item 363@item
356@dfn{Cautious} completion is similar to strict completion, except that 364@dfn{Cautious completion} is like strict completion, except @key{RET}
357@key{RET} exits only if the text is an already exact match. 365exits only if the text is already an exact match. If the text
358Otherwise, @key{RET} does not exit, but it does complete the text. If 366completes to an exact match, @key{RET} performs that completion but
359that completes to an exact match, a second @key{RET} will exit. 367does not exit yet; you must type a second @key{RET} to exit.
360 368
361Cautious completion is used for reading file names for files that must 369Cautious completion is used for reading file names for files that must
362already exist, for example. 370already exist, for example.
363 371
364@item 372@item
365@dfn{Permissive} completion allows any input; the completion 373@dfn{Permissive completion} allows any input; the completion
366candidates are just suggestions. For example, when @kbd{C-x C-f} 374candidates are just suggestions. Typing @key{RET} does not complete,
367reads the name of a file to visit, any file name is allowed, including 375it just submits the argument as you have entered it.
368nonexistent file (in case you want to create a file). In permissive
369completion, @key{RET} does not complete, it just submits the argument
370as you have entered it.
371@end itemize
372 376
373 Like the other completion commands, @key{RET} displays a list of all 377@cindex minibuffer confirmation
374possible completions whenever it is supposed to complete but is unable 378@cindex confirming in the minibuffer
375to complete any further. 379@item
380@dfn{Permissive completion with confirmation} is like permissive
381completion, with an exception: if you typed @key{TAB} and this
382completed the text up to some intermediate state (i.e. one that is not
383yet an exact completion match), typing @key{RET} right afterward does
384not submit the argument. Instead, Emacs asks for confirmation by
385momentarily displaying @samp{[Confirm]} after the text; type @key{RET}
386again to confirm and submit the text. This catches a common mistake,
387in which one types @key{RET} before realizing that @key{TAB} did not
388complete as far as desired.
389
390@vindex confirm-nonexistent-file-or-buffer
391You can tweak the confirmation behavior by customizing the variable
392@code{confirm-nonexistent-file-or-buffer}. The default value,
393@code{after-completion}, gives the behavior we have just described.
394If you change it to @code{nil}, Emacs does not ask for confirmation,
395falling back on permissive completion. If you change it to any other
396non-@code{nil} value, Emacs asks for confirmation whether or not the
397preceding command was @key{TAB}.
398
399This behavior is used by most commands that read file names, like
400@kbd{C-x C-f}, and commands that read buffer names, like @kbd{C-x b}.
401@end itemize
376 402
377@node Completion Styles 403@node Completion Styles
378@subsection How Completion Alternatives Are Chosen 404@subsection How Completion Alternatives Are Chosen
diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi
index 5745dd7c66c..2357902341e 100644
--- a/doc/emacs/programs.texi
+++ b/doc/emacs/programs.texi
@@ -1441,7 +1441,7 @@ parsed, and move point there (@code{semantic-complete-jump}).
1441@kindex C-c , @key{SPC} 1441@kindex C-c , @key{SPC}
1442Display a list of possible completions for the symbol at point 1442Display a list of possible completions for the symbol at point
1443(@code{semantic-complete-analyze-inline}). This also activates a set 1443(@code{semantic-complete-analyze-inline}). This also activates a set
1444of special keybindings for choosing a completion: @key{RET} accepts 1444of special key bindings for choosing a completion: @key{RET} accepts
1445the current completion, @kbd{M-n} and @kbd{M-p} cycle through possible 1445the current completion, @kbd{M-n} and @kbd{M-p} cycle through possible
1446completions, @key{TAB} completes as far as possible and then cycles, 1446completions, @key{TAB} completes as far as possible and then cycles,
1447and @kbd{C-g} or any other key aborts completion. 1447and @kbd{C-g} or any other key aborts completion.
diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi
index b894d01b9bb..71c23655608 100644
--- a/doc/emacs/rmail.texi
+++ b/doc/emacs/rmail.texi
@@ -1198,7 +1198,7 @@ Address mode:
1198 1198
1199@c FIXME goto-addr.el commentary says to use goto-address instead. 1199@c FIXME goto-addr.el commentary says to use goto-address instead.
1200@smallexample 1200@smallexample
1201(add-hook 'rmail-show-message-hook (lambda () (goto-address-mode 1))) 1201(add-hook 'rmail-show-message-hook 'goto-address-mode)
1202@end smallexample 1202@end smallexample
1203 1203
1204@noindent 1204@noindent
@@ -1242,11 +1242,12 @@ coding system, the result should be readable.
1242@node Rmail Editing 1242@node Rmail Editing
1243@section Editing Within a Message 1243@section Editing Within a Message
1244 1244
1245 Most of the usual Emacs keybindings are available in Rmail mode, though a 1245 Most of the usual Emacs key bindings are available in Rmail mode,
1246few, such as @kbd{C-M-n} and @kbd{C-M-h}, are redefined by Rmail for 1246though a few, such as @kbd{C-M-n} and @kbd{C-M-h}, are redefined by
1247other purposes. However, the Rmail buffer is normally read only, and 1247Rmail for other purposes. However, the Rmail buffer is normally read
1248most of the letters are redefined as Rmail commands. If you want to 1248only, and most of the letters are redefined as Rmail commands. If you
1249edit the text of a message, you must use the Rmail command @kbd{e}. 1249want to edit the text of a message, you must use the Rmail command
1250@kbd{e}.
1250 1251
1251@table @kbd 1252@table @kbd
1252@item e 1253@item e
diff --git a/doc/emacs/screen.texi b/doc/emacs/screen.texi
index 14d4c678085..fcc31e30988 100644
--- a/doc/emacs/screen.texi
+++ b/doc/emacs/screen.texi
@@ -189,7 +189,7 @@ is sometimes useful to have this information.
189 189
190 @var{cs} describes the character set of the text in the buffer 190 @var{cs} describes the character set of the text in the buffer
191(@pxref{Coding Systems}). If it is a dash (@samp{-}), that indicates 191(@pxref{Coding Systems}). If it is a dash (@samp{-}), that indicates
192no special character set handling (with the possible expection of 192no special character set handling (with the possible exception of
193end-of-line conventions, described in the next paragraph). @samp{=} 193end-of-line conventions, described in the next paragraph). @samp{=}
194means no conversion whatsoever, and is usually used for files 194means no conversion whatsoever, and is usually used for files
195containing non-textual data. Other characters represent various 195containing non-textual data. Other characters represent various
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index caf03291fbc..a8bd1cdf18d 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -60,7 +60,6 @@ Incremental search backward (@code{isearch-backward}).
60 or else edit the search string. 60 or else edit the search string.
61* Isearch Scroll:: Scrolling during an incremental search. 61* Isearch Scroll:: Scrolling during an incremental search.
62* Isearch Minibuffer:: Incremental search of the minibuffer history. 62* Isearch Minibuffer:: Incremental search of the minibuffer history.
63* Slow Isearch:: Incremental search features for slow terminals.
64@end menu 63@end menu
65 64
66@node Basic Isearch 65@node Basic Isearch
@@ -167,23 +166,27 @@ going past the original starting point of the search, it changes to
167you have already seen. 166you have already seen.
168 167
169@cindex search ring 168@cindex search ring
169@kindex M-n @r{(Incremental search)}
170@kindex M-p @r{(Incremental search)}
170 To reuse earlier search strings, use the @dfn{search ring}. The 171 To reuse earlier search strings, use the @dfn{search ring}. The
171commands @kbd{M-p} and @kbd{M-n} move through the ring to pick a 172commands @kbd{M-p} and @kbd{M-n} move through the ring to pick a
172search string to reuse. These commands leave the selected search ring 173search string to reuse. These commands leave the selected search ring
173element in the minibuffer, where you can edit it. To edit the current 174element in the minibuffer, where you can edit it.
174search string in the minibuffer without replacing it with items from 175
175the search ring, type @kbd{M-e}. Type @kbd{C-s} or @kbd{C-r} to 176@kindex M-e @r{(Incremental search)}
176terminate editing the string and search for it. 177 To edit the current search string in the minibuffer without
178replacing it with items from the search ring, type @kbd{M-e}. Type
179@kbd{C-s} or @kbd{C-r} to finish editing the string and search for it.
177 180
178@node Error in Isearch 181@node Error in Isearch
179@subsection Errors in Incremental Search 182@subsection Errors in Incremental Search
180 183
181 If your string is not found at all, the echo area says @samp{Failing 184 If your string is not found at all, the echo area says @samp{Failing
182I-Search}. The cursor is after the place where Emacs found as much of 185I-Search}, and the cursor moves past the place where Emacs found as
183your string as it could. Thus, if you search for @samp{FOOT}, and 186much of your string as it could. Thus, if you search for @samp{FOOT},
184there is no @samp{FOOT}, you might see the cursor after the @samp{FOO} 187and there is no @samp{FOOT}, you might see the cursor after the
185in @samp{FOOL}. In the echo area, the part of the search string that 188@samp{FOO} in @samp{FOOL}. In the echo area, the part of the search
186failed to match is highlighted using the customizable face 189string that failed to match is highlighted using the face
187@code{isearch-fail}. 190@code{isearch-fail}.
188 191
189 At this point, there are several things you can do. If your string 192 At this point, there are several things you can do. If your string
@@ -196,6 +199,7 @@ search string the characters that could not be found (the @samp{T} in
196entirely, returning point to where it was when the search started. 199entirely, returning point to where it was when the search started.
197 200
198@cindex quitting (in search) 201@cindex quitting (in search)
202@kindex C-g @r{(Incremental search)}
199 The quit command, @kbd{C-g}, does special things during searches; 203 The quit command, @kbd{C-g}, does special things during searches;
200just what it does depends on the status of the search. If the search 204just what it does depends on the status of the search. If the search
201has found what you specified and is waiting for input, @kbd{C-g} 205has found what you specified and is waiting for input, @kbd{C-g}
@@ -264,69 +268,77 @@ use it (@pxref{Rebinding}).
264 268
265@vindex isearch-mode-map 269@vindex isearch-mode-map
266 When incremental search is active, you can type @kbd{C-h C-h} to 270 When incremental search is active, you can type @kbd{C-h C-h} to
267access interactive help options, including a list of special 271access interactive help options, including a list of special key
268keybindings. These keybindings are part of the keymap 272bindings. These key bindings are part of the keymap
269@code{isearch-mode-map} (@pxref{Keymaps}). 273@code{isearch-mode-map} (@pxref{Keymaps}).
270 274
271@node Isearch Yank 275@node Isearch Yank
272@subsection Isearch Yanking 276@subsection Isearch Yanking
273 277
278@kindex C-y @r{(Incremental search)}
279@kindex M-y @r{(Incremental search)}
280@findex isearch-yank-kill
281@findex isearch-yank-pop
274 Within incremental search, @kbd{C-y} (@code{isearch-yank-kill}) 282 Within incremental search, @kbd{C-y} (@code{isearch-yank-kill})
275copies text from the kill ring into the search string. It uses the 283appends the current kill to the search string. @kbd{M-y}
276same text that @kbd{C-y}, outside of incremental search, would 284(@code{isearch-yank-pop}), if called after @kbd{C-y}, replaces that
277normally yank into the buffer. @kbd{Mouse-2} in the echo area does 285appended text with an earlier kill, similar to the usual @kbd{M-y}
278the same. @xref{Yanking}. 286(@code{yank-pop}) command (@pxref{Yanking}). @kbd{Mouse-2} appends
279 287the current X selection (@pxref{Primary Selection}).
280 @kbd{C-w} (@code{isearch-yank-word-or-char}) grabs the next 288
281character or word at point, and adds it to the search string. This is 289@kindex C-w @r{(Incremental search)}
282convenient for searching for another occurrence of the text at point. 290@findex isearch-yank-word-or-char
283(The decision, whether to copy a character or a word, is heuristic.) 291 @kbd{C-w} (@code{isearch-yank-word-or-char}) appends the next
284 292character or word at point to the search string. This is an easy way
285 Similarly, @kbd{M-s C-e} (@code{isearch-yank-line}) grabs the rest 293to search for another occurrence of the text at point. (The decision
286of the current line, and adds it to the search string. If point is 294of whether to copy a character or a word is heuristic.)
287already at the end of a line, it grabs the entire next line. 295
296@kindex M-s C-e @r{(Incremental search)}
297@findex isearch-yank-line
298 Similarly, @kbd{M-s C-e} (@code{isearch-yank-line}) appends the rest
299of the current line to the search string. If point is already at the
300end of a line, it appends the next line.
288 301
289 If the search is currently case-insensitive, both @kbd{C-w} and 302 If the search is currently case-insensitive, both @kbd{C-w} and
290@kbd{M-s C-e} convert the text they copy to lower case, so that the 303@kbd{M-s C-e} convert the text they copy to lower case, so that the
291search remains case-insensitive. 304search remains case-insensitive.
292 305
293 @kbd{C-M-w} and @kbd{C-M-y} modify the search string by only one 306@kindex C-M-w @r{(Incremental search)}
294character at a time: @kbd{C-M-w} deletes the last character from the 307@kindex C-M-y @r{(Incremental search)}
295search string and @kbd{C-M-y} copies the character after point to the 308@findex isearch-del-char
296end of the search string. An alternative method to add the character 309@findex isearch-yank-char
297after point into the search string is to enter the minibuffer by 310 @kbd{C-M-w} (@code{isearch-del-char}) deletes the last character
298@kbd{M-e} and to type @kbd{C-f} at the end of the search string in the 311from the search string, and @kbd{C-M-y} (@code{isearch-yank-char})
299minibuffer. 312appends the character after point to the the search string. An
313alternative method to add the character after point is to enter the
314minibuffer with @kbd{M-e} (@pxref{Repeat Isearch}) and type @kbd{C-f}
315at the end of the search string in the minibuffer.
300 316
301@node Isearch Scroll 317@node Isearch Scroll
302@subsection Scrolling During Incremental Search 318@subsection Scrolling During Incremental Search
303 319
304@vindex isearch-allow-scroll 320@vindex isearch-allow-scroll
305 You can enable the use of vertical scrolling during incremental 321 Normally, scrolling commands exit incremental search. If you change
306search (without exiting the search) by setting the customizable 322the variable @code{isearch-allow-scroll} to a non-@code{nil} value,
307variable @code{isearch-allow-scroll} to a non-@code{nil} value. This 323that enables the use of the scroll-bar, as well as keyboard scrolling
308applies to using the vertical scroll-bar and to certain keyboard 324commands like @kbd{C-v}, @kbd{M-v}, and @kbd{C-l} (@pxref{Scrolling}).
309commands such as @code{scroll-down-command}, @code{scroll-up-command} 325This applies only to calling these commands via their bound key
310and @code{recenter} (@pxref{Scrolling}). You must run these commands 326sequences---typing @kbd{M-x} will still exit the search. You can give
311via their key sequences to stay in the search---typing @kbd{M-x} will 327prefix arguments to these commands in the usual way. This feature
312terminate the search. You can give prefix arguments to these commands 328won't let you scroll the current match out of visibility, however.
313in the usual way. 329
314 330 The @code{isearch-allow-scroll} feature also affects some other
315 This feature won't let you scroll the current match out of visibility, 331commands, such as @kbd{C-x 2} (@code{split-window-vertically}) and
316however. 332@kbd{C-x ^} (@code{enlarge-window}), which don't exactly scroll but do
317 333affect where the text appears on the screen. It applies to any
318 The feature also affects some other commands, such as @kbd{C-x 2} 334command whose name has a non-@code{nil} @code{isearch-scroll}
319(@code{split-window-vertically}) and @kbd{C-x ^} 335property. So you can control which commands are affected by changing
320(@code{enlarge-window}) which don't exactly scroll but do affect where 336these properties.
321the text appears on the screen. In general, it applies to any command
322whose name has a non-@code{nil} @code{isearch-scroll} property. So you
323can control which commands are affected by changing these properties.
324 337
325 For example, to make @kbd{C-h l} usable within an incremental search 338 For example, to make @kbd{C-h l} usable within an incremental search
326in all future Emacs sessions, use @kbd{C-h c} to find what command it 339in all future Emacs sessions, use @kbd{C-h c} to find what command it
327runs. (You type @kbd{C-h c C-h l}; it says @code{view-lossage}.) 340runs (@pxref{Key Help}), which is @code{view-lossage}. Then you can
328Then you can put the following line in your @file{.emacs} file 341put the following line in your init file (@pxref{Init File}):
329(@pxref{Init File}):
330 342
331@example 343@example
332(put 'view-lossage 'isearch-scroll t) 344(put 'view-lossage 'isearch-scroll t)
@@ -359,33 +371,9 @@ wrap around, going from the last page to the first page or vice versa.
359When the current match is on a history element, that history element 371When the current match is on a history element, that history element
360is pulled into the minibuffer. If you exit the incremental search 372is pulled into the minibuffer. If you exit the incremental search
361normally (e.g. by typing @key{RET}), it remains in the minibuffer 373normally (e.g. by typing @key{RET}), it remains in the minibuffer
362afterwards. Cancelling the search, with @kbd{C-g}, restores the 374afterwards. Canceling the search, with @kbd{C-g}, restores the
363contents of the minibuffer when you began the search. 375contents of the minibuffer when you began the search.
364 376
365@node Slow Isearch
366@subsection Slow Terminal Incremental Search
367
368 Incremental search on a slow terminal uses a modified style of display
369that is designed to take less time. Instead of redisplaying the buffer at
370each place the search gets to, it creates a new single-line window and uses
371that to display the line that the search has found. The single-line window
372comes into play as soon as point moves outside of the text that is already
373on the screen.
374
375 When you terminate the search, the single-line window is removed.
376Emacs then redisplays the window in which the search was done, to show
377its new position of point.
378
379@vindex search-slow-speed
380 The slow terminal style of display is used when the terminal baud rate is
381less than or equal to the value of the variable @code{search-slow-speed},
382initially 1200. See also the discussion of the variable @code{baud-rate}
383(@pxref{baud-rate,, Customization of Display}).
384
385@vindex search-slow-window-lines
386 The number of lines to use in slow terminal search display is controlled
387by the variable @code{search-slow-window-lines}. Its normal value is 1.
388
389@node Nonincremental Search 377@node Nonincremental Search
390@section Nonincremental Search 378@section Nonincremental Search
391@cindex nonincremental search 379@cindex nonincremental search
@@ -405,18 +393,14 @@ This enters the minibuffer to read the search string; terminate the
405string with @key{RET}, and then the search takes place. If the string 393string with @key{RET}, and then the search takes place. If the string
406is not found, the search command signals an error. 394is not found, the search command signals an error.
407 395
408 When you type @kbd{C-s @key{RET}}, the @kbd{C-s} invokes incremental
409search as usual. That command is specially programmed to invoke
410nonincremental search, @code{search-forward}, if the string you
411specify is empty. (Such an empty argument would otherwise be
412useless.) @kbd{C-r @key{RET}} does likewise, for a reverse
413incremental search.
414
415@findex search-forward 396@findex search-forward
416@findex search-backward 397@findex search-backward
417 Forward and backward nonincremental searches are implemented by the 398 When you type @kbd{C-s @key{RET}}, the @kbd{C-s} invokes incremental
418commands @code{search-forward} and @code{search-backward}. These 399search as usual. That command is specially programmed to invoke the
419commands may be bound to other keys in the usual manner. 400command for nonincremental search, @code{search-forward}, if the
401string you specify is empty. (Such an empty argument would otherwise
402be useless.) @kbd{C-r @key{RET}} does likewise, invoking the command
403@code{search-backward}.
420 404
421@node Word Search 405@node Word Search
422@section Word Search 406@section Word Search
@@ -476,7 +460,7 @@ apply to the lazy highlight, which always matches whole words.
476that denotes a class of alternative strings to match. GNU Emacs 460that denotes a class of alternative strings to match. GNU Emacs
477provides both incremental and nonincremental ways to search for a 461provides both incremental and nonincremental ways to search for a
478match for a regexp. The syntax of regular expressions is explained in 462match for a regexp. The syntax of regular expressions is explained in
479the following section. 463the next section.
480 464
481@table @kbd 465@table @kbd
482@item C-M-s 466@item C-M-s
@@ -531,7 +515,7 @@ starting position. These search methods are not mirror images.
531 515
532@findex re-search-forward 516@findex re-search-forward
533@findex re-search-backward 517@findex re-search-backward
534 Nonincremental search for a regexp is done by the functions 518 Nonincremental search for a regexp is done with the commands
535@code{re-search-forward} and @code{re-search-backward}. You can 519@code{re-search-forward} and @code{re-search-backward}. You can
536invoke these with @kbd{M-x}, or by way of incremental regexp search 520invoke these with @kbd{M-x}, or by way of incremental regexp search
537with @kbd{C-M-s @key{RET}} and @kbd{C-M-r @key{RET}}. 521with @kbd{C-M-s @key{RET}} and @kbd{C-M-r @key{RET}}.
@@ -941,9 +925,9 @@ close-brackets, quotes, or parentheses, repeated zero or more times.
941 Searches in Emacs normally ignore the case of the text they are 925 Searches in Emacs normally ignore the case of the text they are
942searching through, if you specify the text in lower case. Thus, if 926searching through, if you specify the text in lower case. Thus, if
943you specify searching for @samp{foo}, then @samp{Foo} and @samp{foo} 927you specify searching for @samp{foo}, then @samp{Foo} and @samp{foo}
944are also considered a match. Regexps, and in particular character 928also match. Regexps, and in particular character sets, behave
945sets, are included: @samp{[ab]} would match @samp{a} or @samp{A} or 929likewise: @samp{[ab]} matches @samp{a} or @samp{A} or @samp{b} or
946@samp{b} or @samp{B}.@refill 930@samp{B}.@refill
947 931
948 An upper-case letter anywhere in the incremental search string makes 932 An upper-case letter anywhere in the incremental search string makes
949the search case-sensitive. Thus, searching for @samp{Foo} does not find 933the search case-sensitive. Thus, searching for @samp{Foo} does not find
@@ -985,8 +969,8 @@ command, there is @kbd{M-%} (@code{query-replace}), which presents
985each occurrence of the pattern and asks you whether to replace it. 969each occurrence of the pattern and asks you whether to replace it.
986 970
987 The replace commands normally operate on the text from point to the 971 The replace commands normally operate on the text from point to the
988end of the buffer. When the mark is active, they operate on the 972end of the buffer. When the region is active, they operate on it
989region instead (@pxref{Mark}). The basic replace commands replace one 973instead (@pxref{Mark}). The basic replace commands replace one
990@dfn{search string} (or regexp) with one @dfn{replacement string}. It 974@dfn{search string} (or regexp) with one @dfn{replacement string}. It
991is possible to perform several replacements in parallel, using the 975is possible to perform several replacements in parallel, using the
992command @code{expand-region-abbrevs} (@pxref{Expanding Abbrevs}). 976command @code{expand-region-abbrevs} (@pxref{Expanding Abbrevs}).
@@ -1023,7 +1007,7 @@ activating the mark; use @kbd{C-u C-@key{SPC}} to move back there.
1023@xref{Mark Ring}. 1007@xref{Mark Ring}.
1024 1008
1025 A prefix argument restricts replacement to matches that are 1009 A prefix argument restricts replacement to matches that are
1026surrounded by word boundaries. The argument's value doesn't matter. 1010surrounded by word boundaries.
1027 1011
1028 @xref{Replacement and Case}, for details about case-sensitivity in 1012 @xref{Replacement and Case}, for details about case-sensitivity in
1029replace commands. 1013replace commands.
@@ -1153,10 +1137,8 @@ replacement is done without case conversion.
1153 1137
1154@table @kbd 1138@table @kbd
1155@item M-% @var{string} @key{RET} @var{newstring} @key{RET} 1139@item M-% @var{string} @key{RET} @var{newstring} @key{RET}
1156@itemx M-x query-replace @key{RET} @var{string} @key{RET} @var{newstring} @key{RET}
1157Replace some occurrences of @var{string} with @var{newstring}. 1140Replace some occurrences of @var{string} with @var{newstring}.
1158@item C-M-% @var{regexp} @key{RET} @var{newstring} @key{RET} 1141@item C-M-% @var{regexp} @key{RET} @var{newstring} @key{RET}
1159@itemx M-x query-replace-regexp @key{RET} @var{regexp} @key{RET} @var{newstring} @key{RET}
1160Replace some matches for @var{regexp} with @var{newstring}. 1142Replace some matches for @var{regexp} with @var{newstring}.
1161@end table 1143@end table
1162 1144
@@ -1169,7 +1151,7 @@ occurrence and asks you whether to replace it. Aside from querying,
1169@code{query-replace} works just like @code{replace-string} 1151@code{query-replace} works just like @code{replace-string}
1170(@pxref{Unconditional Replace}). In particular, it preserves case 1152(@pxref{Unconditional Replace}). In particular, it preserves case
1171provided @code{case-replace} is non-@code{nil}, as it normally is 1153provided @code{case-replace} is non-@code{nil}, as it normally is
1172(@pxref{Replacement and Case}). A numeric argument means consider 1154(@pxref{Replacement and Case}). A numeric argument means to consider
1173only occurrences that are bounded by word-delimiter characters. 1155only occurrences that are bounded by word-delimiter characters.
1174 1156
1175@kindex C-M-% 1157@kindex C-M-%
@@ -1182,7 +1164,7 @@ like @code{query-replace}.
1182 These commands highlight the current match using the face 1164 These commands highlight the current match using the face
1183@code{query-replace}. They highlight other matches using 1165@code{query-replace}. They highlight other matches using
1184@code{lazy-highlight} just like incremental search (@pxref{Incremental 1166@code{lazy-highlight} just like incremental search (@pxref{Incremental
1185Search}). By default, @code{query-replace-regexp} will show 1167Search}). By default, @code{query-replace-regexp} will show the
1186substituted replacement string for the current match in the 1168substituted replacement string for the current match in the
1187minibuffer. If you want to keep special sequences @samp{\&} and 1169minibuffer. If you want to keep special sequences @samp{\&} and
1188@samp{\@var{n}} unexpanded, customize 1170@samp{\@var{n}} unexpanded, customize
@@ -1315,6 +1297,8 @@ matching that regexp.
1315This command is just like @code{multi-isearch-buffers}, except it 1297This command is just like @code{multi-isearch-buffers}, except it
1316performs an incremental regexp search. 1298performs an incremental regexp search.
1317 1299
1300@cindex Occur mode
1301@cindex mode, Occur
1318@item M-x occur 1302@item M-x occur
1319Prompt for a regexp, and display a list showing each line in the 1303Prompt for a regexp, and display a list showing each line in the
1320buffer that contains a match for it. To limit the search to part of 1304buffer that contains a match for it. To limit the search to part of
@@ -1325,16 +1309,22 @@ displayed before and after each matching line.
1325@kindex RET @r{(Occur mode)} 1309@kindex RET @r{(Occur mode)}
1326@kindex o @r{(Occur mode)} 1310@kindex o @r{(Occur mode)}
1327@kindex C-o @r{(Occur mode)} 1311@kindex C-o @r{(Occur mode)}
1328The buffer @samp{*Occur*} containing the output serves as a menu for 1312In the @samp{*Occur*} buffer, you can click on each entry, or move
1329finding the occurrences in their original context. Click 1313point there and type @key{RET}, to visit the corresponding position in
1330@kbd{Mouse-2} on an occurrence listed in @samp{*Occur*}, or position 1314the buffer that was searched. @kbd{o} and @kbd{C-o} display the match
1331point there and type @key{RET}; this switches to the buffer that was 1315in another window; @kbd{C-o} does not select it. Alternatively, you
1332searched and moves point to the original of the chosen occurrence. 1316can use the @kbd{C-x `} (@code{next-error}) command to visit the
1333@kbd{o} and @kbd{C-o} display the match in another window; @kbd{C-o} 1317occurrences one by one (@pxref{Compilation Mode}).
1334does not select it. 1318
1335 1319@cindex Occur Edit mode
1336After using @kbd{M-x occur}, you can use @code{next-error} to visit 1320@cindex mode, Occur Edit
1337the occurrences found, one by one. @ref{Compilation Mode}. 1321Typing @kbd{e} in the @samp{*Occur*} buffer switches to Occur Edit
1322mode, in which edits made to the entries are also applied to the text
1323in the originating buffer. Type @kbd{C-c C-c} to return to Occur
1324mode.
1325
1326The command @kbd{M-x list-matching-lines} is a synonym for @kbd{M-x
1327occur}.
1338 1328
1339@kindex M-s o 1329@kindex M-s o
1340@item M-s o 1330@item M-s o
@@ -1342,9 +1332,6 @@ Run @code{occur} using the search string of the last incremental
1342string search. You can also run @kbd{M-s o} when an incremental 1332string search. You can also run @kbd{M-s o} when an incremental
1343search is active; this uses the current search string. 1333search is active; this uses the current search string.
1344 1334
1345@item M-x list-matching-lines
1346Synonym for @kbd{M-x occur}.
1347
1348@item M-x multi-occur 1335@item M-x multi-occur
1349This command is just like @code{occur}, except it is able to search 1336This command is just like @code{occur}, except it is able to search
1350through multiple buffers. It asks you to specify the buffer names one 1337through multiple buffers. It asks you to specify the buffer names one
diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi
index dc92e4a519c..600d0b07818 100644
--- a/doc/emacs/windows.texi
+++ b/doc/emacs/windows.texi
@@ -343,8 +343,8 @@ details.
343additionally select the displaying window so that you can begin 343additionally select the displaying window so that you can begin
344editing its buffer. The command @kbd{C-x `} (@code{next-error}) is 344editing its buffer. The command @kbd{C-x `} (@code{next-error}) is
345one example (@pxref{Compilation Mode}). Such commands work by calling 345one example (@pxref{Compilation Mode}). Such commands work by calling
346@code{pop-to-buffer} internally. @xref{Displaying Buffers,,Displaying 346@code{pop-to-buffer} internally. @xref{Switching Buffers,,Switching
347Buffers in Windows, elisp, The Emacs Lisp Reference Manual}. 347to a Buffer in a Window, elisp, The Emacs Lisp Reference Manual}.
348 348
349 Commands with names ending in @code{-other-window} behave like 349 Commands with names ending in @code{-other-window} behave like
350@code{display-buffer}, except that they never display in the selected 350@code{display-buffer}, except that they never display in the selected
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 02c2d2b8750..6b0ef9c5d8b 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,9 @@
12011-10-23 Michael Albinus <michael.albinus@gmx.de>
2
3 Sync with Tramp 2.2.3.
4
5 * trampver.texi: Update release number.
6
12011-10-14 Glenn Morris <rgm@gnu.org> 72011-10-14 Glenn Morris <rgm@gnu.org>
2 8
3 * ert.texi (Introduction, How to Run Tests) 9 * ert.texi (Introduction, How to Run Tests)
diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi
index 31d3ac0204f..63dc78dc4e8 100644
--- a/doc/misc/trampver.texi
+++ b/doc/misc/trampver.texi
@@ -8,7 +8,7 @@
8@c In the Tramp CVS, the version number is auto-frobbed from 8@c In the Tramp CVS, the version number is auto-frobbed from
9@c configure.ac, so you should edit that file and run 9@c configure.ac, so you should edit that file and run
10@c "autoconf && ./configure" to change the version number. 10@c "autoconf && ./configure" to change the version number.
11@set trampver 2.2.3-pre 11@set trampver 2.2.3-24.1
12 12
13@c Other flags from configuration 13@c Other flags from configuration
14@set instprefix /usr/local 14@set instprefix /usr/local