aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2018-02-07 22:24:13 +0200
committerEli Zaretskii2018-02-07 22:24:13 +0200
commit5fe81923e5b6dbbfb623befa12a3317a7e934a63 (patch)
treee4071974a2c3987b89c6b14b4d2aefe61f553a31
parentc787a4968273027960a20ced6d63bae0d1ffa87e (diff)
downloademacs-5fe81923e5b6dbbfb623befa12a3317a7e934a63.tar.gz
emacs-5fe81923e5b6dbbfb623befa12a3317a7e934a63.zip
Yet another round of improvements in the manual
* doc/emacs/misc.texi (Document View): Improve wording. Reported by lyr3 <lyr3@protonmail.com> in emacs-manual-bugs@gnu.org. * doc/emacs/files.texi (Recover): Fix a typo. Reported by Jorge <jorge+list@disroot.org> in emacs-manual-bugs@gnu.org. * doc/emacs/anti.texi (Antinews): Fix typos. Reported by Justin Heyes-Jones <justinhj@gmail.com> in emacs-manual-bugs@gnu.org. * doc/emacs/mini.texi (Basic Minibuffer): Clarify wording. Reported by Vivishek Sudhir <vivishek.sudhir@gmail.com> in emacs-manual-bugs@gnu.org. * doc/emacs/cmdargs.texi (MS-Windows Registry): Improve wording regarding registry keys. * doc/emacs/macos.texi (Mac OS / GNUstep): Sayu "NeXT Inc." Reported by Cena Mayo <cenazoic@gmail.com> in emacs-manual-bugs@gnu.org. * doc/emacs/screen.texi (Screen): More accurate wording. Suggested by Miloš Polakovič <milos@alphamail.org> in emacs-manual-bugs@gnu.org. * doc/emacs/indent.texi (Just Spaces): Minor wording change. Suggested by David Bonnafous <dbonnafo@gmail.com> in emacs-manual-bugs@gnu.org. * doc/emacs/text.texi (TeX Mode, TeX Editing): Improve and simplify wording. Suggested by root@vxid.pw <root@vxid.pw> in emacs-manual-bugs@gnu.org. * doc/emacs/cmdargs.texi (Window Size X): Minor wording change. * doc/emacs/display.texi (Highlight Interactively): Fill text. (Optional Mode Line): Fix typos. Suggested by Alberto Sartori <alberto.sartori@sissa.it> in emacs-manual-bugs@gnu.org. * doc/emacs/building.texi (Debugger Operation): Clarify wording. * doc/emacs/files.texi (Directories, Comparing Files, Diff Mode) (Remote Files, File Names, Visiting, Backup Deletion) (Customize Save, Interlocking): Improve wording and accuracy of the text. * doc/emacs/maintaining.texi (VC With A Merging VCS): Don't say "his". * doc/emacs/arevert-xtra.texi (Auto Reverting Dired): Minor wording changes. (Supporting additional buffers): Moved to ... * doc/lispref/backups.texi (Reverting): ... here. * doc/emacs/emacs.texi (Top): Remove "Supporting additional buffers" from master menu. * doc/emacs/files.texi (Reverting): Mention use of file notifications. Suggested by Michael Albinus <michael.albinus@gmx.de> in emacs-manual-bugs@gnu.org. * doc/emacs/rmail.texi (Rmail Motion): Clarify what '-' does to 'M-s'. Suggested by Arthur Milchior <arthur@milchior.fr> in emacs-manual-bugs@gnu.org. * doc/emacs/cmdargs.texi (Initial Options): Capitalize "Emacs". (Action Arguments): Fix a typo. (Emacs Invocation): Replace em-dash with a comma. Suggested by Justin Heyes-Jones <justinhj@gmail.com> in emacs-manual-bugs@gnu.org. * doc/emacs/m-x.texi (M-x): Add an example. Suggested by Alberto Sartori <alberto.sartori@sissa.it> in emacs-manual-bugs@gnu.org. * doc/emacs/calendar.texi (Calendar/Diary, Calendar Unit Motion): Minor wording changes.
-rw-r--r--doc/emacs/anti.texi10
-rw-r--r--doc/emacs/arevert-xtra.texi110
-rw-r--r--doc/emacs/building.texi15
-rw-r--r--doc/emacs/calendar.texi11
-rw-r--r--doc/emacs/cmdargs.texi35
-rw-r--r--doc/emacs/display.texi23
-rw-r--r--doc/emacs/emacs.texi1
-rw-r--r--doc/emacs/files.texi83
-rw-r--r--doc/emacs/indent.texi4
-rw-r--r--doc/emacs/m-x.texi5
-rw-r--r--doc/emacs/macos.texi4
-rw-r--r--doc/emacs/maintaining.texi14
-rw-r--r--doc/emacs/mini.texi4
-rw-r--r--doc/emacs/misc.texi4
-rw-r--r--doc/emacs/rmail.texi1
-rw-r--r--doc/emacs/screen.texi14
-rw-r--r--doc/emacs/text.texi44
-rw-r--r--doc/lispref/backups.texi80
18 files changed, 230 insertions, 232 deletions
diff --git a/doc/emacs/anti.texi b/doc/emacs/anti.texi
index d4b68a2fac4..0ae81595746 100644
--- a/doc/emacs/anti.texi
+++ b/doc/emacs/anti.texi
@@ -47,7 +47,7 @@ development will make that unnecessary.
47 47
48@item 48@item
49The @option{--fg-daemon} is gone, leaving only @option{--daemon}. No 49The @option{--fg-daemon} is gone, leaving only @option{--daemon}. No
50need to procrastinate on the dilemma whether you do or don't want the 50need to procrastinate on the dilemma whether you do or do not want the
51new shiny ``headless Emacs'' thingy. Hail, simplicity! 51new shiny ``headless Emacs'' thingy. Hail, simplicity!
52 52
53@item 53@item
@@ -71,10 +71,10 @@ The double-buffering feature of Emacs display on X has been removed.
71We decided that its complexity and a few random surprising 71We decided that its complexity and a few random surprising
72side-effects aren't justified by the gains, even though those gains 72side-effects aren't justified by the gains, even though those gains
73were hailed in some quarters. Yes, Emacs 25.2 will flicker in some 73were hailed in some quarters. Yes, Emacs 25.2 will flicker in some
74use cases, but we are sure Emacs users will be able to suck it, a they 74use cases, but we are sure Emacs users will be able to suck it, as
75have been doing for years. Since this feature is gone, we've also 75they have been doing for years. Since this feature is gone, we've
76removed the @code{inhibit-double-buffering} frame parameter, which is 76also removed the @code{inhibit-double-buffering} frame parameter,
77now unnecessary. 77which is now unnecessary.
78 78
79@item 79@item
80Non-breaking hyphens and ASCII characters displayed instead of 80Non-breaking hyphens and ASCII characters displayed instead of
diff --git a/doc/emacs/arevert-xtra.texi b/doc/emacs/arevert-xtra.texi
index a619fed4b8f..45fca1f508d 100644
--- a/doc/emacs/arevert-xtra.texi
+++ b/doc/emacs/arevert-xtra.texi
@@ -40,7 +40,6 @@ explained in the corresponding sections.
40@menu 40@menu
41* Auto Reverting the Buffer Menu:: Auto Revert of the Buffer Menu. 41* Auto Reverting the Buffer Menu:: Auto Revert of the Buffer Menu.
42* Auto Reverting Dired:: Auto Revert of Dired buffers. 42* Auto Reverting Dired:: Auto Revert of Dired buffers.
43* Supporting additional buffers:: How to add more Auto Revert support.
44@end menu 43@end menu
45 44
46@node Auto Reverting the Buffer Menu 45@node Auto Reverting the Buffer Menu
@@ -68,13 +67,9 @@ automatically erasing the marks.
68@node Auto Reverting Dired 67@node Auto Reverting Dired
69@subsection Auto Reverting Dired buffers 68@subsection Auto Reverting Dired buffers
70 69
71Auto-reverting Dired buffers currently works on GNU or Unix style
72operating systems. It may not work satisfactorily on some other
73systems.
74
75Dired buffers only auto-revert when the file list of the buffer's main 70Dired buffers only auto-revert when the file list of the buffer's main
76directory changes (e.g., when a new file is added). They do not 71directory changes (e.g., when a new file is added or deleted). They
77auto-revert when information about a particular file changes 72do not auto-revert when information about a particular file changes
78(e.g., when the size changes) or when inserted subdirectories change. 73(e.g., when the size changes) or when inserted subdirectories change.
79To be sure that @emph{all} listed information is up to date, you have 74To be sure that @emph{all} listed information is up to date, you have
80to manually revert using @kbd{g}, @emph{even} if auto-reverting is 75to manually revert using @kbd{g}, @emph{even} if auto-reverting is
@@ -98,99 +93,10 @@ If you want auto-reverting to resume in the presence of marks and
98flags, mark the buffer non-modified using @kbd{M-~}. However, adding, 93flags, mark the buffer non-modified using @kbd{M-~}. However, adding,
99deleting or changing marks or flags will mark it modified again. 94deleting or changing marks or flags will mark it modified again.
100 95
101Remote Dired buffers are not auto-reverted (because it may be slow). 96Remote Dired buffers are currently not auto-reverted. Neither are
102Neither are Dired buffers for which you used shell wildcards or file 97Dired buffers for which you used shell wildcards or file arguments to
103arguments to list only some of the files. @file{*Find*} and 98list only some of the files. @file{*Find*} and @file{*Locate*}
104@file{*Locate*} buffers do not auto-revert either. 99buffers do not auto-revert either.
105
106@c FIXME? This should be in the elisp manual?
107@node Supporting additional buffers
108@subsection Adding Support for Auto-Reverting additional Buffers.
109
110This section is intended for Elisp programmers who would like to add
111support for auto-reverting new types of buffers.
112
113To support auto-reverting the buffer must first of all have a suitable
114@code{revert-buffer-function}. @xref{Definition of
115revert-buffer-function,, Reverting, elisp, the Emacs Lisp Reference Manual}.
116
117In addition, it must have a suitable @code{buffer-stale-function}.
118
119@c FIXME only defvar in all of doc/emacs!
120@defvar buffer-stale-function
121The value of this variable is a function to check whether a
122buffer needs reverting. This should be a function with one optional
123argument @var{noconfirm}. The function should return non-@code{nil}
124if the buffer should be reverted. The buffer is current when this
125function is called.
126
127While this function is mainly intended for use in auto-reverting, it
128could be used for other purposes as well. For instance, if
129auto-reverting is not enabled, it could be used to warn the user that
130the buffer needs reverting. The idea behind the @var{noconfirm}
131argument is that it should be @code{t} if the buffer is going to be
132reverted without asking the user and @code{nil} if the function is
133just going to be used to warn the user that the buffer is out of date.
134In particular, for use in auto-reverting, @var{noconfirm} is @code{t}.
135If the function is only going to be used for auto-reverting, you can
136ignore the @var{noconfirm} argument.
137
138If you just want to automatically auto-revert every
139@code{auto-revert-interval} seconds (like the Buffer Menu), use:
140
141@example
142(setq-local buffer-stale-function
143 #'(lambda (&optional noconfirm) 'fast))
144@end example
145
146@noindent
147in the buffer's mode function.
148
149The special return value @samp{fast} tells the caller that the need
150for reverting was not checked, but that reverting the buffer is fast.
151It also tells Auto Revert not to print any revert messages, even if
152@code{auto-revert-verbose} is non-@code{nil}. This is important, as
153getting revert messages every @code{auto-revert-interval} seconds can
154be very annoying. The information provided by this return value could
155also be useful if the function is consulted for purposes other than
156auto-reverting.
157@end defvar
158
159Once the buffer has a suitable @code{revert-buffer-function} and
160@code{buffer-stale-function}, several problems usually remain.
161
162The buffer will only auto-revert if it is marked unmodified. Hence,
163you will have to make sure that various functions mark the buffer
164modified if and only if either the buffer contains information that
165might be lost by reverting, or there is reason to believe that the user
166might be inconvenienced by auto-reverting, because he is actively
167working on the buffer. The user can always override this by manually
168adjusting the modified status of the buffer. To support this, calling
169the @code{revert-buffer-function} on a buffer that is marked
170unmodified should always keep the buffer marked unmodified.
171
172It is important to assure that point does not continuously jump around
173as a consequence of auto-reverting. Of course, moving point might be
174inevitable if the buffer radically changes.
175
176You should make sure that the @code{revert-buffer-function} does not
177print messages that unnecessarily duplicate Auto Revert's own messages,
178displayed if @code{auto-revert-verbose} is @code{t}, and effectively
179override a @code{nil} value for @code{auto-revert-verbose}. Hence,
180adapting a mode for auto-reverting often involves getting rid of such
181messages. This is especially important for buffers that automatically
182revert every @code{auto-revert-interval} seconds.
183
184If the new auto-reverting is part of Emacs, you should mention it
185in the documentation string of @code{global-auto-revert-non-file-buffers}.
186 100
187@ifinfo 101Note that auto-reverting Dired buffers may not work satisfactorily on
188Similarly, you should add a node to this chapter's menu. This node 102some systems.
189@end ifinfo
190@ifnotinfo
191Similarly, you should add a section to this chapter. This section
192@end ifnotinfo
193should at the very least make clear whether enabling auto-reverting
194for the buffer reliably assures that all information in the buffer is
195completely up to date (or will be after @code{auto-revert-interval}
196seconds).
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index 3b645d5e65c..7e4b68e6f71 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -607,15 +607,16 @@ to recompile and restart the program.
607@vindex gud-tooltip-echo-area 607@vindex gud-tooltip-echo-area
608 GUD Tooltip mode is a global minor mode that adds tooltip support to 608 GUD Tooltip mode is a global minor mode that adds tooltip support to
609GUD@. To toggle this mode, type @kbd{M-x gud-tooltip-mode}. It is 609GUD@. To toggle this mode, type @kbd{M-x gud-tooltip-mode}. It is
610disabled by default. If enabled, you can move the mouse cursor over a 610disabled by default. If enabled, you can move the mouse pointer over a
611variable, a function, or a macro (collectively called 611variable, a function, or a macro (collectively called
612@dfn{identifiers}) to show their values in tooltips 612@dfn{identifiers}) to show their values in tooltips
613(@pxref{Tooltips}). Alternatively, mark an identifier or an 613(@pxref{Tooltips}). If just placing the mouse pointer over an
614expression by dragging the mouse over it, then leave the mouse in the 614expression doesn't show the value of the expression you had in mind,
615marked area to have the value of the expression displayed in a 615you can tell Emacs more explicitly what expression to evaluate by
616tooltip. The GUD Tooltip mode takes effect in the GUD interaction 616dragging the mouse over the expression, then leaving the mouse inside
617buffer, and in all source buffers with major modes listed in the 617the marked area. The GUD Tooltip mode takes effect in the GUD
618variable @code{gud-tooltip-modes}. If the variable 618interaction buffer, and in all source buffers with major modes listed
619in the variable @code{gud-tooltip-modes}. If the variable
619@code{gud-tooltip-echo-area} is non-@code{nil}, or if you turned off 620@code{gud-tooltip-echo-area} is non-@code{nil}, or if you turned off
620the tooltip mode, values are shown in the echo area instead of a 621the tooltip mode, values are shown in the echo area instead of a
621tooltip. 622tooltip.
diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi
index ed1f53fa70b..be5af998e7e 100644
--- a/doc/emacs/calendar.texi
+++ b/doc/emacs/calendar.texi
@@ -12,7 +12,7 @@ planned or past events. It also has facilities for managing your
12appointments, and keeping track of how much time you spend working on 12appointments, and keeping track of how much time you spend working on
13certain projects. 13certain projects.
14 14
15 To enter the calendar, type @kbd{M-x calendar}; this displays a 15 To enter the calendar, type @kbd{M-x calendar}. This displays a
16three-month calendar centered on the current month, with point on the 16three-month calendar centered on the current month, with point on the
17current date. With a numeric argument, as in @kbd{C-u M-x calendar}, it 17current date. With a numeric argument, as in @kbd{C-u M-x calendar}, it
18prompts you for the month and year to be the center of the three-month 18prompts you for the month and year to be the center of the three-month
@@ -126,10 +126,11 @@ whole year.
126 126
127 The easiest way to remember these commands is to consider months and 127 The easiest way to remember these commands is to consider months and
128years analogous to paragraphs and pages of text, respectively. But 128years analogous to paragraphs and pages of text, respectively. But
129the commands themselves are not quite analogous. The ordinary Emacs 129the calendar movement commands themselves do not quite parallel those
130paragraph commands move to the beginning or end of a paragraph, 130for movement through text: the ordinary Emacs paragraph commands move
131whereas these month and year commands move by an entire month or an 131to the beginning or end of a paragraph, whereas these month and year
132entire year, keeping the same date within the month or year. 132commands move by an entire month or an entire year, keeping the same
133date within the month or year.
133 134
134 All these commands accept a numeric argument as a repeat count. 135 All these commands accept a numeric argument as a repeat count.
135For convenience, the digit keys and the minus sign specify numeric 136For convenience, the digit keys and the minus sign specify numeric
diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi
index 63db2ac765b..e463e7c8194 100644
--- a/doc/emacs/cmdargs.texi
+++ b/doc/emacs/cmdargs.texi
@@ -41,10 +41,11 @@ corresponding long form.
41type. However, you don't have to spell out the whole option name; any 41type. However, you don't have to spell out the whole option name; any
42unambiguous abbreviation is enough. When a long option takes an 42unambiguous abbreviation is enough. When a long option takes an
43argument, you can use either a space or an equal sign to separate the 43argument, you can use either a space or an equal sign to separate the
44option name and the argument. Thus, you can write either 44option name and the argument. Thus, for the option @samp{--display},
45@samp{--display sugar-bombs:0.0} or @samp{--display=sugar-bombs:0.0}. 45you can write either @samp{--display sugar-bombs:0.0} or
46We recommend an equal sign because it makes the relationship clearer, 46@samp{--display=sugar-bombs:0.0}. We recommend an equal sign because
47and the tables below always show an equal sign. 47it makes the relationship clearer, and the tables below always show an
48equal sign.
48 49
49@cindex initial options (command line) 50@cindex initial options (command line)
50@cindex action options (command line) 51@cindex action options (command line)
@@ -104,7 +105,7 @@ If the startup buffer is disabled (@pxref{Entering Emacs}), then
104starting Emacs with one file argument displays the buffer visiting 105starting Emacs with one file argument displays the buffer visiting
105@var{file} in a single window. With two file arguments, Emacs 106@var{file} in a single window. With two file arguments, Emacs
106displays the files in two different windows. With more than two file 107displays the files in two different windows. With more than two file
107argument, Emacs displays the last file specified in one window, plus 108arguments, Emacs displays the last file specified in one window, plus
108another window with a Buffer Menu showing all the other files 109another window with a Buffer Menu showing all the other files
109(@pxref{Several Buffers}). To inhibit using the Buffer Menu for this, 110(@pxref{Several Buffers}). To inhibit using the Buffer Menu for this,
110change the variable @code{inhibit-startup-buffer-menu} to @code{t}. 111change the variable @code{inhibit-startup-buffer-menu} to @code{t}.
@@ -326,7 +327,7 @@ in your initialization file (@pxref{Entering Emacs}).
326@opindex -Q 327@opindex -Q
327@itemx --quick 328@itemx --quick
328@opindex --quick 329@opindex --quick
329Start emacs with minimum customizations. This is similar to using @samp{-q}, 330Start Emacs with minimum customizations. This is similar to using @samp{-q},
330@samp{--no-site-file}, @samp{--no-site-lisp}, and @samp{--no-splash} 331@samp{--no-site-file}, @samp{--no-site-lisp}, and @samp{--no-splash}
331together. This also stops Emacs from processing X resources by 332together. This also stops Emacs from processing X resources by
332setting @code{inhibit-x-resources} to @code{t} (@pxref{Resources}). 333setting @code{inhibit-x-resources} to @code{t} (@pxref{Resources}).
@@ -337,7 +338,7 @@ setting @code{inhibit-x-resources} to @code{t} (@pxref{Resources}).
337@opindex --daemon 338@opindex --daemon
338@itemx --bg-daemon[=@var{name}] 339@itemx --bg-daemon[=@var{name}]
339@itemx --fg-daemon[=@var{name}] 340@itemx --fg-daemon[=@var{name}]
340Start Emacs as a daemon---after Emacs starts up, it starts the Emacs 341Start Emacs as a daemon: after Emacs starts up, it starts the Emacs
341server without opening any frames. 342server without opening any frames.
342(Optionally, you can specify an explicit @var{name} for the server.) 343(Optionally, you can specify an explicit @var{name} for the server.)
343You can then use the @command{emacsclient} command to connect to Emacs 344You can then use the @command{emacsclient} command to connect to Emacs
@@ -753,9 +754,10 @@ name under @file{/Software/GNU/Emacs}; first in the
753there, in the @file{HKEY_LOCAL_MACHINE} section. Finally, if Emacs 754there, in the @file{HKEY_LOCAL_MACHINE} section. Finally, if Emacs
754still cannot determine the values, compiled-in defaults are used. 755still cannot determine the values, compiled-in defaults are used.
755 756
756In addition to the environment variables above, you can also add many 757In addition to the environment variables above, you can also add
757of the settings which on X belong in the @file{.Xdefaults} file 758settings to the @file{/Software/GNU/Emacs} registry key to specify X
758(@pxref{X Resources}) to the @file{/Software/GNU/Emacs} registry key. 759resources (@pxref{X Resources}). Most of the settings you can specify
760in your @file{.Xdefaults} file can be set from that registry key.
759 761
760@node Display X 762@node Display X
761@appendixsec Specifying the Display Name 763@appendixsec Specifying the Display Name
@@ -886,7 +888,7 @@ Specify the color for the mouse cursor when the mouse is in the Emacs window.
886@itemx --reverse-video 888@itemx --reverse-video
887@opindex --reverse-video 889@opindex --reverse-video
888@cindex reverse video, command-line argument 890@cindex reverse video, command-line argument
889Reverse video---swap the foreground and background colors. 891Reverse video: swap the foreground and background colors.
890@item --color=@var{mode} 892@item --color=@var{mode}
891@opindex --color 893@opindex --color
892@cindex standard colors on a character terminal 894@cindex standard colors on a character terminal
@@ -1023,11 +1025,12 @@ width. If you start with an @samp{x} followed by an integer, Emacs
1023interprets it as the height. Thus, @samp{81} specifies just the 1025interprets it as the height. Thus, @samp{81} specifies just the
1024width; @samp{x45} specifies just the height. 1026width; @samp{x45} specifies just the height.
1025 1027
1026 If you start with @samp{+} or @samp{-}, that introduces an offset, 1028 If you start the geometry with @samp{+} or @samp{-}, that introduces
1027which means both sizes are omitted. Thus, @samp{-3} specifies the 1029an offset, which means both sizes are omitted. Thus, @samp{-3}
1028@var{xoffset} only. (If you give just one offset, it is always 1030specifies the @var{xoffset} only. (If you give just one offset, it is
1029@var{xoffset}.) @samp{+3-3} specifies both the @var{xoffset} and the 1031always @var{xoffset}.) @samp{+3-3} specifies both the @var{xoffset}
1030@var{yoffset}, placing the frame near the bottom left of the screen. 1032and the @var{yoffset}, placing the frame near the bottom left of the
1033screen.
1031 1034
1032 You can specify a default for any or all of the fields in your X 1035 You can specify a default for any or all of the fields in your X
1033resource file (@pxref{Resources}), and then override selected fields 1036resource file (@pxref{Resources}), and then override selected fields
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index e22d7f30afb..205ca54728f 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -991,16 +991,15 @@ expressions to highlight in different ways.
991@kindex M-s h u 991@kindex M-s h u
992@kindex C-x w r 992@kindex C-x w r
993@findex unhighlight-regexp 993@findex unhighlight-regexp
994Unhighlight @var{regexp} (@code{unhighlight-regexp}). 994Unhighlight @var{regexp} (@code{unhighlight-regexp}). If you invoke
995 995this from the menu, you select the expression to unhighlight from a
996If you invoke this from the menu, you select the expression to 996list. If you invoke this from the keyboard, you use the minibuffer.
997unhighlight from a list. If you invoke this from the keyboard, you 997It will show the most recently added regular expression; use @kbd{M-n}
998use the minibuffer. It will show the most recently added regular 998to show the next older expression and @kbd{M-p} to select the next
999expression; use @kbd{M-n} to show the next older expression and 999newer expression. (You can also type the expression by hand, with
1000@kbd{M-p} to select the next newer expression. (You can also type the 1000completion.) When the expression you want to unhighlight appears in
1001expression by hand, with completion.) When the expression you want to 1001the minibuffer, press @kbd{@key{RET}} to exit the minibuffer and
1002unhighlight appears in the minibuffer, press @kbd{@key{RET}} to exit 1002unhighlight it.
1003the minibuffer and unhighlight it.
1004 1003
1005@item M-s h l @var{regexp} @key{RET} @var{face} @key{RET} 1004@item M-s h l @var{regexp} @key{RET} @var{face} @key{RET}
1006@itemx C-x w l @var{regexp} @key{RET} @var{face} @key{RET} 1005@itemx C-x w l @var{regexp} @key{RET} @var{face} @key{RET}
@@ -1393,13 +1392,13 @@ the option @code{display-time-mode}. The information added to the mode
1393line looks like this: 1392line looks like this:
1394 1393
1395@example 1394@example
1396@var{hh}:@var{mm}pm @var{l.ll} 1395@var{hh}:@var{mm}PM @var{l.ll}
1397@end example 1396@end example
1398 1397
1399@noindent 1398@noindent
1400@vindex display-time-24hr-format 1399@vindex display-time-24hr-format
1401Here @var{hh} and @var{mm} are the hour and minute, followed always by 1400Here @var{hh} and @var{mm} are the hour and minute, followed always by
1402@samp{am} or @samp{pm}. @var{l.ll} is the average number, collected 1401@samp{AM} or @samp{PM}. @var{l.ll} is the average number, collected
1403for the last few minutes, of processes in the whole system that were 1402for the last few minutes, of processes in the whole system that were
1404either running or ready to run (i.e., were waiting for an available 1403either running or ready to run (i.e., were waiting for an available
1405processor). (Some fields may be missing if your operating system 1404processor). (Some fields may be missing if your operating system
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index 474c4e96e22..163b6f23d84 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -482,7 +482,6 @@ Auto Reverting Non-File Buffers
482 482
483* Auto Reverting the Buffer Menu:: Auto Revert of the Buffer Menu. 483* Auto Reverting the Buffer Menu:: Auto Revert of the Buffer Menu.
484* Auto Reverting Dired:: Auto Revert of Dired buffers. 484* Auto Reverting Dired:: Auto Revert of Dired buffers.
485* Supporting additional buffers:: How to add more Auto Revert support.
486@end ifnottex 485@end ifnottex
487 486
488Auto-Saving: Protection Against Disasters 487Auto-Saving: Protection Against Disasters
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 1418a639fbb..44d19d5bd78 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -116,8 +116,8 @@ the @samp{$}; alternatively, it can be enclosed in braces after the
116@file{/u/$@{FOO@}/test.c} are abbreviations for 116@file{/u/$@{FOO@}/test.c} are abbreviations for
117@file{/u/rms/hacks/test.c}. If the environment variable is not 117@file{/u/rms/hacks/test.c}. If the environment variable is not
118defined, no substitution occurs, so that the character @samp{$} stands 118defined, no substitution occurs, so that the character @samp{$} stands
119for itself. Note that environment variables affect Emacs only if they 119for itself. Note that environment variables set outside Emacs affect
120are applied before Emacs is started. 120Emacs only if they are applied before Emacs is started.
121 121
122 To access a file with @samp{$} in its name, if the @samp{$} causes 122 To access a file with @samp{$} in its name, if the @samp{$} causes
123expansion, type @samp{$$}. This pair is converted to a single 123expansion, type @samp{$$}. This pair is converted to a single
@@ -167,7 +167,9 @@ minibuffer, you can abort the command by typing @kbd{C-g}. @xref{File
167Names}, for details about entering file names into minibuffers. 167Names}, for details about entering file names into minibuffers.
168 168
169 If the specified file exists but the system does not allow you to 169 If the specified file exists but the system does not allow you to
170read it, an error message is displayed in the echo area. Otherwise, 170read it, an error message is displayed in the echo area (on GNU and
171Unix systems you might be able to visit such a file using the
172@samp{su} or @samp{sudo} methods; @pxref{Remote Files}). Otherwise,
171you can tell that @kbd{C-x C-f} has completed successfully by the 173you can tell that @kbd{C-x C-f} has completed successfully by the
172appearance of new text on the screen, and by the buffer name shown in 174appearance of new text on the screen, and by the buffer name shown in
173the mode line (@pxref{Mode Line}). Emacs normally constructs the 175the mode line (@pxref{Mode Line}). Emacs normally constructs the
@@ -291,7 +293,8 @@ see @ref{Drag and Drop}, and @ref{Misc Dired Features}.
291 293
292 On text-mode terminals and on graphical displays when Emacs was 294 On text-mode terminals and on graphical displays when Emacs was
293built without a GUI toolkit, you can visit files via the menu-bar 295built without a GUI toolkit, you can visit files via the menu-bar
294@samp{File} menu, which has a @samp{Visit New File} item. 296@samp{File} menu, which has a @samp{Visit New File} and @samp{Open
297File} items.
295 298
296 Each time you visit a file, Emacs automatically scans its contents 299 Each time you visit a file, Emacs automatically scans its contents
297to detect what character encoding and end-of-line convention it uses, 300to detect what character encoding and end-of-line convention it uses,
@@ -638,7 +641,7 @@ you whether it should delete the excess backup versions. If it has
638any other value, then Emacs never automatically deletes backups. 641any other value, then Emacs never automatically deletes backups.
639 642
640 Dired's @kbd{.} (Period) command can also be used to delete old versions. 643 Dired's @kbd{.} (Period) command can also be used to delete old versions.
641@xref{Dired Deletion}. 644@xref{Flagging Many Files}.
642 645
643@node Backup Copying 646@node Backup Copying
644@subsubsection Copying vs.@: Renaming 647@subsubsection Copying vs.@: Renaming
@@ -738,7 +741,7 @@ survive a crash even if @code{fsync} works properly.
738 The @code{write-region-inhibit-fsync} variable controls whether 741 The @code{write-region-inhibit-fsync} variable controls whether
739Emacs invokes @code{fsync} after saving a file. The variable's 742Emacs invokes @code{fsync} after saving a file. The variable's
740default value is @code{nil} when Emacs is interactive, and @code{t} 743default value is @code{nil} when Emacs is interactive, and @code{t}
741when Emacs runs in batch mode (@pxref{Initial Options, batch mode}). 744when Emacs runs in batch mode (@pxref{Initial Options, Batch Mode}).
742 745
743 Emacs never uses @code{fsync} when writing auto-save files, as these 746 Emacs never uses @code{fsync} when writing auto-save files, as these
744files might lose data anyway. 747files might lose data anyway.
@@ -751,7 +754,7 @@ files might lose data anyway.
751 Simultaneous editing occurs when two users visit the same file, both 754 Simultaneous editing occurs when two users visit the same file, both
752make changes, and then both save them. If nobody is informed that 755make changes, and then both save them. If nobody is informed that
753this is happening, whichever user saves first would later find that 756this is happening, whichever user saves first would later find that
754his changes were lost. 757their changes were lost.
755 758
756 On some systems, Emacs notices immediately when the second user starts 759 On some systems, Emacs notices immediately when the second user starts
757to change the file, and issues an immediate warning. On all systems, 760to change the file, and issues an immediate warning. On all systems,
@@ -952,12 +955,25 @@ discard your changes.)
952 You can also tell Emacs to revert buffers periodically. To do this 955 You can also tell Emacs to revert buffers periodically. To do this
953for a specific buffer, enable the minor mode Auto-Revert mode by 956for a specific buffer, enable the minor mode Auto-Revert mode by
954typing @kbd{M-x auto-revert-mode}. This automatically reverts the 957typing @kbd{M-x auto-revert-mode}. This automatically reverts the
955current buffer every five seconds; you can change the interval through 958current buffer when its visited file changes on disk. To do the same
956the variable @code{auto-revert-interval}. To do the same for all file 959for all file buffers, type @kbd{M-x global-auto-revert-mode} to enable
957buffers, type @kbd{M-x global-auto-revert-mode} to enable Global 960Global Auto-Revert mode. These minor modes do not check or revert
958Auto-Revert mode. These minor modes do not check or revert remote 961remote files, because that is usually too slow. This behavior can be
959files, because that is usually too slow. This behavior can be changed 962changed by setting the variable @code{auto-revert-remote-files} to
960by setting the variable @code{auto-revert-remote-files} to non-@code{nil}. 963non-@code{nil}.
964
965@cindex file notifications
966@vindex auto-revert-use-notify
967 By default, Auto-Revert mode works using @dfn{file notifications},
968whereby changes in the filesystem are reported to Emacs by the OS.
969You can disable use of file notifications by customizing the variable
970@code{auto-revert-use-notify} to a @code{nil} value, then Emacs will
971check for file changes by polling every five seconds. You can change
972the polling interval through the variable @code{auto-revert-interval}.
973
974 Not all systems support file notifications; where they are not
975supported, @code{auto-revert-use-notify} will be @code{nil} by
976default.
961 977
962 One use of Auto-Revert mode is to ``tail'' a file such as a system 978 One use of Auto-Revert mode is to ``tail'' a file such as a system
963log, so that changes made to that file by other programs are 979log, so that changes made to that file by other programs are
@@ -1159,7 +1175,7 @@ this---saving them---updates the files themselves.
1159 1175
1160@vindex auto-save-list-file-prefix 1176@vindex auto-save-list-file-prefix
1161 Emacs records information about interrupted sessions in files named 1177 Emacs records information about interrupted sessions in files named
1162@file{.saves-@var{pid}-@var{hostname}} in the directory 1178@file{.saves-@var{pid}-@var{hostname}~} in the directory
1163@file{~/.emacs.d/auto-save-list/}. This directory is determined by 1179@file{~/.emacs.d/auto-save-list/}. This directory is determined by
1164the variable @code{auto-save-list-file-prefix}. If you set 1180the variable @code{auto-save-list-file-prefix}. If you set
1165@code{auto-save-list-file-prefix} to @code{nil}, sessions are not 1181@code{auto-save-list-file-prefix} to @code{nil}, sessions are not
@@ -1233,8 +1249,9 @@ named @file{/fsf}:
1233listing} is a list of all the files in a directory. Emacs provides 1249listing} is a list of all the files in a directory. Emacs provides
1234commands to create and delete directories, and to make directory 1250commands to create and delete directories, and to make directory
1235listings in brief format (file names only) and verbose format (sizes, 1251listings in brief format (file names only) and verbose format (sizes,
1236dates, and authors included). Emacs also includes a directory browser 1252dates, and other attributes included). Emacs also includes a
1237feature called Dired; see @ref{Dired}. 1253directory browser feature called Dired, which you can invoke with
1254@kbd{C-x d}; see @ref{Dired}.
1238 1255
1239@table @kbd 1256@table @kbd
1240@item C-x C-d @var{dir-or-pattern} @key{RET} 1257@item C-x C-d @var{dir-or-pattern} @key{RET}
@@ -1320,6 +1337,9 @@ information about the @command{diff} program.
1320 The output of the @code{diff} command is shown using a major mode 1337 The output of the @code{diff} command is shown using a major mode
1321called Diff mode. @xref{Diff Mode}. 1338called Diff mode. @xref{Diff Mode}.
1322 1339
1340 A (much more sophisticated) alternative is @kbd{M-x ediff}
1341(@pxref{Top, Ediff, Ediff, ediff, The Ediff Manual}).
1342
1323@findex diff-backup 1343@findex diff-backup
1324 The command @kbd{M-x diff-backup} compares a specified file with its 1344 The command @kbd{M-x diff-backup} compares a specified file with its
1325most recent backup. If you specify the name of a backup file, 1345most recent backup. If you specify the name of a backup file,
@@ -1336,10 +1356,10 @@ would make to the file if you save the buffer.
1336current window with that in the window that was the selected window 1356current window with that in the window that was the selected window
1337before you selected the current one. (For more information about 1357before you selected the current one. (For more information about
1338windows in Emacs, @ref{Windows}.) Comparison starts at point in each 1358windows in Emacs, @ref{Windows}.) Comparison starts at point in each
1339window, after pushing each initial point value on the mark ring in its 1359window, after pushing each initial point value on the mark ring
1340respective buffer. Then it moves point forward in each window, one 1360(@pxref{Mark Ring}) in its respective buffer. Then it moves point
1341character at a time, until it reaches characters that don't match. 1361forward in each window, one character at a time, until it reaches
1342Then the command exits. 1362characters that don't match. Then the command exits.
1343 1363
1344 If point in the two windows is followed by non-matching text when 1364 If point in the two windows is followed by non-matching text when
1345the command starts, @kbd{M-x compare-windows} tries heuristically to 1365the command starts, @kbd{M-x compare-windows} tries heuristically to
@@ -1353,8 +1373,9 @@ skips one matching range or finds the start of another.
1353whitespace. If the variable @code{compare-ignore-case} is 1373whitespace. If the variable @code{compare-ignore-case} is
1354non-@code{nil}, the comparison ignores differences in case as well. 1374non-@code{nil}, the comparison ignores differences in case as well.
1355If the variable @code{compare-ignore-whitespace} is non-@code{nil}, 1375If the variable @code{compare-ignore-whitespace} is non-@code{nil},
1356@code{compare-windows} normally ignores changes in whitespace, and a 1376@code{compare-windows} by default ignores changes in whitespace, but a
1357prefix argument turns that off. 1377prefix argument turns that off for that single invocation of the
1378command.
1358 1379
1359@cindex Smerge mode 1380@cindex Smerge mode
1360@findex smerge-mode 1381@findex smerge-mode
@@ -1424,7 +1445,7 @@ Move to the next hunk-start (@code{diff-hunk-next}).
1424This command has a side effect: it @dfn{refines} the hunk you move to, 1445This command has a side effect: it @dfn{refines} the hunk you move to,
1425highlighting its changes with better granularity. To disable this 1446highlighting its changes with better granularity. To disable this
1426feature, type @kbd{M-x diff-auto-refine-mode} to toggle off the minor 1447feature, type @kbd{M-x diff-auto-refine-mode} to toggle off the minor
1427mode Diff Auto-Refine mode. To disable Diff Auto Refine mode by 1448mode Diff Auto-Refine mode. To disable Diff Auto-Refine mode by
1428default, add this to your init file (@pxref{Hooks}): 1449default, add this to your init file (@pxref{Hooks}):
1429 1450
1430@example 1451@example
@@ -1553,17 +1574,17 @@ modify the original source files rather than the patched source files.
1553@section Copying, Naming and Renaming Files 1574@section Copying, Naming and Renaming Files
1554 1575
1555 Emacs has several commands for copying, naming, and renaming files. 1576 Emacs has several commands for copying, naming, and renaming files.
1556All of them read two file names @var{old} and @var{new} using the 1577All of them read two file names, @var{old} (or @var{target}) and
1557minibuffer, and then copy or adjust a file's name accordingly; they do 1578@var{new}, using the minibuffer, and then copy or adjust a file's name
1558not accept wildcard file names. 1579accordingly; they do not accept wildcard file names.
1559 1580
1560In all these commands, if the argument @var{new} is just a directory 1581In all these commands, if the argument @var{new} is just a directory
1561name, the real new name is in that directory, with the same 1582name (@pxref{Directory Names,,, elisp, the Emacs Lisp Reference
1583Manual}), the real new name is in that directory, with the same
1562non-directory component as @var{old}. For example, the command 1584non-directory component as @var{old}. For example, the command
1563@w{@kbd{M-x rename-file @key{RET} ~/foo @key{RET} /tmp/ @key{RET}}} 1585@w{@kbd{M-x rename-file @key{RET} ~/foo @key{RET} /tmp/ @key{RET}}}
1564renames @file{~/foo} to @file{/tmp/foo}. On GNU and other POSIX-like 1586renames @file{~/foo} to @file{/tmp/foo}. On GNU and other POSIX-like
1565systems, directory names end in @samp{/}. @xref{Directory Names,,, 1587systems, directory names end in @samp{/}.
1566elisp, the Emacs Lisp Reference Manual}.
1567 1588
1568All these commands ask for confirmation when the new file name already 1589All these commands ask for confirmation when the new file name already
1569exists. 1590exists.
@@ -1816,8 +1837,8 @@ To carry out this request, Emacs uses a remote-login program such as
1816@command{ssh}. 1837@command{ssh}.
1817You must always specify in the file name which method to use---for 1838You must always specify in the file name which method to use---for
1818example, @file{/ssh:@var{user}@@@var{host}:@var{filename}} uses 1839example, @file{/ssh:@var{user}@@@var{host}:@var{filename}} uses
1819@command{ssh}. When you specify the pseudo method @var{-} in the file 1840@command{ssh}. When you specify the pseudo method @samp{-} in the
1820name, Emacs chooses the method as follows: 1841file name, Emacs chooses the method as follows:
1821 1842
1822@enumerate 1843@enumerate
1823@item 1844@item
diff --git a/doc/emacs/indent.texi b/doc/emacs/indent.texi
index 19e1be729ff..73f0f375155 100644
--- a/doc/emacs/indent.texi
+++ b/doc/emacs/indent.texi
@@ -201,8 +201,8 @@ are always displayed as empty spaces extending to the next
201@node Just Spaces 201@node Just Spaces
202@section Tabs vs.@: Spaces 202@section Tabs vs.@: Spaces
203 203
204 Normally, indentation commands insert (or remove) an optimal mix of 204 Normally, indentation commands insert (or remove) a mix of space
205space characters and tab characters to align to the desired column. 205characters and tab characters so as to align to the desired column.
206Tab characters are displayed as a stretch of empty space extending to 206Tab characters are displayed as a stretch of empty space extending to
207the next @dfn{display tab stop}. By default, there is one display tab 207the next @dfn{display tab stop}. By default, there is one display tab
208stop every @code{tab-width} columns (the default is 8). @xref{Text 208stop every @code{tab-width} columns (the default is 8). @xref{Text
diff --git a/doc/emacs/m-x.texi b/doc/emacs/m-x.texi
index a283ca8fd03..a9b80d1addb 100644
--- a/doc/emacs/m-x.texi
+++ b/doc/emacs/m-x.texi
@@ -56,7 +56,10 @@ of entering the command name. This takes you back to command level.
56 To pass a numeric argument to the command you are invoking with 56 To pass a numeric argument to the command you are invoking with
57@kbd{M-x}, specify the numeric argument before @kbd{M-x}. The 57@kbd{M-x}, specify the numeric argument before @kbd{M-x}. The
58argument value appears in the prompt while the command name is being 58argument value appears in the prompt while the command name is being
59read, and finally @kbd{M-x} passes the argument to that command. 59read, and finally @kbd{M-x} passes the argument to that command. For
60example, to pass the numeric argument of 42 to the command
61@code{forward-char} you can type @kbd{C-u 42 M-x forward-char
62@key{RET}}.
60 63
61@vindex suggest-key-bindings 64@vindex suggest-key-bindings
62 When the command you run with @kbd{M-x} has a key binding, Emacs 65 When the command you run with @kbd{M-x} has a key binding, Emacs
diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi
index dbde2c8f824..28a5f9041ab 100644
--- a/doc/emacs/macos.texi
+++ b/doc/emacs/macos.texi
@@ -18,8 +18,8 @@ does not support versions before macOS 10.6.
18@samp{Nextstep} internally, instead of ``Cocoa'' or ``macOS''; for 18@samp{Nextstep} internally, instead of ``Cocoa'' or ``macOS''; for
19instance, most of the commands and variables described in this section 19instance, most of the commands and variables described in this section
20begin with @samp{ns-}, which is short for @samp{Nextstep}. NeXTstep 20begin with @samp{ns-}, which is short for @samp{Nextstep}. NeXTstep
21was an application interface released by NeXT Inc during the 1980s, of 21was an application interface released by NeXT Inc.@: during the 1980s,
22which Cocoa is a direct descendant. Apart from Cocoa, there is 22of which Cocoa is a direct descendant. Apart from Cocoa, there is
23another NeXTstep-style system: GNUstep, which is free software. As of 23another NeXTstep-style system: GNUstep, which is free software. As of
24this writing, Emacs GNUstep support is alpha status (@pxref{GNUstep 24this writing, Emacs GNUstep support is alpha status (@pxref{GNUstep
25Support}), but we hope to improve it in the future. 25Support}), but we hope to improve it in the future.
diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index 8acbb5317ed..127c27c0378 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -542,13 +542,13 @@ been changed in the repository, offer to update it.
542 These rules also apply when you use RCS in its non-locking mode, 542 These rules also apply when you use RCS in its non-locking mode,
543except that changes are not automatically merged from the repository. 543except that changes are not automatically merged from the repository.
544Nothing informs you if another user has committed changes in the same 544Nothing informs you if another user has committed changes in the same
545file since you began editing it; when you commit your revision, his 545file since you began editing it; when you commit your revision, that
546changes are removed (however, they remain in the repository and are 546other user's changes are removed (however, they remain in the
547thus not irrevocably lost). Therefore, you must verify that the 547repository and are thus not irrevocably lost). Therefore, you must
548current revision is unchanged before committing your changes. In 548verify that the current revision is unchanged before committing your
549addition, locking is possible with RCS even in this mode: @kbd{C-x v 549changes. In addition, locking is possible with RCS even in this mode:
550v} with an unmodified file locks the file, just as it does with RCS in 550@kbd{C-x v v} with an unmodified file locks the file, just as it does
551its normal locking mode (@pxref{VC With A Locking VCS}). 551with RCS in its normal locking mode (@pxref{VC With A Locking VCS}).
552 552
553@node VC With A Locking VCS 553@node VC With A Locking VCS
554@subsubsection Basic Version Control with Locking 554@subsubsection Basic Version Control with Locking
diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi
index de16c44720e..332602dcf2a 100644
--- a/doc/emacs/mini.texi
+++ b/doc/emacs/mini.texi
@@ -66,8 +66,8 @@ minibuffer-electric-default-mode}.
66other uses of the echo area. If an error message or an informative 66other uses of the echo area. If an error message or an informative
67message is emitted while the minibuffer is active, the message hides 67message is emitted while the minibuffer is active, the message hides
68the minibuffer for a few seconds, or until you type something; then 68the minibuffer for a few seconds, or until you type something; then
69the minibuffer comes back. While the minibuffer is in use, keystrokes 69the minibuffer comes back. While the minibuffer is in use, Emacs does
70do not echo. 70not echo keystrokes.
71 71
72@node Minibuffer File 72@node Minibuffer File
73@section Minibuffers for File Names 73@section Minibuffers for File Names
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 1fb47c3c68e..ccb213f81ba 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -413,8 +413,8 @@ is needed. For OpenDocument and Microsoft Office documents, the
413 When you visit a document file that can be displayed with DocView 413 When you visit a document file that can be displayed with DocView
414mode, Emacs automatically uses DocView mode @footnote{The needed 414mode, Emacs automatically uses DocView mode @footnote{The needed
415external tools for the document type must be available, and Emacs must 415external tools for the document type must be available, and Emacs must
416be running in a graphical frame and have PNG image support. If any of 416be running in a graphical frame and have PNG image support. If these
417these requirements is not fulfilled, Emacs falls back to another major 417requirements is not fulfilled, Emacs falls back to another major
418mode.}. As an exception, when you visit a PostScript file, Emacs 418mode.}. As an exception, when you visit a PostScript file, Emacs
419switches to PS mode, a major mode for editing PostScript files as 419switches to PS mode, a major mode for editing PostScript files as
420text; however, it also enables DocView minor mode, so you can type 420text; however, it also enables DocView minor mode, so you can type
diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi
index ebfa57c09a7..09cb034e372 100644
--- a/doc/emacs/rmail.texi
+++ b/doc/emacs/rmail.texi
@@ -175,6 +175,7 @@ Move to the next message containing a match for @var{regexp}
175 175
176@item - M-s @var{regexp} @key{RET} 176@item - M-s @var{regexp} @key{RET}
177Move to the previous message containing a match for @var{regexp}. 177Move to the previous message containing a match for @var{regexp}.
178(This is @kbd{M-s} with a negative argument.)
178@end table 179@end table
179 180
180@kindex n @r{(Rmail)} 181@kindex n @r{(Rmail)}
diff --git a/doc/emacs/screen.texi b/doc/emacs/screen.texi
index 37c082e7caf..19a4a9e4b6c 100644
--- a/doc/emacs/screen.texi
+++ b/doc/emacs/screen.texi
@@ -30,13 +30,13 @@ display systems commonly use the word ``window'' with a different
30meaning; but, as stated above, we refer to those graphical windows 30meaning; but, as stated above, we refer to those graphical windows
31as ``frames''. 31as ``frames''.
32 32
33 An Emacs window is where the @dfn{buffer}---the text you are 33 An Emacs window is where the @dfn{buffer}---the text or other
34editing---is displayed. On a graphical display, the window possesses 34graphics you are editing or viewing---is displayed. On a graphical
35a @dfn{scroll bar} on one side, which can be used to scroll through 35display, the window possesses a @dfn{scroll bar} on one side, which
36the buffer. The last line of the window is a @dfn{mode line}. This 36can be used to scroll through the buffer. The last line of the window
37displays various information about what is going on in the buffer, 37is a @dfn{mode line}. This displays various information about what is
38such as whether there are unsaved changes, the editing modes that are 38going on in the buffer, such as whether there are unsaved changes, the
39in use, the current line number, and so forth. 39editing modes that are in use, the current line number, and so forth.
40 40
41 When you start Emacs, there is normally only one window in the 41 When you start Emacs, there is normally only one window in the
42frame. However, you can subdivide this window horizontally or 42frame. However, you can subdivide this window horizontally or
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi
index dd08cd15138..45407b21098 100644
--- a/doc/emacs/text.texi
+++ b/doc/emacs/text.texi
@@ -1498,29 +1498,27 @@ This is an example.
1498@findex doctex-mode 1498@findex doctex-mode
1499@findex bibtex-mode 1499@findex bibtex-mode
1500 1500
1501 Emacs provides special major modes for editing files written in 1501 @TeX{} is a powerful text formatter written by Donald Knuth; like
1502@TeX{} and its related formats. @TeX{} is a powerful text formatter 1502GNU Emacs, it is free software. The @TeX{} format has several
1503written by Donald Knuth; like GNU Emacs, it is free software. 1503variants, including @LaTeX{}, a simplified input format for @TeX{};
1504@LaTeX{} is a simplified input format for @TeX{}, implemented using 1504Doc@TeX{}, a special file format in which the @LaTeX{} sources are
1505@TeX{} macros. Doc@TeX{} is a special file format in which the 1505written, combining sources with documentation; and Sli@TeX{}, an
1506@LaTeX{} sources are written, combining sources with documentation. 1506obsolete special form of @LaTeX{}@footnote{
1507Sli@TeX{} is an obsolete special form of @LaTeX{}.@footnote{It has 1507It has been replaced by the @samp{slides} document class, which comes
1508been replaced by the @samp{slides} document class, which comes with 1508with @LaTeX{}.}.
1509@LaTeX{}.}
1510 1509
1511@vindex tex-default-mode 1510@vindex tex-default-mode
1512 @TeX{} mode has four variants: Plain @TeX{} mode, @LaTeX{} mode, 1511 Emacs provides a @TeX{} major mode for each of these variants: Plain
1513Doc@TeX{} mode, and Sli@TeX{} mode. These distinct major modes differ 1512@TeX{} mode, @LaTeX{} mode, Doc@TeX{} mode, and Sli@TeX{} mode. Emacs
1514only slightly, and are designed for editing the four different 1513selects the appropriate mode by looking at the contents of the buffer.
1515formats. Emacs selects the appropriate mode by looking at the 1514(This is done by the @code{tex-mode} command, which is normally called
1516contents of the buffer. (This is done by the @code{tex-mode} command, 1515automatically when you visit a @TeX{}-like file. @xref{Choosing
1517which is normally called automatically when you visit a @TeX{}-like 1516Modes}.) If the contents are insufficient to determine this, Emacs
1518file. @xref{Choosing Modes}.) If the contents are insufficient to 1517chooses the mode specified by the variable @code{tex-default-mode};
1519determine this, Emacs chooses the mode specified by the variable 1518its default value is @code{latex-mode}. If Emacs does not guess
1520@code{tex-default-mode}; its default value is @code{latex-mode}. If 1519right, you can select the correct variant of @TeX{} mode using the
1521Emacs does not guess right, you can select the correct variant of 1520command @kbd{M-x plain-tex-mode}, @kbd{M-x latex-mode}, @kbd{M-x
1522@TeX{} mode using the command @kbd{M-x plain-tex-mode}, @kbd{M-x 1521slitex-mode}, or @kbd{doctex-mode}.
1523latex-mode}, @kbd{M-x slitex-mode}, or @kbd{doctex-mode}.
1524 1522
1525 The following sections document the features of @TeX{} mode and its 1523 The following sections document the features of @TeX{} mode and its
1526variants. There are several other @TeX{}-related Emacs packages, 1524variants. There are several other @TeX{}-related Emacs packages,
@@ -1618,7 +1616,9 @@ to keep braces balanced at all times, rather than inserting them
1618singly. Use @kbd{C-c @{} (@code{tex-insert-braces}) to insert a pair of 1616singly. Use @kbd{C-c @{} (@code{tex-insert-braces}) to insert a pair of
1619braces. It leaves point between the two braces so you can insert the 1617braces. It leaves point between the two braces so you can insert the
1620text that belongs inside. Afterward, use the command @kbd{C-c @}} 1618text that belongs inside. Afterward, use the command @kbd{C-c @}}
1621(@code{up-list}) to move forward past the close brace. 1619(@code{up-list}) to move forward past the close brace. You can also
1620invoke @kbd{C-c @{} after marking some text: then the command encloses
1621the marked text in braces.
1622 1622
1623@findex tex-validate-region 1623@findex tex-validate-region
1624@findex tex-terminate-paragraph 1624@findex tex-terminate-paragraph
diff --git a/doc/lispref/backups.texi b/doc/lispref/backups.texi
index 8ca10d7905c..8ce8f6180d1 100644
--- a/doc/lispref/backups.texi
+++ b/doc/lispref/backups.texi
@@ -775,16 +775,80 @@ after inserting the modified contents. A custom @code{revert-buffer-function}
775may or may not run this hook. 775may or may not run this hook.
776@end defvar 776@end defvar
777 777
778@c FIXME? Move this section from arevert-xtra to here? 778Emacs can revert buffers automatically. It does that by default for
779buffers visiting files. The following describes how to add support
780for auto-reverting new types of buffers.
781
782First, such buffers must have a suitable @code{revert-buffer-function}
783and @code{buffer-stale-function} defined.
784
779@defvar buffer-stale-function 785@defvar buffer-stale-function
780The value of this variable specifies a function to call to check 786The value of this variable specifies a function to call to check
781whether a buffer needs reverting. The default value only handles 787whether a buffer needs reverting. The default value only handles
782buffers that are visiting files, by checking their modification time. 788buffers that are visiting files, by checking their modification time.
783Buffers that are not visiting files require a custom function 789Buffers that are not visiting files require a custom function of one
784@iftex 790optional argument @var{noconfirm}. The function should return
785(@pxref{Supporting additional buffers,,, emacs-xtra, Specialized Emacs Features}). 791non-@code{nil} if the buffer should be reverted. The buffer is
786@end iftex 792current when this function is called.
787@ifnottex 793
788(@pxref{Supporting additional buffers,,, emacs}). 794While this function is mainly intended for use in auto-reverting, it
789@end ifnottex 795could be used for other purposes as well. For instance, if
796auto-reverting is not enabled, it could be used to warn the user that
797the buffer needs reverting. The idea behind the @var{noconfirm}
798argument is that it should be @code{t} if the buffer is going to be
799reverted without asking the user and @code{nil} if the function is
800just going to be used to warn the user that the buffer is out of date.
801In particular, for use in auto-reverting, @var{noconfirm} is @code{t}.
802If the function is only going to be used for auto-reverting, you can
803ignore the @var{noconfirm} argument.
804
805If you just want to automatically auto-revert every
806@code{auto-revert-interval} seconds (like the Buffer Menu), use:
807
808@example
809(setq-local buffer-stale-function
810 #'(lambda (&optional noconfirm) 'fast))
811@end example
812
813@noindent
814in the buffer's mode function.
815
816The special return value @samp{fast} tells the caller that the need
817for reverting was not checked, but that reverting the buffer is fast.
818It also tells Auto Revert not to print any revert messages, even if
819@code{auto-revert-verbose} is non-@code{nil}. This is important, as
820getting revert messages every @code{auto-revert-interval} seconds can
821be very annoying. The information provided by this return value could
822also be useful if the function is consulted for purposes other than
823auto-reverting.
790@end defvar 824@end defvar
825
826Once the buffer has a suitable @code{revert-buffer-function} and
827@code{buffer-stale-function}, several problems usually remain.
828
829The buffer will only auto-revert if it is marked unmodified. Hence,
830you will have to make sure that various functions mark the buffer
831modified if and only if either the buffer contains information that
832might be lost by reverting, or there is reason to believe that the user
833might be inconvenienced by auto-reverting, because he is actively
834working on the buffer. The user can always override this by manually
835adjusting the modified status of the buffer. To support this, calling
836the @code{revert-buffer-function} on a buffer that is marked
837unmodified should always keep the buffer marked unmodified.
838
839It is important to assure that point does not continuously jump around
840as a consequence of auto-reverting. Of course, moving point might be
841inevitable if the buffer radically changes.
842
843You should make sure that the @code{revert-buffer-function} does not
844print messages that unnecessarily duplicate Auto Revert's own messages,
845displayed if @code{auto-revert-verbose} is @code{t}, and effectively
846override a @code{nil} value for @code{auto-revert-verbose}. Hence,
847adapting a mode for auto-reverting often involves getting rid of such
848messages. This is especially important for buffers that automatically
849revert every @code{auto-revert-interval} seconds.
850
851If the new auto-reverting is part of Emacs, you should mention it
852in the documentation string of @code{global-auto-revert-non-file-buffers}.
853
854Similarly, you should document the additions in the Emacs manual.