aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2018-02-13 09:26:20 -0800
committerGlenn Morris2018-02-13 09:26:20 -0800
commit98f4e336e879e54251694fa0d47b69d8d325176d (patch)
treeb623c340b850debd5f2e907287f3c48735202aad
parent1d135af78c3ddd502b5feb84884ea55cbc664753 (diff)
parent333d6f4d99a80f30ae6cd3880b9d9ec38a85691b (diff)
downloademacs-98f4e336e879e54251694fa0d47b69d8d325176d.tar.gz
emacs-98f4e336e879e54251694fa0d47b69d8d325176d.zip
Merge from origin/emacs-26
333d6f4 (origin/emacs-26) More changes in the Emacs manual 52ca0d1 * lisp/vc/vc.el (vc-deduce-backend): Use ignore-errors. 69e8046 Don't signal error in vc-deduce-backend f568c91 * doc/misc/tramp.texi: Index more user options. 92ca881 Minor change in the Emacs manual e055a12 NEWS update about 'string-trim' 96b6e24 Clarify TRAMP process-environment interaction (Bug#30419) 4fa467e * lisp/progmodes/grep.el (grep-num-matches-found): New variable. a22820a Avoid aborts in cm.c due to too small TTY frame 26f6441 Another set of improvements in the Emacs manual cef3b42 Fix help in mode-line-mode-menu f8a493c Improve documentation of desktop restoring 10637af Improve the Emacs manual's chapter "Frames" d924953 Fix unbound mm-uu-entry in mm-uu cb2487b Improve Emacs user manual in fixit.texi 66e9527 Another minor change in the manual 6a1c03d More minor changes in the Emacs manual 32fb8c4 Avoid printing garbled error message from image.el Conflicts: etc/NEWS lisp/image.el
-rw-r--r--doc/emacs/basic.texi22
-rw-r--r--doc/emacs/building.texi25
-rw-r--r--doc/emacs/cmdargs.texi17
-rw-r--r--doc/emacs/docstyle.texi6
-rw-r--r--doc/emacs/fixit.texi31
-rw-r--r--doc/emacs/frames.texi20
-rw-r--r--doc/emacs/glossary.texi58
-rw-r--r--doc/emacs/macos.texi6
-rw-r--r--doc/emacs/mark.texi2
-rw-r--r--doc/emacs/misc.texi31
-rw-r--r--doc/emacs/msdos-xtra.texi2
-rw-r--r--doc/emacs/msdos.texi8
-rw-r--r--doc/emacs/mule.texi34
-rw-r--r--doc/emacs/search.texi28
-rw-r--r--doc/emacs/trouble.texi2
-rw-r--r--doc/emacs/xresources.texi4
-rw-r--r--doc/misc/tramp.texi32
-rw-r--r--etc/NEWS.268
-rw-r--r--lisp/bindings.el2
-rw-r--r--lisp/gnus/mm-uu.el18
-rw-r--r--lisp/image.el2
-rw-r--r--lisp/progmodes/grep.el46
-rw-r--r--lisp/vc/vc.el2
-rw-r--r--src/frame.c31
24 files changed, 285 insertions, 152 deletions
diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi
index 8a8298bc2c4..4db3855dd9c 100644
--- a/doc/emacs/basic.texi
+++ b/doc/emacs/basic.texi
@@ -184,18 +184,8 @@ Move forward one character (@code{forward-char}).
184@item @key{RIGHT} 184@item @key{RIGHT}
185@kindex RIGHT 185@kindex RIGHT
186@findex right-char 186@findex right-char
187@vindex visual-order-cursor-movement 187This command (@code{right-char}) behaves like @kbd{C-f}, except when
188@cindex cursor, visual-order motion 188point is in a right-to-left paragraph (@pxref{Bidirectional Editing}).
189This command (@code{right-char}) behaves like @kbd{C-f}, with one
190exception: when editing right-to-left scripts such as Arabic, it
191instead moves @emph{backward} if the current paragraph is a
192right-to-left paragraph. @xref{Bidirectional Editing}.
193
194If @code{visual-order-cursor-movement} is non-@code{nil}, this command
195moves to the character that is to the right of the current screen
196position, moving to the next or previous screen line as appropriate.
197Note that this might potentially move point many buffer positions
198away, depending on the surrounding bidirectional context.
199 189
200@item C-b 190@item C-b
201@kindex C-b 191@kindex C-b
@@ -205,12 +195,8 @@ Move backward one character (@code{backward-char}).
205@item @key{LEFT} 195@item @key{LEFT}
206@kindex LEFT 196@kindex LEFT
207@findex left-char 197@findex left-char
208This command (@code{left-char}) behaves like @kbd{C-b}, except it 198This command (@code{left-char}) behaves like @kbd{C-b}, except if the
209moves @emph{forward} if the current paragraph is right-to-left. 199current paragraph is right-to-left (@pxref{Bidirectional Editing}).
210@xref{Bidirectional Editing}.
211
212The variable @code{visual-order-cursor-movement} affects this like
213@key{RIGHT}, but moving left instead of right on the screen.
214 200
215@item C-n 201@item C-n
216@itemx @key{DOWN} 202@itemx @key{DOWN}
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index f61e3335770..878d2f53d53 100644
--- a/doc/emacs/building.texi
+++ b/doc/emacs/building.texi
@@ -90,9 +90,9 @@ inserted above point, which remains at the end. Otherwise, point
90remains fixed while compilation output is added at the end of the 90remains fixed while compilation output is added at the end of the
91buffer. 91buffer.
92 92
93 While compilation proceeds, the mode line is updated to show the 93 While compilation proceeds, the mode line shows the number of
94number of errors, warnings, and informational messages that have been 94errors, warnings, and informational messages emitted by the compiler
95seen so far. 95so far.
96 96
97@cindex compilation buffer, keeping point at end 97@cindex compilation buffer, keeping point at end
98@vindex compilation-scroll-output 98@vindex compilation-scroll-output
@@ -384,16 +384,16 @@ grep -nH -e foo *.el | grep bar | grep toto
384can find the corresponding lines in the original files using @w{@kbd{C-x 384can find the corresponding lines in the original files using @w{@kbd{C-x
385`}}, @key{RET}, and so forth, just like compilation errors. 385`}}, @key{RET}, and so forth, just like compilation errors.
386 386
387 As with compilation commands (@pxref{Compilation}), while the grep
388command runs, the mode line is updated to show the number of matches
389that have been seen so far.
390
391 Some grep programs accept a @samp{--color} option to output special 387 Some grep programs accept a @samp{--color} option to output special
392markers around matches for the purpose of highlighting. You can make 388markers around matches for the purpose of highlighting. You can make
393use of this feature by setting @code{grep-highlight-matches} to 389use of this feature by setting @code{grep-highlight-matches} to
394@code{t}. When displaying a match in the source buffer, the exact 390@code{t}. When displaying a match in the source buffer, the exact
395match will be highlighted, instead of the entire source line. 391match will be highlighted, instead of the entire source line.
396 392
393 As with compilation commands (@pxref{Compilation}), while the grep
394command runs, the mode line shows the running number of matches found
395and highlighted so far.
396
397 The @command{grep} commands will offer to save buffers before 397 The @command{grep} commands will offer to save buffers before
398running. This is controlled by the @code{grep-save-buffers} variable. 398running. This is controlled by the @code{grep-save-buffers} variable.
399The possible values are either @code{nil} (don't save), @code{ask} 399The possible values are either @code{nil} (don't save), @code{ask}
@@ -1410,12 +1410,13 @@ Loading,,, elisp, the Emacs Lisp Reference Manual}.
1410@code{load-path}. Its value should be a list of directories 1410@code{load-path}. Its value should be a list of directories
1411(strings). These directories are searched, in the specified order, by 1411(strings). These directories are searched, in the specified order, by
1412the @kbd{M-x load-library} command, the lower-level @code{load} 1412the @kbd{M-x load-library} command, the lower-level @code{load}
1413function, and other Emacs functions that find Emacs Lisp libraries. A 1413function, and other Emacs functions that find Emacs Lisp libraries.
1414list entry in @code{load-path} can also have the special value 1414An entry in @code{load-path} can also have the special value
1415@code{nil}, which stands for the current default directory, but it is 1415@code{nil}, which stands for the current default directory, but it is
1416almost always a bad idea to use this. (If you find yourself wishing 1416almost always a bad idea to use this, because its meaning will depend
1417that @code{nil} were in the list, most likely what you really want is 1417on the buffer that is current when @code{load-path} is used by Emacs.
1418to use @kbd{M-x load-file}.) 1418(If you find yourself wishing that @code{nil} were in the list, most
1419likely what you really want is to use @kbd{M-x load-file}.)
1419 1420
1420 The default value of @code{load-path} is a list of directories where 1421 The default value of @code{load-path} is a list of directories where
1421the Lisp code for Emacs itself is stored. If you have libraries of 1422the Lisp code for Emacs itself is stored. If you have libraries of
diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi
index e463e7c8194..d18de8e7a02 100644
--- a/doc/emacs/cmdargs.texi
+++ b/doc/emacs/cmdargs.texi
@@ -1104,15 +1104,14 @@ border is 2.
1104@node Title X 1104@node Title X
1105@appendixsec Frame Titles 1105@appendixsec Frame Titles
1106 1106
1107 An Emacs frame may or may not have a specified title. The frame 1107 Each Emacs frame always has a title, which appears in window
1108title, if specified, appears in window decorations and icons as the 1108decorations and icons as the name of the frame. The default title is
1109name of the frame. If an Emacs frame has no specified title, the 1109of the form @samp{@var{invocation-name}@@@var{machine}} (if there is
1110default title has the form @samp{@var{invocation-name}@@@var{machine}} 1110only one frame) or shows the selected window's buffer name (if there
1111(if there is only one frame) or the selected window's buffer name (if 1111is more than one frame).
1112there is more than one frame). 1112
1113 1113 You can specify a non-default title for the initial Emacs frame with
1114 You can specify a title for the initial Emacs frame with a command 1114a command line option:
1115line option:
1116 1115
1117@table @samp 1116@table @samp
1118@item -T @var{title} 1117@item -T @var{title}
diff --git a/doc/emacs/docstyle.texi b/doc/emacs/docstyle.texi
index dfd14306b39..f682e3d82be 100644
--- a/doc/emacs/docstyle.texi
+++ b/doc/emacs/docstyle.texi
@@ -8,3 +8,9 @@
8@end ignore 8@end ignore
9@set txicodequoteundirected 9@set txicodequoteundirected
10@set txicodequotebacktick 10@set txicodequotebacktick
11@c It turns out TeX sometimes fails to hyphenate, so we help it here
12@hyphenation{au-to-mat-i-cal-ly}
13@hyphenation{spec-i-fied}
14@hyphenation{work-a-round}
15@hyphenation{work-a-rounds}
16@hyphenation{un-marked}
diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi
index c872e9bb3ac..7cacac42400 100644
--- a/doc/emacs/fixit.texi
+++ b/doc/emacs/fixit.texi
@@ -69,10 +69,10 @@ changes have already been undone, the undo command signals an error.
69 Any command other than an undo command breaks the sequence of undo 69 Any command other than an undo command breaks the sequence of undo
70commands. Starting from that moment, the entire sequence of undo 70commands. Starting from that moment, the entire sequence of undo
71commands that you have just performed are themselves placed into the 71commands that you have just performed are themselves placed into the
72undo record, as a single set of changes. Therefore, to re-apply 72undo record. Therefore, to re-apply changes you have undone, type
73changes you have undone, type @kbd{C-f} or any other command that 73@kbd{C-f} or any other command that harmlessly breaks the sequence of
74harmlessly breaks the sequence of undoing; then type @kbd{C-/} to undo 74undoing; then type @kbd{C-/} one or more times to undo some of the
75the undo command. 75undo commands.
76 76
77 Alternatively, if you want to resume undoing, without redoing 77 Alternatively, if you want to resume undoing, without redoing
78previous undo commands, use @kbd{M-x undo-only}. This is like 78previous undo commands, use @kbd{M-x undo-only}. This is like
@@ -180,7 +180,8 @@ Otherwise, a reverse search (@kbd{C-r}) is often the best way.
180dragging the word preceding or containing point forward as well. The 180dragging the word preceding or containing point forward as well. The
181punctuation characters between the words do not move. For example, 181punctuation characters between the words do not move. For example,
182@w{@samp{FOO, BAR}} transposes into @w{@samp{BAR, FOO}} rather than 182@w{@samp{FOO, BAR}} transposes into @w{@samp{BAR, FOO}} rather than
183@samp{@w{BAR FOO,}}. 183@samp{@w{BAR FOO,}}. When point is at the end of the line, it will
184transpose the word before point with the first word on the next line.
184 185
185 @kbd{C-M-t} (@code{transpose-sexps}) is a similar command for 186 @kbd{C-M-t} (@code{transpose-sexps}) is a similar command for
186transposing two expressions (@pxref{Expressions}), and @kbd{C-x C-t} 187transposing two expressions (@pxref{Expressions}), and @kbd{C-x C-t}
@@ -344,16 +345,16 @@ wildcard.
344 345
345@item C-g 346@item C-g
346@itemx X 347@itemx X
347Quit interactive spell checking, leaving point at the word that was 348Quit interactive spell-checking, leaving point at the word that was
348being checked. You can restart checking again afterward with @kbd{C-u 349being checked. You can restart checking again afterward with @kbd{C-u
349M-$}. 350M-$}.
350 351
351@item x 352@item x
352Quit interactive spell checking and move point back to where it was 353Quit interactive spell-checking and move point back to where it was
353when you started spell checking. 354when you started spell-checking.
354 355
355@item q 356@item q
356Quit interactive spell checking and kill the spell-checker subprocess. 357Quit interactive spell-checking and kill the spell-checker subprocess.
357 358
358@item ? 359@item ?
359Show the list of options. 360Show the list of options.
@@ -371,7 +372,7 @@ character; type that digit or character to choose it.
371@cindex @code{ispell} program 372@cindex @code{ispell} program
372@findex ispell-kill-ispell 373@findex ispell-kill-ispell
373 Once started, the spell-checker subprocess continues 374 Once started, the spell-checker subprocess continues
374to run, waiting for something to do, so that subsequent spell checking 375to run, waiting for something to do, so that subsequent spell-checking
375commands complete more quickly. If you want to get rid of the 376commands complete more quickly. If you want to get rid of the
376process, use @kbd{M-x ispell-kill-ispell}. This is not usually 377process, use @kbd{M-x ispell-kill-ispell}. This is not usually
377necessary, since the process uses no processor time except when you do 378necessary, since the process uses no processor time except when you do
@@ -392,19 +393,21 @@ so that it will use a different standard dictionary. Your personal
392dictionary is specified by the variable 393dictionary is specified by the variable
393@code{ispell-personal-dictionary}. If that is @code{nil}, the 394@code{ispell-personal-dictionary}. If that is @code{nil}, the
394spelling program looks for a personal dictionary in a default 395spelling program looks for a personal dictionary in a default
395location. 396location, which is specific to each spell-checker.
396 397
397@vindex ispell-complete-word-dict 398@vindex ispell-complete-word-dict
398 A separate dictionary is used for word completion. The variable 399 A separate dictionary is used for word completion. The variable
399@code{ispell-complete-word-dict} specifies the file name of this 400@code{ispell-complete-word-dict} specifies the file name of this
400dictionary. The completion dictionary must be different because it 401dictionary. The completion dictionary must be different because it
401cannot use root and affix information. For some languages, there 402cannot use the information about roots and affixes of the words, which
402is a spell checking dictionary but no word completion dictionary. 403spell-checking uses to detect variations of words. For some
404languages, there is a spell-checking dictionary but no word completion
405dictionary.
403 406
404@cindex Flyspell mode 407@cindex Flyspell mode
405@cindex mode, Flyspell 408@cindex mode, Flyspell
406@findex flyspell-mode 409@findex flyspell-mode
407 Flyspell mode is a minor mode that performs automatic spell checking 410 Flyspell mode is a minor mode that performs automatic spell-checking
408as you type. When it finds a word that it does not recognize, it 411as you type. When it finds a word that it does not recognize, it
409highlights that word. Type @kbd{M-x flyspell-mode} to toggle Flyspell 412highlights that word. Type @kbd{M-x flyspell-mode} to toggle Flyspell
410mode in the current buffer. To enable Flyspell mode in all text mode 413mode in the current buffer. To enable Flyspell mode in all text mode
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index afdfa6c39c1..b2ec5746a0e 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -248,13 +248,13 @@ this to move point to the beginning of the region, scrolling the
248display backward if necessary. 248display backward if necessary.
249 249
250@item Double-Drag-mouse-1 250@item Double-Drag-mouse-1
251Select the text you drag across, in the form of whole words. 251Select the text you drag across, in units of whole words.
252 252
253@item Triple-mouse-1 253@item Triple-mouse-1
254Select the line you click on. 254Select the line you click on.
255 255
256@item Triple-Drag-mouse-1 256@item Triple-Drag-mouse-1
257Select the text you drag across, in the form of whole lines. 257Select the text you drag across, in units of whole lines.
258@end table 258@end table
259 259
260@node Mouse References 260@node Mouse References
@@ -312,7 +312,7 @@ button.
312@node Menu Mouse Clicks 312@node Menu Mouse Clicks
313@section Mouse Clicks for Menus 313@section Mouse Clicks for Menus
314 314
315 Several mouse clicks with the @key{CTRL} and @key{SHIFT} modifiers 315 Several mouse clicks with the @key{Ctrl} and @key{SHIFT} modifiers
316bring up menus. 316bring up menus.
317 317
318@table @kbd 318@table @kbd
@@ -409,10 +409,11 @@ boundary to the left or right.
409 The prefix key @kbd{C-x 5} is analogous to @kbd{C-x 4}. Whereas 409 The prefix key @kbd{C-x 5} is analogous to @kbd{C-x 4}. Whereas
410each @kbd{C-x 4} command pops up a buffer in a different window in the 410each @kbd{C-x 4} command pops up a buffer in a different window in the
411selected frame (@pxref{Pop Up Window}), the @kbd{C-x 5} commands use a 411selected frame (@pxref{Pop Up Window}), the @kbd{C-x 5} commands use a
412different frame. If an existing visible or iconified (a.k.a.@: ``minimized'') 412different frame. If an existing visible or iconified (a.k.a.@:
413frame already displays the requested buffer, that frame is raised and 413``minimized'', @pxref{Visibility of Frames,,, elisp, The Emacs Lisp
414deiconified (``un-minimized''); otherwise, a new frame is created on 414Reference Manual}) frame already displays the requested buffer, that
415the current display terminal. 415frame is raised and deiconified (``un-minimized''); otherwise, a new
416frame is created on the current display terminal.
416 417
417 The various @kbd{C-x 5} commands differ in how they find or create the 418 The various @kbd{C-x 5} commands differ in how they find or create the
418buffer to select: 419buffer to select:
@@ -642,7 +643,7 @@ Monospace-12:weight=bold:slant=italic
642 643
643For a more detailed description of Fontconfig patterns, see the 644For a more detailed description of Fontconfig patterns, see the
644Fontconfig manual, which is distributed with Fontconfig and available 645Fontconfig manual, which is distributed with Fontconfig and available
645online at @url{http://fontconfig.org/fontconfig-user.html}. 646online at @url{https://fontconfig.org/fontconfig-user.html}.
646 647
647@cindex GTK font pattern 648@cindex GTK font pattern
648 The second way to specify a font is to use a @dfn{GTK font pattern}. 649 The second way to specify a font is to use a @dfn{GTK font pattern}.
@@ -954,7 +955,8 @@ toolkits allow you to customize the scroll bars to not have those
954buttons). Clicking @kbd{mouse-1} above or below the scroll bar's 955buttons). Clicking @kbd{mouse-1} above or below the scroll bar's
955inner box scrolls the window by nearly the entire height of the 956inner box scrolls the window by nearly the entire height of the
956window, like @kbd{M-v} and @kbd{C-v} respectively (@pxref{Moving 957window, like @kbd{M-v} and @kbd{C-v} respectively (@pxref{Moving
957Point}). Dragging the inner box scrolls continuously. 958Point}). (This, too, can behave differently with some toolkits.)
959Dragging the inner box scrolls continuously.
958 960
959 If Emacs is compiled on the X Window System without X toolkit 961 If Emacs is compiled on the X Window System without X toolkit
960support, the scroll bar behaves differently. Clicking @kbd{mouse-1} 962support, the scroll bar behaves differently. Clicking @kbd{mouse-1}
diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi
index 7a0dd6db750..a9120194a49 100644
--- a/doc/emacs/glossary.texi
+++ b/doc/emacs/glossary.texi
@@ -24,7 +24,7 @@ Setting the mark (q.v.@:) at a position in the text also activates it.
24When the mark is active, we call the region an active region. 24When the mark is active, we call the region an active region.
25@xref{Mark}. 25@xref{Mark}.
26 26
27@item Alt 27@item @key{Alt}
28Alt is the name of a modifier bit that a keyboard input character may 28Alt is the name of a modifier bit that a keyboard input character may
29have. To make a character Alt, type it while holding down the @key{Alt} 29have. To make a character Alt, type it while holding down the @key{Alt}
30key. Such characters are given names that start with @kbd{@key{Alt}-} 30key. Such characters are given names that start with @kbd{@key{Alt}-}
@@ -160,6 +160,12 @@ right away when you press down on a mouse button. @xref{Mouse Buttons}.
160@item Byte Compilation 160@item Byte Compilation
161@xref{Glossary---Compilation}. 161@xref{Glossary---Compilation}.
162 162
163@item cf.
164@itemx c.f.
165Short for ``confer'' in Latin, which means ``compare with'' or
166``compare to''. The second variant, ``c.f.'', is a widespread
167misspelling.
168
163@anchor{Glossary---C-} 169@anchor{Glossary---C-}
164@item @kbd{C-} 170@item @kbd{C-}
165@kbd{C-} in the name of a character is an abbreviation for Control. 171@kbd{C-} in the name of a character is an abbreviation for Control.
@@ -187,7 +193,7 @@ other input events as well). @xref{User Input}.
187 193
188@item Character Folding 194@item Character Folding
189Character folding means ignoring differences between similarly looking 195Character folding means ignoring differences between similarly looking
190characters, such as between @code{a}, and @code{@:a} and @code{@'a}. 196characters, such as between @code{a}, and @code{@"a} and @code{@'a}.
191Emacs performs character folding by default in text search. @xref{Lax 197Emacs performs character folding by default in text search. @xref{Lax
192Search}. 198Search}.
193 199
@@ -220,14 +226,16 @@ text to or from a variety of coding systems when reading or writing it.
220@xref{Coding Systems}. 226@xref{Coding Systems}.
221 227
222@item Command 228@item Command
223A command is a Lisp function specially defined to be able to serve as a 229A command is a Lisp function specially defined to be able to serve as
224key binding in Emacs. When you type a key sequence (q.v.), its 230a key binding in Emacs or to be invoked by its name
225binding (q.v.@:) is looked up in the relevant keymaps (q.v.@:) to find 231(@pxref{Glossary---Command Name}). When you type a key sequence
226the command to run. @xref{Commands}. 232(q.v.), its binding (q.v.@:) is looked up in the relevant keymaps
233(q.v.@:) to find the command to run. @xref{Commands}.
227 234
228@item Command History 235@item Command History
229@xref{Glossary---Minibuffer History}. 236@xref{Glossary---Minibuffer History}.
230 237
238@anchor{Glossary---Command Name}
231@item Command Name 239@item Command Name
232A command name is the name of a Lisp symbol that is a command 240A command name is the name of a Lisp symbol that is a command
233(@pxref{Commands}). You can invoke any command by its name using 241(@pxref{Commands}). You can invoke any command by its name using
@@ -250,7 +258,8 @@ Compilation is the process of creating an executable program from source
250code. Emacs has commands for compiling files of Emacs Lisp code 258code. Emacs has commands for compiling files of Emacs Lisp code
251(@pxref{Byte Compilation,,, elisp, the Emacs Lisp 259(@pxref{Byte Compilation,,, elisp, the Emacs Lisp
252Reference Manual}) and programs in C and other languages 260Reference Manual}) and programs in C and other languages
253(@pxref{Compilation}). 261(@pxref{Compilation}). Byte-compiled Emacs Lisp code loads and
262executes faster.
254 263
255@item Complete Key 264@item Complete Key
256A complete key is a key sequence that fully specifies one action to be 265A complete key is a key sequence that fully specifies one action to be
@@ -440,6 +449,9 @@ tell it to. @xref{Bugs}.
440@c TODO? Not really appropriate for the user manual I think. 449@c TODO? Not really appropriate for the user manual I think.
441@c Dynamic Binding 450@c Dynamic Binding
442 451
452@item e.g.
453Short for ``exempli gratia'' in Latin, which means ``for example''.
454
443@item Echo Area 455@item Echo Area
444The echo area is the bottom line of the screen, used for echoing the 456The echo area is the bottom line of the screen, used for echoing the
445arguments to commands, for asking questions, and showing brief messages 457arguments to commands, for asking questions, and showing brief messages
@@ -499,6 +511,9 @@ like the @key{SHIFT} key, is held down while another character is
499typed), you press the @key{ESC} key as you would press a letter key, and 511typed), you press the @key{ESC} key as you would press a letter key, and
500it applies to the next character you type. 512it applies to the next character you type.
501 513
514@item etc.
515Short for ``et cetera'' in Latin, which means ``and so on''.
516
502@item Expression 517@item Expression
503@xref{Glossary---Balanced Expression}. 518@xref{Glossary---Balanced Expression}.
504 519
@@ -709,6 +724,9 @@ have. To make a character Hyper, type it while holding down the
709@key{Hyper} key. Such characters are given names that start with 724@key{Hyper} key. Such characters are given names that start with
710@kbd{Hyper-} (usually written @kbd{H-} for short). @xref{User Input}. 725@kbd{Hyper-} (usually written @kbd{H-} for short). @xref{User Input}.
711 726
727@item i.e.
728Short for ``id est'' in Latin, which means ``that is''.
729
712@item Iff 730@item Iff
713``Iff'' means ``if and only if''. This terminology comes from 731``Iff'' means ``if and only if''. This terminology comes from
714mathematics. Try to avoid using this term in documentation, since 732mathematics. Try to avoid using this term in documentation, since
@@ -861,7 +879,7 @@ A local value of a variable (q.v.@:) applies to only one buffer.
861@xref{Locals}. 879@xref{Locals}.
862 880
863@item @kbd{M-} 881@item @kbd{M-}
864@kbd{M-} in the name of a character is an abbreviation for @key{Meta}, 882@kbd{M-} in the name of a character is an abbreviation for @key{META},
865one of the modifier keys that can accompany any character. 883one of the modifier keys that can accompany any character.
866@xref{User Input,M-}. 884@xref{User Input,M-}.
867 885
@@ -919,15 +937,15 @@ a keyboard interface to navigate it. @xref{Menu Bars}.
919 937
920@item Meta 938@item Meta
921Meta is the name of a modifier bit which you can use in a command 939Meta is the name of a modifier bit which you can use in a command
922character. To enter a meta character, you hold down the @key{Meta} 940character. To enter a meta character, you hold down the @key{META}
923key while typing the character. We refer to such characters with 941key while typing the character. We refer to such characters with
924names that start with @kbd{Meta-} (usually written @kbd{M-} for 942names that start with @kbd{Meta-} (usually written @kbd{M-} for
925short). For example, @kbd{M-<} is typed by holding down @key{Meta} 943short). For example, @kbd{M-<} is typed by holding down @key{META}
926and at the same time typing @kbd{<} (which itself is done, on most 944and at the same time typing @kbd{<} (which itself is done, on most
927terminals, by holding down @key{SHIFT} and typing @kbd{,}). 945terminals, by holding down @key{SHIFT} and typing @kbd{,}).
928@xref{User Input,Meta}. 946@xref{User Input,Meta}.
929 947
930On some terminals, the @key{Meta} key is actually labeled @key{Alt} 948On some terminals, the @key{META} key is actually labeled @key{Alt}
931or @key{Edit}. 949or @key{Edit}.
932 950
933@item Meta Character 951@item Meta Character
@@ -1082,6 +1100,9 @@ read an argument (@pxref{Minibuffer}); the echoing that happens when
1082you pause in the middle of typing a multi-character key sequence is also 1100you pause in the middle of typing a multi-character key sequence is also
1083a kind of prompting (@pxref{Echo Area}). 1101a kind of prompting (@pxref{Echo Area}).
1084 1102
1103@item q.v.
1104Short for ``quod vide'' in Latin, which means ``which see''.
1105
1085@item Query-Replace 1106@item Query-Replace
1086Query-replace is an interactive string replacement feature provided by 1107Query-replace is an interactive string replacement feature provided by
1087Emacs. @xref{Query Replace}. 1108Emacs. @xref{Query Replace}.
@@ -1122,8 +1143,8 @@ one corner and putting the mark at the diagonally opposite corner.
1122A recursive editing level is a state in which part of the execution of 1143A recursive editing level is a state in which part of the execution of
1123a command involves asking you to edit some text. This text may 1144a command involves asking you to edit some text. This text may
1124or may not be the same as the text to which the command was applied. 1145or may not be the same as the text to which the command was applied.
1125The mode line indicates recursive editing levels with square brackets 1146The mode line (q.v.@:) indicates recursive editing levels with square
1126(@samp{[} and @samp{]}). @xref{Recursive Edit}. 1147brackets (@samp{[} and @samp{]}). @xref{Recursive Edit}.
1127 1148
1128@item Redisplay 1149@item Redisplay
1129Redisplay is the process of correcting the image on the screen to 1150Redisplay is the process of correcting the image on the screen to
@@ -1151,7 +1172,7 @@ digits. @xref{Regexps}.
1151@item Remote File 1172@item Remote File
1152A remote file is a file that is stored on a system other than your own. 1173A remote file is a file that is stored on a system other than your own.
1153Emacs can access files on other computers provided that they are 1174Emacs can access files on other computers provided that they are
1154connected to the same network as your machine, and (obviously) that 1175reachable from your machine over the network, and (obviously) that
1155you have a supported method to gain access to those files. 1176you have a supported method to gain access to those files.
1156@xref{Remote Files}. 1177@xref{Remote Files}.
1157 1178
@@ -1173,8 +1194,9 @@ newline into the text. It is also used to terminate most arguments
1173read in the minibuffer (q.v.). @xref{User Input,Return}. 1194read in the minibuffer (q.v.). @xref{User Input,Return}.
1174 1195
1175@item Reverting 1196@item Reverting
1176Reverting means returning to the original state. Emacs lets you 1197Reverting means returning to the original state. For example, Emacs
1177revert a buffer by re-reading its file from disk. @xref{Reverting}. 1198lets you revert a buffer by re-reading its file from disk.
1199@xref{Reverting}.
1178 1200
1179@c Seems too obvious, also there is nothing special about the format 1201@c Seems too obvious, also there is nothing special about the format
1180@c these days. 1202@c these days.
@@ -1346,6 +1368,7 @@ Emacs does not make a termscript file unless you tell it to.
1346@xref{Bugs}. 1368@xref{Bugs}.
1347 1369
1348@item Text 1370@item Text
1371
1349``Text'' has two meanings (@pxref{Text}): 1372``Text'' has two meanings (@pxref{Text}):
1350 1373
1351@itemize @bullet 1374@itemize @bullet
@@ -1354,6 +1377,7 @@ Data consisting of a sequence of characters, as opposed to binary
1354numbers, executable programs, and the like. The basic contents of an 1377numbers, executable programs, and the like. The basic contents of an
1355Emacs buffer (aside from the text properties, q.v.@:) are always text 1378Emacs buffer (aside from the text properties, q.v.@:) are always text
1356in this sense. 1379in this sense.
1380
1357@item 1381@item
1358Data consisting of written human language (as opposed to programs), 1382Data consisting of written human language (as opposed to programs),
1359or following the stylistic conventions of human language. 1383or following the stylistic conventions of human language.
@@ -1456,7 +1480,7 @@ where they can be edited. @xref{Visiting}.
1456 1480
1457@item Whitespace 1481@item Whitespace
1458Whitespace is any run of consecutive formatting characters (space, 1482Whitespace is any run of consecutive formatting characters (space,
1459tab, newline, and backspace). 1483tab, newline, backspace, etc.).
1460 1484
1461@item Widening 1485@item Widening
1462Widening is removing any restriction (q.v.@:) on the current buffer; 1486Widening is removing any restriction (q.v.@:) on the current buffer;
diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi
index 28a5f9041ab..bf37d67b642 100644
--- a/doc/emacs/macos.texi
+++ b/doc/emacs/macos.texi
@@ -34,8 +34,8 @@ Support}), but we hope to improve it in the future.
34@node Mac / GNUstep Basics 34@node Mac / GNUstep Basics
35@section Basic Emacs usage under macOS and GNUstep 35@section Basic Emacs usage under macOS and GNUstep
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 key bindings 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}).
@@ -43,7 +43,7 @@ can change these bindings in the usual way (@pxref{Key Bindings}).
43@vindex ns-alternate-modifier 43@vindex ns-alternate-modifier
44@vindex ns-right-alternate-modifier 44@vindex ns-right-alternate-modifier
45 The variable @code{ns-right-alternate-modifier} controls the 45 The variable @code{ns-right-alternate-modifier} controls the
46behavior of the right @key{alt} and @key{option} keys. These keys 46behavior of the right @key{Alt} and @key{Option} keys. These keys
47behave like the left-hand keys if the value is @code{left} (the 47behave like the left-hand keys if the value is @code{left} (the
48default). A value of @code{control}, @code{meta}, @code{alt}, 48default). A value of @code{control}, @code{meta}, @code{alt},
49@code{super}, or @code{hyper} makes them behave like the corresponding 49@code{super}, or @code{hyper} makes them behave like the corresponding
diff --git a/doc/emacs/mark.texi b/doc/emacs/mark.texi
index 7cb48a67e7c..0ffa9f74ac6 100644
--- a/doc/emacs/mark.texi
+++ b/doc/emacs/mark.texi
@@ -260,7 +260,7 @@ change the variable @code{use-empty-active-region} to @code{t}.
260 260
261@vindex delete-active-region 261@vindex delete-active-region
262 As described in @ref{Erasing}, the @key{DEL} 262 As described in @ref{Erasing}, the @key{DEL}
263(@code{backward-delete-char}) and @key{delete} 263(@code{backward-delete-char}) and @key{Delete}
264(@code{delete-forward-char}) commands also act this way. If the mark 264(@code{delete-forward-char}) commands also act this way. If the mark
265is active, they delete the text in the region. (As an exception, if 265is active, they delete the text in the region. (As an exception, if
266you supply a numeric argument @var{n}, where @var{n} is not one, these 266you supply a numeric argument @var{n}, where @var{n} is not one, these
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 5babd5081a9..ae6f9446f28 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -2485,7 +2485,7 @@ since it bypasses the init file, where @code{desktop-save-mode} is
2485usually turned on. 2485usually turned on.
2486 2486
2487@vindex desktop-restore-eager 2487@vindex desktop-restore-eager
2488 By default, all the buffers in the desktop are restored at one go. 2488 By default, all the buffers in the desktop are restored in one go.
2489However, this may be slow if there are a lot of buffers in the 2489However, this may be slow if there are a lot of buffers in the
2490desktop. You can specify the maximum number of buffers to restore 2490desktop. You can specify the maximum number of buffers to restore
2491immediately with the variable @code{desktop-restore-eager}; the 2491immediately with the variable @code{desktop-restore-eager}; the
@@ -2504,6 +2504,35 @@ expression matching the names of buffers not to kill.
2504 If you want to save minibuffer history from one session to 2504 If you want to save minibuffer history from one session to
2505another, use the @code{savehist} library. 2505another, use the @code{savehist} library.
2506 2506
2507@vindex desktop-auto-save-timeout
2508 While Emacs runs with @code{desktop-save-mode} turned on, it by
2509default auto-saves the desktop whenever any of it changes. The
2510variable @code{desktop-auto-save-timeout} determines how frequently
2511Emacs checks for modifications to your desktop.
2512
2513@vindex desktop-load-locked-desktop
2514 The file in which Emacs saves the desktop is locked while the
2515session runs, to avoid inadvertently overwriting it from another Emacs
2516session. That lock is normally removed when Emacs exits, but if Emacs
2517or your system crashes, the lock stays, and when you restart Emacs, it
2518will by default ask you whether to use the locked desktop file. You
2519can avoid the question by customizing the variable
2520@code{desktop-load-locked-desktop} to either @code{nil}, which means
2521never load the desktop in this case, or @code{t}, which means load the
2522desktop without asking.
2523
2524@cindex desktop restore in daemon mode
2525 When Emacs starts in daemon mode, it cannot ask you any questions,
2526so if it finds the desktop file locked, it will not load it, unless
2527@code{desktop-load-locked-desktop} is @code{t}. Note that restoring
2528the desktop in daemon mode is somewhat problematic for other reasons:
2529e.g., the daemon cannot use GUI features, so parameters such as frame
2530position, size, and decorations cannot be restored. For that reason,
2531you may wish to delay restoring the desktop in daemon mode until the
2532first client connects, by calling @code{desktop-read} in a hook
2533function that you add to @code{after-make-frame-functions}
2534(@pxref{Creating Frames,,, elisp, The Emacs Lisp Reference Manual}).
2535
2507@node Recursive Edit 2536@node Recursive Edit
2508@section Recursive Editing Levels 2537@section Recursive Editing Levels
2509@cindex recursive editing level 2538@cindex recursive editing level
diff --git a/doc/emacs/msdos-xtra.texi b/doc/emacs/msdos-xtra.texi
index 541e29aa25f..39d003c453c 100644
--- a/doc/emacs/msdos-xtra.texi
+++ b/doc/emacs/msdos-xtra.texi
@@ -84,7 +84,7 @@ a running command and for emergency escape
84@vindex dos-super-key 84@vindex dos-super-key
85@vindex dos-hyper-key 85@vindex dos-hyper-key
86 The PC keyboard maps use the left @key{Alt} key as the @key{META} key. 86 The PC keyboard maps use the left @key{Alt} key as the @key{META} key.
87You have two choices for emulating the @key{SUPER} and @key{HYPER} keys: 87You have two choices for emulating the @key{SUPER} and @key{Hyper} keys:
88choose either the right @key{Ctrl} key or the right @key{Alt} key by 88choose either the right @key{Ctrl} key or the right @key{Alt} key by
89setting the variables @code{dos-hyper-key} and @code{dos-super-key} to 1 89setting the variables @code{dos-hyper-key} and @code{dos-super-key} to 1
90or 2 respectively. If neither @code{dos-super-key} nor 90or 2 respectively. If neither @code{dos-super-key} nor
diff --git a/doc/emacs/msdos.texi b/doc/emacs/msdos.texi
index 9c47f47a736..dd368adb54a 100644
--- a/doc/emacs/msdos.texi
+++ b/doc/emacs/msdos.texi
@@ -430,9 +430,9 @@ names, which might cause misalignment of columns in Dired display.
430 The Windows equivalent of @code{HOME} is the @dfn{user-specific 430 The Windows equivalent of @code{HOME} is the @dfn{user-specific
431application data directory}. The actual location depends on the 431application data directory}. The actual location depends on the
432Windows version; typical values are @file{C:\Documents and 432Windows version; typical values are @file{C:\Documents and
433Settings\@var{username}\Application Data} on Windows 2000/XP/2K3, 433Settings\@var{username}\Application Data} on Windows 2000 up to XP,
434@file{C:\Users\@var{username}\AppData\Roaming} on Windows 434@file{C:\Users\@var{username}\AppData\Roaming} on Windows Vista and
435Vista/7/2008, and either @file{C:\WINDOWS\Application Data} or 435later, and either @file{C:\WINDOWS\Application Data} or
436@file{C:\WINDOWS\Profiles\@var{username}\Application Data} on Windows 436@file{C:\WINDOWS\Profiles\@var{username}\Application Data} on Windows
4379X/ME@. If this directory does not exist or cannot be accessed, Emacs 4379X/ME@. If this directory does not exist or cannot be accessed, Emacs
438falls back to @file{C:\} as the default value of @code{HOME}. 438falls back to @file{C:\} as the default value of @code{HOME}.
@@ -575,7 +575,7 @@ keys (it converts lower-case characters to their upper-case
575variants). However, if you set the variable 575variants). However, if you set the variable
576@code{w32-capslock-is-shiftlock} to a non-@code{nil} value, the 576@code{w32-capslock-is-shiftlock} to a non-@code{nil} value, the
577@key{CapsLock} key will affect non-character keys as well, as if you 577@key{CapsLock} key will affect non-character keys as well, as if you
578pressed the @key{Shift} key while typing the non-character key. 578pressed the @key{SHIFT} key while typing the non-character key.
579 579
580@vindex w32-enable-caps-lock 580@vindex w32-enable-caps-lock
581 If the variable @code{w32-enable-caps-lock} is set to a @code{nil} 581 If the variable @code{w32-enable-caps-lock} is set to a @code{nil}
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi
index 4989982eca0..dc80bc92172 100644
--- a/doc/emacs/mule.texi
+++ b/doc/emacs/mule.texi
@@ -1841,7 +1841,33 @@ sometimes jump when point traverses reordered bidirectional text.
1841Similarly, a highlighted region covering a contiguous range of 1841Similarly, a highlighted region covering a contiguous range of
1842character positions may look discontinuous if the region spans 1842character positions may look discontinuous if the region spans
1843reordered text. This is normal and similar to the behavior of other 1843reordered text. This is normal and similar to the behavior of other
1844programs that support bidirectional text. If you set 1844programs that support bidirectional text.
1845@code{visual-order-cursor-movement} to a non-@code{nil} value, cursor 1845
1846motion by the arrow keys follows the visual order on screen 1846@kindex RIGHT@r{, and bidirectional text}
1847(@pxref{Moving Point, visual-order movement}). 1847@kindex LEFT@r{, and bidirectional text}
1848@findex right-char@r{, and bidirectional text}
1849@findex left-char@r{, and bidirectional text}
1850 Cursor motion commands bound to arrow keys, such as @key{LEFT} and
1851@kbd{C-@key{RIGHT}}, are sensitive to the base direction of the
1852current paragraph. In a left-to-right paragraph, commands bound to
1853@key{RIGHT} with or without modifiers move @emph{forward} through
1854buffer text, but in a right-to-left paragraph they move
1855@emph{backward} instead. This reflects the fact that in a
1856right-to-left paragraph buffer positions predominantly increase when
1857moving to the left on display.
1858
1859 When you move out of a paragraph, the meaning of the arrow keys
1860might change if the base direction of the preceding or the following
1861paragraph is different from the paragraph out of which you moved.
1862When that happens, you need to adjust the arrow key you press to the
1863new base direction.
1864
1865@vindex visual-order-cursor-movement
1866@cindex cursor, visual-order motion
1867 By default, @key{LEFT} and @key{RIGHT} move in the logical order,
1868but if @code{visual-order-cursor-movement} is non-@code{nil}, these
1869commands move to the character that is, correspondingly, to the left
1870or right of the current screen position, moving to the next or
1871previous screen line as appropriate. Note that this might potentially
1872move point many buffer positions away, depending on the surrounding
1873bidirectional context.
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index c0adab497ba..51a06851977 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -1114,7 +1114,8 @@ matches the empty string, but only at the beginning of a symbol.
1114A symbol is a sequence of one or more symbol-constituent characters. 1114A symbol is a sequence of one or more symbol-constituent characters.
1115A symbol-constituent character is a character whose syntax is either 1115A symbol-constituent character is a character whose syntax is either
1116@samp{w} or @samp{_}. @samp{\_<} matches at the beginning of the 1116@samp{w} or @samp{_}. @samp{\_<} matches at the beginning of the
1117buffer only if a symbol-constituent character follows. 1117buffer only if a symbol-constituent character follows. As with words,
1118the syntax table determines which characters are symbol-constituent.
1118 1119
1119@item \_> 1120@item \_>
1120matches the empty string, but only at the end of a symbol. @samp{\_>} 1121matches the empty string, but only at the end of a symbol. @samp{\_>}
@@ -1214,7 +1215,7 @@ search string matches exactly one space.
1214 Searches in Emacs by default ignore the case of the text they are 1215 Searches in Emacs by default ignore the case of the text they are
1215searching through, if you specify the search string in lower case. 1216searching through, if you specify the search string in lower case.
1216Thus, if you specify searching for @samp{foo}, then @samp{Foo} and 1217Thus, if you specify searching for @samp{foo}, then @samp{Foo} and
1217@samp{foo} also match. Regexps, and in particular character sets, 1218@samp{fOO} also match. Regexps, and in particular character sets,
1218behave likewise: @samp{[ab]} matches @samp{a} or @samp{A} or @samp{b} 1219behave likewise: @samp{[ab]} matches @samp{a} or @samp{A} or @samp{b}
1219or @samp{B}. This feature is known as @dfn{case folding}, and it is 1220or @samp{B}. This feature is known as @dfn{case folding}, and it is
1220supported in both incremental and non-incremental search modes. 1221supported in both incremental and non-incremental search modes.
@@ -1226,9 +1227,9 @@ case-sensitive. Thus, searching for @samp{Foo} does not find
1226as well as to literal string search. The effect ceases if you delete 1227as well as to literal string search. The effect ceases if you delete
1227the upper-case letter from the search string. The variable 1228the upper-case letter from the search string. The variable
1228@code{search-upper-case} controls this: if it is non-@code{nil} (the 1229@code{search-upper-case} controls this: if it is non-@code{nil} (the
1229default), an upper-case character in the search string make the search 1230default), an upper-case character in the search string makes the
1230case-sensitive; setting it to @code{nil} disables this effect of 1231search case-sensitive; setting it to @code{nil} disables this effect
1231upper-case characters. 1232of upper-case characters.
1232 1233
1233@vindex case-fold-search 1234@vindex case-fold-search
1234 If you set the variable @code{case-fold-search} to @code{nil}, then 1235 If you set the variable @code{case-fold-search} to @code{nil}, then
@@ -1349,7 +1350,7 @@ activating the mark; use @kbd{C-u C-@key{SPC}} to move back there.
1349surrounded by word boundaries. 1350surrounded by word boundaries.
1350 1351
1351 @xref{Replacement and Lax Matches}, for details about 1352 @xref{Replacement and Lax Matches}, for details about
1352case-sensitivity in replace commands. 1353case-sensitivity and character folding in replace commands.
1353 1354
1354@node Regexp Replace 1355@node Regexp Replace
1355@subsection Regexp Replacement 1356@subsection Regexp Replacement
@@ -1411,13 +1412,14 @@ symbol name goes with the symbol name, so the value replaces them
1411both. 1412both.
1412 1413
1413 Inside such an expression, you can use some special sequences. 1414 Inside such an expression, you can use some special sequences.
1414@samp{\&} and @samp{\@var{n}} refer here, as usual, to the entire 1415@samp{\&} and @samp{\@var{d}} refer here, as usual, to the entire
1415match as a string, and to a submatch as a string. @var{n} may be 1416match as a string, and to a submatch as a string. @var{d} may be
1416multiple digits, and the value of @samp{\@var{n}} is @code{nil} if 1417multiple digits, and the value of @samp{\@var{d}} is @code{nil} if the
1417subexpression @var{n} did not match. You can also use @samp{\#&} and 1418@var{d}'th parenthesized grouping did not match. You can also use
1418@samp{\#@var{n}} to refer to those matches as numbers (this is valid 1419@samp{\#&} and @samp{\#@var{d}} to refer to those matches as numbers
1419when the match or submatch has the form of a numeral). @samp{\#} here 1420(this is valid when the match or submatch has the form of a numeral).
1420too stands for the number of already-completed replacements. 1421@samp{\#} here too stands for the number of already-completed
1422replacements.
1421 1423
1422 Repeating our example to exchange @samp{x} and @samp{y}, we can thus 1424 Repeating our example to exchange @samp{x} and @samp{y}, we can thus
1423do it also this way: 1425do it also this way:
diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi
index 2edeb05f9e0..330497c4ea9 100644
--- a/doc/emacs/trouble.texi
+++ b/doc/emacs/trouble.texi
@@ -1322,7 +1322,7 @@ the Emacs Lisp Reference Manual
1322@url{https://www.gnu.org/software/emacs} 1322@url{https://www.gnu.org/software/emacs}
1323 1323
1324@item 1324@item
1325@url{http://www.emacswiki.org/} 1325@url{https://www.emacswiki.org/}
1326@end itemize 1326@end itemize
1327 1327
1328@menu 1328@menu
diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi
index d58c6b905eb..ee59551a6a6 100644
--- a/doc/emacs/xresources.texi
+++ b/doc/emacs/xresources.texi
@@ -512,7 +512,7 @@ those are governed by normal X resources (@pxref{Resources}).
512 512
513 The following sections describe how to customize GTK+ resources for 513 The following sections describe how to customize GTK+ resources for
514Emacs. For details about GTK+ resources, see the GTK+ API document at 514Emacs. For details about GTK+ resources, see the GTK+ API document at
515@uref{http://developer.gnome.org/gtk2/stable/gtk2-Resource-Files.html}. 515@uref{https://developer.gnome.org/gtk2/stable/gtk2-Resource-Files.html}.
516 516
517 In GTK+ version 3, GTK+ resources have been replaced by a completely 517 In GTK+ version 3, GTK+ resources have been replaced by a completely
518different system. The appearance of GTK+ widgets is now determined by 518different system. The appearance of GTK+ widgets is now determined by
@@ -522,7 +522,7 @@ style settings (where @var{theme} is the name of the current GTK+
522theme). Therefore, the description of GTK+ resources in this section 522theme). Therefore, the description of GTK+ resources in this section
523does not apply to GTK+ 3. For details about the GTK+ 3 styling 523does not apply to GTK+ 3. For details about the GTK+ 3 styling
524system, see 524system, see
525@uref{http://developer.gnome.org/gtk3/3.0/GtkCssProvider.html}. 525@uref{https://developer.gnome.org/gtk3/3.0/GtkCssProvider.html}.
526 526
527@menu 527@menu
528* GTK Resource Basics:: Basic usage of GTK+ resources. 528* GTK Resource Basics:: Basic usage of GTK+ resources.
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index ae544b08712..e21df5ac39b 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -681,6 +681,7 @@ In case both @command{mimencode} and @command{uuencode} are
681unavailable, @value{tramp} first transfers a small Perl program to the 681unavailable, @value{tramp} first transfers a small Perl program to the
682remote host, and then tries that program for encoding and decoding. 682remote host, and then tries that program for encoding and decoding.
683 683
684@vindex tramp-inline-compress-start-size
684To increase transfer speeds for large text files, use compression 685To increase transfer speeds for large text files, use compression
685before encoding. The user option 686before encoding. The user option
686@option{tramp-inline-compress-start-size} specifies the file size for 687@option{tramp-inline-compress-start-size} specifies the file size for
@@ -1023,6 +1024,7 @@ can.
1023@cindex @option{adb} method 1024@cindex @option{adb} method
1024@cindex android (with @option{adb} method) 1025@cindex android (with @option{adb} method)
1025 1026
1027@vindex tramp-adb-program
1026This method uses Android Debug Bridge program for accessing Android 1028This method uses Android Debug Bridge program for accessing Android
1027devices. The Android Debug Bridge must be installed locally for 1029devices. The Android Debug Bridge must be installed locally for
1028@value{tramp} to work. Some GNU/Linux distributions provide Android 1030@value{tramp} to work. Some GNU/Linux distributions provide Android
@@ -1031,6 +1033,7 @@ is installed as part of the Android SDK@. @value{tramp} finds the
1031@command{adb} program either via the @env{PATH} environment variable 1033@command{adb} program either via the @env{PATH} environment variable
1032or the absolute path set in the user option @option{tramp-adb-program}. 1034or the absolute path set in the user option @option{tramp-adb-program}.
1033 1035
1036@vindex tramp-adb-connect-if-not-connected
1034@value{tramp} connects to Android devices with @option{adb} only when 1037@value{tramp} connects to Android devices with @option{adb} only when
1035the user option @option{tramp-adb-connect-if-not-connected} is not 1038the user option @option{tramp-adb-connect-if-not-connected} is not
1036@code{nil}. Otherwise, the connection must be established outside 1039@code{nil}. Otherwise, the connection must be established outside
@@ -1696,6 +1699,7 @@ Set @code{password-cache} to @code{nil} to disable password caching.
1696@cindex caching 1699@cindex caching
1697@vindex tramp-persistency-file-name 1700@vindex tramp-persistency-file-name
1698 1701
1702@vindex tramp-persistency-file-name
1699For faster initial connection times, @value{tramp} stores previous 1703For faster initial connection times, @value{tramp} stores previous
1700connection properties in a file specified by the user option 1704connection properties in a file specified by the user option
1701@option{tramp-persistency-file-name}. 1705@option{tramp-persistency-file-name}.
@@ -1898,6 +1902,7 @@ prompts, for which @value{tramp} uses @option{tramp-wrong-passwd-regexp}.
1898@cindex @command{tset} unix command 1902@cindex @command{tset} unix command
1899@vindex tramp-terminal-type 1903@vindex tramp-terminal-type
1900 1904
1905@vindex tramp-terminal-type
1901To suppress inappropriate prompts for terminal type, @value{tramp} 1906To suppress inappropriate prompts for terminal type, @value{tramp}
1902sets the @env{TERM} to @code{dumb} before the remote login process 1907sets the @env{TERM} to @code{dumb} before the remote login process
1903begins via the user option @option{tramp-terminal-type}. This will 1908begins via the user option @option{tramp-terminal-type}. This will
@@ -2171,6 +2176,8 @@ Disabling backups can be targeted to just the @option{su} and
2171@end group 2176@end group
2172@end lisp 2177@end lisp
2173 2178
2179@vindex backup-directory-alist
2180@vindex tramp-backup-directory-alist
2174Another option is to create better backup file naming with user and 2181Another option is to create better backup file naming with user and
2175host names prefixed to the file name. For example, transforming 2182host names prefixed to the file name. For example, transforming
2176@file{/etc/secretfile} to 2183@file{/etc/secretfile} to
@@ -2204,6 +2211,7 @@ The backup file name of
2204@file{@trampfn{su,root@@localhost,~/.emacs.d/backups/![su!root@@localhost]!etc!secretfile~}} 2211@file{@trampfn{su,root@@localhost,~/.emacs.d/backups/![su!root@@localhost]!etc!secretfile~}}
2205@end ifset 2212@end ifset
2206 2213
2214@vindex auto-save-file-name-transforms
2207Just as for backup files, similar issues of file naming affect 2215Just as for backup files, similar issues of file naming affect
2208auto-saving @value{tramp} files. Auto-saved files are saved in the 2216auto-saving @value{tramp} files. Auto-saved files are saved in the
2209directory specified by the user option 2217directory specified by the user option
@@ -2215,6 +2223,7 @@ compiled. Reset such values to a valid directory.
2215Set @option{auto-save-file-name-transforms} to @code{nil} to save 2223Set @option{auto-save-file-name-transforms} to @code{nil} to save
2216auto-saved files to the same directory as the original file. 2224auto-saved files to the same directory as the original file.
2217 2225
2226@vindex tramp-auto-save-directory
2218Alternatively, set the user option @option{tramp-auto-save-directory} 2227Alternatively, set the user option @option{tramp-auto-save-directory}
2219to direct all auto saves to that location. 2228to direct all auto saves to that location.
2220 2229
@@ -2615,6 +2624,7 @@ upon first connection. Alternatively, use an absolute path or extend
2615@end group 2624@end group
2616@end lisp 2625@end lisp
2617 2626
2627@vindex tramp-remote-process-environment
2618Customize user option @option{tramp-remote-process-environment} to 2628Customize user option @option{tramp-remote-process-environment} to
2619suit the remote program's environment for the remote host. 2629suit the remote program's environment for the remote host.
2620@option{tramp-remote-process-environment} is a list of strings 2630@option{tramp-remote-process-environment} is a list of strings
@@ -2660,11 +2670,13 @@ this. You could overwrite this behavior by evaluating
2660@end group 2670@end group
2661@end lisp 2671@end lisp
2662 2672
2663@value{tramp} does not use the defaults specified in 2673In addition to @option{tramp-remote-process-environment}, you can set
2664@code{process-environment} for running @code{process-file} or 2674environment variables for invidivual remote process calls by
2665@code{start-file-process} on remote hosts. When values from 2675let-binding @code{process-environment}. @value{tramp} will apply any
2666@code{process-environment} are needed for remote processes, then set 2676entries which are not present in the global default value of
2667them as follows: 2677@code{process-environment} (overriding
2678@option{tramp-remote-process-environment} settings, if they conflict).
2679For example:
2668 2680
2669@lisp 2681@lisp
2670@group 2682@group
@@ -2673,8 +2685,10 @@ them as follows:
2673@end group 2685@end group
2674@end lisp 2686@end lisp
2675 2687
2676This works only for environment variables not already set in the 2688Let-binding in this way works regardless of whether the process to be
2677@code{process-environment}. 2689called is local or remote, since @value{tramp} would add just the
2690@env{HGPLAIN} setting and local processes would take whole value of
2691@code{process-environment} along with the new value of @env{HGPLAIN}.
2678 2692
2679For integrating other Emacs packages so @value{tramp} can execute 2693For integrating other Emacs packages so @value{tramp} can execute
2680remotely, please file a bug report. @xref{Bug Reports}. 2694remotely, please file a bug report. @xref{Bug Reports}.
@@ -3507,6 +3521,7 @@ the following code in @file{~/.emacs} file.
3507How to get a Visual Warning when working with @samp{root} privileges? 3521How to get a Visual Warning when working with @samp{root} privileges?
3508Host indication in the mode line? 3522Host indication in the mode line?
3509 3523
3524@vindex tramp-theme-face-remapping-alist
3510Install @file{tramp-theme} from GNU ELPA via Emacs' Package Manager. 3525Install @file{tramp-theme} from GNU ELPA via Emacs' Package Manager.
3511Enable it via @kbd{M-x load-theme @key{RET} tramp}. Further 3526Enable it via @kbd{M-x load-theme @key{RET} tramp}. Further
3512customization is explained in user option 3527customization is explained in user option
@@ -3534,10 +3549,11 @@ then set them with a hook as follows:
3534@item 3549@item
3535Why is @file{~/.sh_history} file on the remote host growing? 3550Why is @file{~/.sh_history} file on the remote host growing?
3536 3551
3552@vindex tramp-histfile-override
3537Due to the remote shell saving tilde expansions triggered by 3553Due to the remote shell saving tilde expansions triggered by
3538@value{tramp}, the history file is probably growing rapidly. 3554@value{tramp}, the history file is probably growing rapidly.
3539@value{tramp} can suppress this behaviour with the user option 3555@value{tramp} can suppress this behaviour with the user option
3540@code{tramp-histfile-override}. When set to @code{t}, environment 3556@option{tramp-histfile-override}. When set to @code{t}, environment
3541variable @env{HISTFILE} is unset, and environment variables 3557variable @env{HISTFILE} is unset, and environment variables
3542@env{HISTFILESIZE} @env{HISTSIZE} are set to 0. 3558@env{HISTFILESIZE} @env{HISTSIZE} are set to 0.
3543 3559
diff --git a/etc/NEWS.26 b/etc/NEWS.26
index 00ff9cda8ef..a8880d0f323 100644
--- a/etc/NEWS.26
+++ b/etc/NEWS.26
@@ -1714,7 +1714,13 @@ t for all Emacs integers N.
1714--- 1714---
1715** Calls that accept floating-point integers (for use on hosts with 1715** Calls that accept floating-point integers (for use on hosts with
1716limited integer range) now signal an error if arguments are not 1716limited integer range) now signal an error if arguments are not
1717integral. For example '(decode-char 'ascii 0.5)' now signals an error. 1717integral. For example '(decode-char 'ascii 0.5)' now signals an
1718error.
1719
1720---
1721** Functions 'string-trim-left', 'string-trim-right' and 'string-trim'
1722now accept optional arguments which specify the regexp of a substring
1723to trim.
1718 1724
1719+++ 1725+++
1720** The new function 'char-from-name' converts a Unicode name string 1726** The new function 'char-from-name' converts a Unicode name string
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 60823445b97..6ef8ffb0933 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -619,7 +619,7 @@ Switch to the most recently selected buffer other than the current one."
619 :button (:toggle . (bound-and-true-p flyspell-mode)))) 619 :button (:toggle . (bound-and-true-p flyspell-mode))))
620(bindings--define-key mode-line-mode-menu [auto-revert-tail-mode] 620(bindings--define-key mode-line-mode-menu [auto-revert-tail-mode]
621 '(menu-item "Auto revert tail (Tail)" auto-revert-tail-mode 621 '(menu-item "Auto revert tail (Tail)" auto-revert-tail-mode
622 :help "Revert the tail of the buffer when buffer grows" 622 :help "Revert the tail of the buffer when the file on disk grows"
623 :enable (buffer-file-name) 623 :enable (buffer-file-name)
624 :button (:toggle . (bound-and-true-p auto-revert-tail-mode)))) 624 :button (:toggle . (bound-and-true-p auto-revert-tail-mode))))
625(bindings--define-key mode-line-mode-menu [auto-revert-mode] 625(bindings--define-key mode-line-mode-menu [auto-revert-mode]
diff --git a/lisp/gnus/mm-uu.el b/lisp/gnus/mm-uu.el
index 32be336d13a..e15eba75924 100644
--- a/lisp/gnus/mm-uu.el
+++ b/lisp/gnus/mm-uu.el
@@ -624,7 +624,7 @@ MIME-TYPE specifies a MIME type and parameters, which defaults to the
624value of `mm-uu-text-plain-type'." 624value of `mm-uu-text-plain-type'."
625 (let ((case-fold-search t) 625 (let ((case-fold-search t)
626 (mm-uu-text-plain-type (or mime-type mm-uu-text-plain-type)) 626 (mm-uu-text-plain-type (or mime-type mm-uu-text-plain-type))
627 text-start start-point end-point file-name result entry func) 627 text-start start-point end-point file-name result mm-uu-entry func)
628 (save-excursion 628 (save-excursion
629 (goto-char (point-min)) 629 (goto-char (point-min))
630 (cond 630 (cond
@@ -637,26 +637,26 @@ value of `mm-uu-text-plain-type'."
637 (setq text-start (point)) 637 (setq text-start (point))
638 (while (re-search-forward mm-uu-beginning-regexp nil t) 638 (while (re-search-forward mm-uu-beginning-regexp nil t)
639 (setq start-point (match-beginning 0) 639 (setq start-point (match-beginning 0)
640 entry nil) 640 mm-uu-entry nil)
641 (let ((alist mm-uu-type-alist) 641 (let ((alist mm-uu-type-alist)
642 (beginning-regexp (match-string 0))) 642 (beginning-regexp (match-string 0)))
643 (while (not entry) 643 (while (not mm-uu-entry)
644 (if (string-match (mm-uu-beginning-regexp (car alist)) 644 (if (string-match (mm-uu-beginning-regexp (car alist))
645 beginning-regexp) 645 beginning-regexp)
646 (setq entry (car alist)) 646 (setq mm-uu-entry (car alist))
647 (pop alist)))) 647 (pop alist))))
648 (if (setq func (mm-uu-function-1 entry)) 648 (if (setq func (mm-uu-function-1 mm-uu-entry))
649 (funcall func)) 649 (funcall func))
650 (forward-line);; in case of failure 650 (forward-line);; in case of failure
651 (when (and (not (mm-uu-configure-p (mm-uu-type entry) 'disabled)) 651 (when (and (not (mm-uu-configure-p (mm-uu-type mm-uu-entry) 'disabled))
652 (let ((end-regexp (mm-uu-end-regexp entry))) 652 (let ((end-regexp (mm-uu-end-regexp mm-uu-entry)))
653 (if (not end-regexp) 653 (if (not end-regexp)
654 (or (setq end-point (point-max)) t) 654 (or (setq end-point (point-max)) t)
655 (prog1 655 (prog1
656 (re-search-forward end-regexp nil t) 656 (re-search-forward end-regexp nil t)
657 (forward-line) 657 (forward-line)
658 (setq end-point (point))))) 658 (setq end-point (point)))))
659 (or (not (setq func (mm-uu-function-2 entry))) 659 (or (not (setq func (mm-uu-function-2 mm-uu-entry)))
660 (funcall func))) 660 (funcall func)))
661 (if (and (> start-point text-start) 661 (if (and (> start-point text-start)
662 (progn 662 (progn
@@ -675,7 +675,7 @@ value of `mm-uu-text-plain-type'."
675 mm-uu-text-plain-type) 675 mm-uu-text-plain-type)
676 result)) 676 result))
677 (push 677 (push
678 (funcall (mm-uu-function-extract entry)) 678 (funcall (mm-uu-function-extract mm-uu-entry))
679 result) 679 result)
680 (goto-char (setq text-start end-point)))) 680 (goto-char (setq text-start end-point))))
681 (when result 681 (when result
diff --git a/lisp/image.el b/lisp/image.el
index 2a8ea1fb886..b5f22351377 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -977,7 +977,7 @@ default is 20%."
977 977
978(defun image--get-imagemagick-and-warn () 978(defun image--get-imagemagick-and-warn ()
979 (unless (or (fboundp 'imagemagick-types) (featurep 'ns)) 979 (unless (or (fboundp 'imagemagick-types) (featurep 'ns))
980 (error "Can't rescale images without ImageMagick support")) 980 (error "Cannot rescale images without ImageMagick support"))
981 (let ((image (image--get-image))) 981 (let ((image (image--get-image)))
982 (image-flush image) 982 (image-flush image)
983 (when (fboundp 'imagemagick-types) 983 (when (fboundp 'imagemagick-types)
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 9ce4ff84627..14e251e0667 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -425,6 +425,14 @@ See `compilation-error-regexp-alist' for format details.")
425(defvar grep-context-face 'shadow 425(defvar grep-context-face 'shadow
426 "Face name to use for grep context lines.") 426 "Face name to use for grep context lines.")
427 427
428(defvar grep-num-matches-found 0)
429
430(defconst grep-mode-line-matches
431 `(" [" (:propertize (:eval (int-to-string grep-num-matches-found))
432 face ,grep-hit-face
433 help-echo "Number of matches so far")
434 "]"))
435
428(defvar grep-mode-font-lock-keywords 436(defvar grep-mode-font-lock-keywords
429 '(;; Command output lines. 437 '(;; Command output lines.
430 (": \\(.+\\): \\(?:Permission denied\\|No such \\(?:file or directory\\|device or address\\)\\)$" 438 (": \\(.+\\): \\(?:Permission denied\\|No such \\(?:file or directory\\|device or address\\)\\)$"
@@ -432,7 +440,7 @@ See `compilation-error-regexp-alist' for format details.")
432 ;; remove match from grep-regexp-alist before fontifying 440 ;; remove match from grep-regexp-alist before fontifying
433 ("^Grep[/a-zA-z]* started.*" 441 ("^Grep[/a-zA-z]* started.*"
434 (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t)) 442 (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t))
435 ("^Grep[/a-zA-z]* finished \\(?:(\\(matches found\\))\\|with \\(no matches found\\)\\).*" 443 ("^Grep[/a-zA-z]* finished with \\(?:\\(\\(?:[0-9]+ \\)?matches found\\)\\|\\(no matches found\\)\\).*"
436 (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t) 444 (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t)
437 (1 compilation-info-face nil t) 445 (1 compilation-info-face nil t)
438 (2 compilation-warning-face nil t)) 446 (2 compilation-warning-face nil t))
@@ -503,21 +511,28 @@ Set up `compilation-exit-message-function' and run `grep-setup-hook'."
503 (setenv "GREP_COLOR" "01;31") 511 (setenv "GREP_COLOR" "01;31")
504 ;; GREP_COLORS is used in GNU grep 2.5.2 and later versions 512 ;; GREP_COLORS is used in GNU grep 2.5.2 and later versions
505 (setenv "GREP_COLORS" "mt=01;31:fn=:ln=:bn=:se=:sl=:cx=:ne")) 513 (setenv "GREP_COLORS" "mt=01;31:fn=:ln=:bn=:se=:sl=:cx=:ne"))
514 (setq-local grep-num-matches-found 0)
506 (set (make-local-variable 'compilation-exit-message-function) 515 (set (make-local-variable 'compilation-exit-message-function)
507 (lambda (status code msg) 516 'grep-exit-message)
508 (if (eq status 'exit)
509 ;; This relies on the fact that `compilation-start'
510 ;; sets buffer-modified to nil before running the command,
511 ;; so the buffer is still unmodified if there is no output.
512 (cond ((and (zerop code) (buffer-modified-p))
513 '("finished (matches found)\n" . "matched"))
514 ((not (buffer-modified-p))
515 '("finished with no matches found\n" . "no match"))
516 (t
517 (cons msg code)))
518 (cons msg code))))
519 (run-hooks 'grep-setup-hook)) 517 (run-hooks 'grep-setup-hook))
520 518
519(defun grep-exit-message (status code msg)
520 "Return a status message for grep results."
521 (if (eq status 'exit)
522 ;; This relies on the fact that `compilation-start'
523 ;; sets buffer-modified to nil before running the command,
524 ;; so the buffer is still unmodified if there is no output.
525 (cond ((and (zerop code) (buffer-modified-p))
526 (if (> grep-num-matches-found 0)
527 (cons (format "finished with %d matches found\n" grep-num-matches-found)
528 "matched")
529 '("finished with matches found\n" . "matched")))
530 ((not (buffer-modified-p))
531 '("finished with no matches found\n" . "no match"))
532 (t
533 (cons msg code)))
534 (cons msg code)))
535
521(defun grep-filter () 536(defun grep-filter ()
522 "Handle match highlighting escape sequences inserted by the grep process. 537 "Handle match highlighting escape sequences inserted by the grep process.
523This function is called from `compilation-filter-hook'." 538This function is called from `compilation-filter-hook'."
@@ -535,7 +550,8 @@ This function is called from `compilation-filter-hook'."
535 (while (re-search-forward "\033\\[0?1;31m\\(.*?\\)\033\\[[0-9]*m" end 1) 550 (while (re-search-forward "\033\\[0?1;31m\\(.*?\\)\033\\[[0-9]*m" end 1)
536 (replace-match (propertize (match-string 1) 551 (replace-match (propertize (match-string 1)
537 'face nil 'font-lock-face grep-match-face) 552 'face nil 'font-lock-face grep-match-face)
538 t t)) 553 t t)
554 (cl-incf grep-num-matches-found))
539 ;; Delete all remaining escape sequences 555 ;; Delete all remaining escape sequences
540 (goto-char beg) 556 (goto-char beg)
541 (while (re-search-forward "\033\\[[0-9;]*[mK]" end 1) 557 (while (re-search-forward "\033\\[[0-9;]*[mK]" end 1)
@@ -775,6 +791,8 @@ This function is called from `compilation-filter-hook'."
775 grep-hit-face) 791 grep-hit-face)
776 (set (make-local-variable 'compilation-error-regexp-alist) 792 (set (make-local-variable 'compilation-error-regexp-alist)
777 grep-regexp-alist) 793 grep-regexp-alist)
794 (set (make-local-variable 'compilation-mode-line-errors)
795 grep-mode-line-matches)
778 ;; compilation-directory-matcher can't be nil, so we set it to a regexp that 796 ;; compilation-directory-matcher can't be nil, so we set it to a regexp that
779 ;; can never match. 797 ;; can never match.
780 (set (make-local-variable 'compilation-directory-matcher) '("\\`a\\`")) 798 (set (make-local-variable 'compilation-directory-matcher) '("\\`a\\`"))
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 21f56c9f55a..b87701536f8 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -996,7 +996,7 @@ Within directories, only files already under version control are noticed."
996 ((derived-mode-p 'diff-mode) diff-vc-backend) 996 ((derived-mode-p 'diff-mode) diff-vc-backend)
997 ;; Maybe we could even use comint-mode rather than shell-mode? 997 ;; Maybe we could even use comint-mode rather than shell-mode?
998 ((derived-mode-p 'dired-mode 'shell-mode 'compilation-mode) 998 ((derived-mode-p 'dired-mode 'shell-mode 'compilation-mode)
999 (vc-responsible-backend default-directory)) 999 (ignore-errors (vc-responsible-backend default-directory)))
1000 (vc-mode (vc-backend buffer-file-name)))) 1000 (vc-mode (vc-backend buffer-file-name))))
1001 1001
1002(declare-function vc-dir-current-file "vc-dir" ()) 1002(declare-function vc-dir-current-file "vc-dir" ())
diff --git a/src/frame.c b/src/frame.c
index 9b560808128..9eac242ea3f 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -342,7 +342,9 @@ DEFUN ("frame-windows-min-size", Fframe_windows_min_size,
342 * of `window-min-height' (`window-min-width' if HORIZONTAL is non-nil). 342 * of `window-min-height' (`window-min-width' if HORIZONTAL is non-nil).
343 * With IGNORE non-nil the values of these variables are ignored. 343 * With IGNORE non-nil the values of these variables are ignored.
344 * 344 *
345 * In either case, never return a value less than 1. 345 * In either case, never return a value less than 1. For TTY frames,
346 * additionally limit the minimum frame height to a value large enough
347 * to support the menu bar, the mode line, and the echo area.
346 */ 348 */
347static int 349static int
348frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal, 350frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal,
@@ -350,6 +352,7 @@ frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal,
350{ 352{
351 struct frame *f = XFRAME (frame); 353 struct frame *f = XFRAME (frame);
352 Lisp_Object par_size; 354 Lisp_Object par_size;
355 int retval;
353 356
354 if ((!NILP (horizontal) 357 if ((!NILP (horizontal)
355 && NUMBERP (par_size = get_frame_param (f, Qmin_width))) 358 && NUMBERP (par_size = get_frame_param (f, Qmin_width)))
@@ -362,15 +365,27 @@ frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal,
362 if (min_size < 1) 365 if (min_size < 1)
363 min_size = 1; 366 min_size = 1;
364 367
365 return (NILP (pixelwise) 368 retval = (NILP (pixelwise)
366 ? min_size 369 ? min_size
367 : min_size * (NILP (horizontal) 370 : min_size * (NILP (horizontal)
368 ? FRAME_LINE_HEIGHT (f) 371 ? FRAME_LINE_HEIGHT (f)
369 : FRAME_COLUMN_WIDTH (f))); 372 : FRAME_COLUMN_WIDTH (f)));
370 } 373 }
371 else 374 else
372 return XINT (call4 (Qframe_windows_min_size, frame, horizontal, 375 retval = XINT (call4 (Qframe_windows_min_size, frame, horizontal,
373 ignore, pixelwise)); 376 ignore, pixelwise));
377 /* Don't allow too small height of text-mode frames, or else cm.c
378 might abort in cmcheckmagic. */
379 if ((FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) && NILP (horizontal))
380 {
381 int min_height = (FRAME_MENU_BAR_LINES (f)
382 + FRAME_WANTS_MODELINE_P (f)
383 + 2); /* one text line and one echo-area line */
384 if (retval < min_height)
385 retval = min_height;
386 }
387
388 return retval;
374} 389}
375 390
376 391