emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 98f4e33: Merge from origin/emacs-26


From: Glenn Morris
Subject: [Emacs-diffs] master 98f4e33: Merge from origin/emacs-26
Date: Tue, 13 Feb 2018 12:26:30 -0500 (EST)

branch: master
commit 98f4e336e879e54251694fa0d47b69d8d325176d
Merge: 1d135af 333d6f4
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    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
---
 doc/emacs/basic.texi      | 22 ++++--------------
 doc/emacs/building.texi   | 25 ++++++++++----------
 doc/emacs/cmdargs.texi    | 17 +++++++-------
 doc/emacs/docstyle.texi   |  6 +++++
 doc/emacs/fixit.texi      | 31 +++++++++++++------------
 doc/emacs/frames.texi     | 20 ++++++++--------
 doc/emacs/glossary.texi   | 58 +++++++++++++++++++++++++++++++++--------------
 doc/emacs/macos.texi      |  6 ++---
 doc/emacs/mark.texi       |  2 +-
 doc/emacs/misc.texi       | 31 ++++++++++++++++++++++++-
 doc/emacs/msdos-xtra.texi |  2 +-
 doc/emacs/msdos.texi      |  8 +++----
 doc/emacs/mule.texi       | 34 +++++++++++++++++++++++----
 doc/emacs/search.texi     | 28 ++++++++++++-----------
 doc/emacs/trouble.texi    |  2 +-
 doc/emacs/xresources.texi |  4 ++--
 doc/misc/tramp.texi       | 32 +++++++++++++++++++-------
 etc/NEWS.26               |  8 ++++++-
 lisp/bindings.el          |  2 +-
 lisp/gnus/mm-uu.el        | 18 +++++++--------
 lisp/image.el             |  2 +-
 lisp/progmodes/grep.el    | 46 +++++++++++++++++++++++++------------
 lisp/vc/vc.el             |  2 +-
 src/frame.c               | 31 ++++++++++++++++++-------
 24 files changed, 285 insertions(+), 152 deletions(-)

diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi
index 8a8298b..4db3855 100644
--- a/doc/emacs/basic.texi
+++ b/doc/emacs/basic.texi
@@ -184,18 +184,8 @@ Move forward one character (@code{forward-char}).
 @item @key{RIGHT}
 @kindex RIGHT
 @findex right-char
address@hidden visual-order-cursor-movement
address@hidden cursor, visual-order motion
-This command (@code{right-char}) behaves like @kbd{C-f}, with one
-exception: when editing right-to-left scripts such as Arabic, it
-instead moves @emph{backward} if the current paragraph is a
-right-to-left paragraph.  @xref{Bidirectional Editing}.
-
-If @code{visual-order-cursor-movement} is address@hidden, this command
-moves to the character that is to the right of the current screen
-position, moving to the next or previous screen line as appropriate.
-Note that this might potentially move point many buffer positions
-away, depending on the surrounding bidirectional context.
+This command (@code{right-char}) behaves like @kbd{C-f}, except when
+point is in a right-to-left paragraph (@pxref{Bidirectional Editing}).
 
 @item C-b
 @kindex C-b
@@ -205,12 +195,8 @@ Move backward one character (@code{backward-char}).
 @item @key{LEFT}
 @kindex LEFT
 @findex left-char
-This command (@code{left-char}) behaves like @kbd{C-b}, except it
-moves @emph{forward} if the current paragraph is right-to-left.
address@hidden Editing}.
-
-The variable @code{visual-order-cursor-movement} affects this like
address@hidden, but moving left instead of right on the screen.
+This command (@code{left-char}) behaves like @kbd{C-b}, except if the
+current paragraph is right-to-left (@pxref{Bidirectional Editing}).
 
 @item C-n
 @itemx @key{DOWN}
diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi
index f61e333..878d2f5 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
 remains fixed while compilation output is added at the end of the
 buffer.
 
-  While compilation proceeds, the mode line is updated to show the
-number of errors, warnings, and informational messages that have been
-seen so far.
+  While compilation proceeds, the mode line shows the number of
+errors, warnings, and informational messages emitted by the compiler
+so far.
 
 @cindex compilation buffer, keeping point at end
 @vindex compilation-scroll-output
@@ -384,16 +384,16 @@ grep -nH -e foo *.el | grep bar | grep toto
 can find the corresponding lines in the original files using @address@hidden
 `}}, @key{RET}, and so forth, just like compilation errors.
 
-  As with compilation commands (@pxref{Compilation}), while the grep
-command runs, the mode line is updated to show the number of matches
-that have been seen so far.
-
   Some grep programs accept a @samp{--color} option to output special
 markers around matches for the purpose of highlighting.  You can make
 use of this feature by setting @code{grep-highlight-matches} to
 @code{t}.  When displaying a match in the source buffer, the exact
 match will be highlighted, instead of the entire source line.
 
+  As with compilation commands (@pxref{Compilation}), while the grep
+command runs, the mode line shows the running number of matches found
+and highlighted so far.
+
   The @command{grep} commands will offer to save buffers before
 running.  This is controlled by the @code{grep-save-buffers} variable.
 The possible values are either @code{nil} (don't save), @code{ask}
@@ -1410,12 +1410,13 @@ Loading,,, elisp, the Emacs Lisp Reference Manual}.
 @code{load-path}.  Its value should be a list of directories
 (strings).  These directories are searched, in the specified order, by
 the @kbd{M-x load-library} command, the lower-level @code{load}
-function, and other Emacs functions that find Emacs Lisp libraries.  A
-list entry in @code{load-path} can also have the special value
+function, and other Emacs functions that find Emacs Lisp libraries.
+An entry in @code{load-path} can also have the special value
 @code{nil}, which stands for the current default directory, but it is
-almost always a bad idea to use this.  (If you find yourself wishing
-that @code{nil} were in the list, most likely what you really want is
-to use @kbd{M-x load-file}.)
+almost always a bad idea to use this, because its meaning will depend
+on the buffer that is current when @code{load-path} is used by Emacs.
+(If you find yourself wishing that @code{nil} were in the list, most
+likely what you really want is to use @kbd{M-x load-file}.)
 
   The default value of @code{load-path} is a list of directories where
 the 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 e463e7c..d18de8e 100644
--- a/doc/emacs/cmdargs.texi
+++ b/doc/emacs/cmdargs.texi
@@ -1104,15 +1104,14 @@ border is 2.
 @node Title X
 @appendixsec Frame Titles
 
-  An Emacs frame may or may not have a specified title.  The frame
-title, if specified, appears in window decorations and icons as the
-name of the frame.  If an Emacs frame has no specified title, the
-default title has the form @address@hidden@@@var{machine}}
-(if there is only one frame) or the selected window's buffer name (if
-there is more than one frame).
-
-  You can specify a title for the initial Emacs frame with a command
-line option:
+  Each Emacs frame always has a title, which appears in window
+decorations and icons as the name of the frame.  The default title is
+of the form @address@hidden@@@var{machine}} (if there is
+only one frame) or shows the selected window's buffer name (if there
+is more than one frame).
+
+  You can specify a non-default title for the initial Emacs frame with
+a command line option:
 
 @table @samp
 @item -T @var{title}
diff --git a/doc/emacs/docstyle.texi b/doc/emacs/docstyle.texi
index dfd1430..f682e3d 100644
--- a/doc/emacs/docstyle.texi
+++ b/doc/emacs/docstyle.texi
@@ -8,3 +8,9 @@
 @end ignore
 @set txicodequoteundirected
 @set txicodequotebacktick
address@hidden It turns out TeX sometimes fails to hyphenate, so we help it here
address@hidden
address@hidden
address@hidden
address@hidden
address@hidden
diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi
index c872e9b..7cacac4 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.
   Any command other than an undo command breaks the sequence of undo
 commands.  Starting from that moment, the entire sequence of undo
 commands that you have just performed are themselves placed into the
-undo record, as a single set of changes.  Therefore, to re-apply
-changes you have undone, type @kbd{C-f} or any other command that
-harmlessly breaks the sequence of undoing; then type @kbd{C-/} to undo
-the undo command.
+undo record.  Therefore, to re-apply changes you have undone, type
address@hidden or any other command that harmlessly breaks the sequence of
+undoing; then type @kbd{C-/} one or more times to undo some of the
+undo commands.
 
   Alternatively, if you want to resume undoing, without redoing
 previous 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.
 dragging the word preceding or containing point forward as well.  The
 punctuation characters between the words do not move.  For example,
 @address@hidden, BAR}} transposes into @address@hidden, FOO}} rather than
address@hidden@w{BAR FOO,}}.
address@hidden@w{BAR FOO,}}.  When point is at the end of the line, it will
+transpose the word before point with the first word on the next line.
 
   @kbd{C-M-t} (@code{transpose-sexps}) is a similar command for
 transposing two expressions (@pxref{Expressions}), and @kbd{C-x C-t}
@@ -344,16 +345,16 @@ wildcard.
 
 @item C-g
 @itemx X
-Quit interactive spell checking, leaving point at the word that was
+Quit interactive spell-checking, leaving point at the word that was
 being checked.  You can restart checking again afterward with @kbd{C-u
 M-$}.
 
 @item x
-Quit interactive spell checking and move point back to where it was
-when you started spell checking.
+Quit interactive spell-checking and move point back to where it was
+when you started spell-checking.
 
 @item q
-Quit interactive spell checking and kill the spell-checker subprocess.
+Quit interactive spell-checking and kill the spell-checker subprocess.
 
 @item ?
 Show the list of options.
@@ -371,7 +372,7 @@ character; type that digit or character to choose it.
 @cindex @code{ispell} program
 @findex ispell-kill-ispell
   Once started, the spell-checker subprocess continues
-to run, waiting for something to do, so that subsequent spell checking
+to run, waiting for something to do, so that subsequent spell-checking
 commands complete more quickly.  If you want to get rid of the
 process, use @kbd{M-x ispell-kill-ispell}.  This is not usually
 necessary, 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
 dictionary is specified by the variable
 @code{ispell-personal-dictionary}.  If that is @code{nil}, the
 spelling program looks for a personal dictionary in a default
-location.
+location, which is specific to each spell-checker.
 
 @vindex ispell-complete-word-dict
   A separate dictionary is used for word completion.  The variable
 @code{ispell-complete-word-dict} specifies the file name of this
 dictionary.  The completion dictionary must be different because it
-cannot use root and affix information.  For some languages, there
-is a spell checking dictionary but no word completion dictionary.
+cannot use the information about roots and affixes of the words, which
+spell-checking uses to detect variations of words.  For some
+languages, there is a spell-checking dictionary but no word completion
+dictionary.
 
 @cindex Flyspell mode
 @cindex mode, Flyspell
 @findex flyspell-mode
-  Flyspell mode is a minor mode that performs automatic spell checking
+  Flyspell mode is a minor mode that performs automatic spell-checking
 as you type.  When it finds a word that it does not recognize, it
 highlights that word.  Type @kbd{M-x flyspell-mode} to toggle Flyspell
 mode 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 afdfa6c..b2ec574 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
 display backward if necessary.
 
 @item Double-Drag-mouse-1
-Select the text you drag across, in the form of whole words.
+Select the text you drag across, in units of whole words.
 
 @item Triple-mouse-1
 Select the line you click on.
 
 @item Triple-Drag-mouse-1
-Select the text you drag across, in the form of whole lines.
+Select the text you drag across, in units of whole lines.
 @end table
 
 @node Mouse References
@@ -312,7 +312,7 @@ button.
 @node Menu Mouse Clicks
 @section Mouse Clicks for Menus
 
-  Several mouse clicks with the @key{CTRL} and @key{SHIFT} modifiers
+  Several mouse clicks with the @key{Ctrl} and @key{SHIFT} modifiers
 bring up menus.
 
 @table @kbd
@@ -409,10 +409,11 @@ boundary to the left or right.
   The prefix key @kbd{C-x 5} is analogous to @kbd{C-x 4}.  Whereas
 each @kbd{C-x 4} command pops up a buffer in a different window in the
 selected frame (@pxref{Pop Up Window}), the @kbd{C-x 5} commands use a
-different frame.  If an existing visible or iconified (a.k.a.@: ``minimized'')
-frame already displays the requested buffer, that frame is raised and
-deiconified (``un-minimized''); otherwise, a new frame is created on
-the current display terminal.
+different frame.  If an existing visible or iconified (a.k.a.@:
+``minimized'', @pxref{Visibility of Frames,,, elisp, The Emacs Lisp
+Reference Manual}) frame already displays the requested buffer, that
+frame is raised and deiconified (``un-minimized''); otherwise, a new
+frame is created on the current display terminal.
 
   The various @kbd{C-x 5} commands differ in how they find or create the
 buffer to select:
@@ -642,7 +643,7 @@ Monospace-12:weight=bold:slant=italic
 
 For a more detailed description of Fontconfig patterns, see the
 Fontconfig manual, which is distributed with Fontconfig and available
-online at @url{http://fontconfig.org/fontconfig-user.html}.
+online at @url{https://fontconfig.org/fontconfig-user.html}.
 
 @cindex GTK font pattern
   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
 buttons).  Clicking @kbd{mouse-1} above or below the scroll bar's
 inner box scrolls the window by nearly the entire height of the
 window, like @kbd{M-v} and @kbd{C-v} respectively (@pxref{Moving
-Point}).  Dragging the inner box scrolls continuously.
+Point}).  (This, too, can behave differently with some toolkits.)
+Dragging the inner box scrolls continuously.
 
   If Emacs is compiled on the X Window System without X toolkit
 support, the scroll bar behaves differently.  Clicking @kbd{mouse-1}
diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi
index 7a0dd6d..a912019 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.
 When the mark is active, we call the region an active region.
 @xref{Mark}.
 
address@hidden Alt
address@hidden @key{Alt}
 Alt is the name of a modifier bit that a keyboard input character may
 have.  To make a character Alt, type it while holding down the @key{Alt}
 key.  Such characters are given names that start with @address@hidden
@@ -160,6 +160,12 @@ right away when you press down on a mouse button.  
@xref{Mouse Buttons}.
 @item Byte Compilation
 @xref{Glossary---Compilation}.
 
address@hidden cf.
address@hidden c.f.
+Short for ``confer'' in Latin, which means ``compare with'' or
+``compare to''.  The second variant, ``c.f.'', is a widespread
+misspelling.
+
 @anchor{Glossary---C-}
 @item @kbd{C-}
 @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}.
 
 @item Character Folding
 Character folding means ignoring differences between similarly looking
-characters, such as between @code{a}, and @code{@:a} and @code{@'a}.
+characters, such as between @code{a}, and @code{@"a} and @code{@'a}.
 Emacs performs character folding by default in text search.  @xref{Lax
 Search}.
 
@@ -220,14 +226,16 @@ text to or from a variety of coding systems when reading 
or writing it.
 @xref{Coding Systems}.
 
 @item Command
-A command is a Lisp function specially defined to be able to serve as a
-key binding in Emacs.  When you type a key sequence (q.v.), its
-binding (q.v.@:) is looked up in the relevant keymaps (q.v.@:) to find
-the command to run.  @xref{Commands}.
+A command is a Lisp function specially defined to be able to serve as
+a key binding in Emacs or to be invoked by its name
+(@pxref{Glossary---Command Name}).  When you type a key sequence
+(q.v.), its binding (q.v.@:) is looked up in the relevant keymaps
+(q.v.@:) to find the command to run.  @xref{Commands}.
 
 @item Command History
 @xref{Glossary---Minibuffer History}.
 
address@hidden Name}
 @item Command Name
 A command name is the name of a Lisp symbol that is a command
 (@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
 code.  Emacs has commands for compiling files of Emacs Lisp code
 (@pxref{Byte Compilation,,, elisp, the Emacs Lisp
 Reference Manual}) and programs in C and other languages
-(@pxref{Compilation}).
+(@pxref{Compilation}).  Byte-compiled Emacs Lisp code loads and
+executes faster.
 
 @item Complete Key
 A complete key is a key sequence that fully specifies one action to be
@@ -440,6 +449,9 @@ tell it to.  @xref{Bugs}.
 @c TODO?  Not really appropriate for the user manual I think.
 @c Dynamic Binding
 
address@hidden e.g.
+Short for ``exempli gratia'' in Latin, which means ``for example''.
+
 @item Echo Area
 The echo area is the bottom line of the screen, used for echoing the
 arguments 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
 typed), you press the @key{ESC} key as you would press a letter key, and
 it applies to the next character you type.
 
address@hidden etc.
+Short for ``et cetera'' in Latin, which means ``and so on''.
+
 @item Expression
 @xref{Glossary---Balanced Expression}.
 
@@ -709,6 +724,9 @@ have.  To make a character Hyper, type it while holding 
down the
 @key{Hyper} key.  Such characters are given names that start with
 @kbd{Hyper-} (usually written @kbd{H-} for short).  @xref{User Input}.
 
address@hidden i.e.
+Short for ``id est'' in Latin, which means ``that is''.
+
 @item Iff
 ``Iff'' means ``if and only if''.  This terminology comes from
 mathematics.  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.
 @xref{Locals}.
 
 @item @kbd{M-}
address@hidden in the name of a character is an abbreviation for @key{Meta},
address@hidden in the name of a character is an abbreviation for @key{META},
 one of the modifier keys that can accompany any character.
 @xref{User Input,M-}.
 
@@ -919,15 +937,15 @@ a keyboard interface to navigate it.  @xref{Menu Bars}.
 
 @item Meta
 Meta is the name of a modifier bit which you can use in a command
-character.  To enter a meta character, you hold down the @key{Meta}
+character.  To enter a meta character, you hold down the @key{META}
 key while typing the character.  We refer to such characters with
 names that start with @kbd{Meta-} (usually written @kbd{M-} for
-short).  For example, @kbd{M-<} is typed by holding down @key{Meta}
+short).  For example, @kbd{M-<} is typed by holding down @key{META}
 and at the same time typing @kbd{<} (which itself is done, on most
 terminals, by holding down @key{SHIFT} and typing @kbd{,}).
 @xref{User Input,Meta}.
 
-On some terminals, the @key{Meta} key is actually labeled @key{Alt}
+On some terminals, the @key{META} key is actually labeled @key{Alt}
 or @key{Edit}.
 
 @item Meta Character
@@ -1082,6 +1100,9 @@ read an argument (@pxref{Minibuffer}); the echoing that 
happens when
 you pause in the middle of typing a multi-character key sequence is also
 a kind of prompting (@pxref{Echo Area}).
 
address@hidden q.v.
+Short for ``quod vide'' in Latin, which means ``which see''.
+
 @item Query-Replace
 Query-replace is an interactive string replacement feature provided by
 Emacs.  @xref{Query Replace}.
@@ -1122,8 +1143,8 @@ one corner and putting the mark at the diagonally 
opposite corner.
 A recursive editing level is a state in which part of the execution of
 a command involves asking you to edit some text.  This text may
 or may not be the same as the text to which the command was applied.
-The mode line indicates recursive editing levels with square brackets
-(@samp{[} and @samp{]}).  @xref{Recursive Edit}.
+The mode line (q.v.@:) indicates recursive editing levels with square
+brackets (@samp{[} and @samp{]}).  @xref{Recursive Edit}.
 
 @item Redisplay
 Redisplay is the process of correcting the image on the screen to
@@ -1151,7 +1172,7 @@ digits.  @xref{Regexps}.
 @item Remote File
 A remote file is a file that is stored on a system other than your own.
 Emacs can access files on other computers provided that they are
-connected to the same network as your machine, and (obviously) that
+reachable from your machine over the network, and (obviously) that
 you have a supported method to gain access to those files.
 @xref{Remote Files}.
 
@@ -1173,8 +1194,9 @@ newline into the text.  It is also used to terminate most 
arguments
 read in the minibuffer (q.v.).  @xref{User Input,Return}.
 
 @item Reverting
-Reverting means returning to the original state.  Emacs lets you
-revert a buffer by re-reading its file from disk.  @xref{Reverting}.
+Reverting means returning to the original state.  For example, Emacs
+lets you revert a buffer by re-reading its file from disk.
address@hidden
 
 @c Seems too obvious, also there is nothing special about the format
 @c these days.
@@ -1346,6 +1368,7 @@ Emacs does not make a termscript file unless you tell it 
to.
 @xref{Bugs}.
 
 @item Text
+
 ``Text'' has two meanings (@pxref{Text}):
 
 @itemize @bullet
@@ -1354,6 +1377,7 @@ Data consisting of a sequence of characters, as opposed 
to binary
 numbers, executable programs, and the like.  The basic contents of an
 Emacs buffer (aside from the text properties, q.v.@:) are always text
 in this sense.
+
 @item
 Data consisting of written human language (as opposed to programs),
 or following the stylistic conventions of human language.
@@ -1456,7 +1480,7 @@ where they can be edited.  @xref{Visiting}.
 
 @item Whitespace
 Whitespace is any run of consecutive formatting characters (space,
-tab, newline, and backspace).
+tab, newline, backspace, etc.).
 
 @item Widening
 Widening is removing any restriction (q.v.@:) on the current buffer;
diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi
index 28a5f90..bf37d67 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.
 @node Mac / GNUstep Basics
 @section Basic Emacs usage under macOS and GNUstep
 
-  By default, the @key{alt} and @key{option} keys are the same as
address@hidden  The Mac @key{Cmd} key is the same as @key{Super}, and
+  By default, the @key{Alt} and @key{Option} keys are the same as
address@hidden  The Mac @key{Cmd} key is the same as @key{Super}, and
 Emacs provides a set of key bindings using this modifier key that mimic
 other Mac / GNUstep applications (@pxref{Mac / GNUstep Events}).  You
 can 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}).
 @vindex ns-alternate-modifier
 @vindex ns-right-alternate-modifier
   The variable @code{ns-right-alternate-modifier} controls the
-behavior of the right @key{alt} and @key{option} keys.  These keys
+behavior of the right @key{Alt} and @key{Option} keys.  These keys
 behave like the left-hand keys if the value is @code{left} (the
 default).  A value of @code{control}, @code{meta}, @code{alt},
 @code{super}, or @code{hyper} makes them behave like the corresponding
diff --git a/doc/emacs/mark.texi b/doc/emacs/mark.texi
index 7cb48a6..0ffa9f7 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}.
 
 @vindex delete-active-region
   As described in @ref{Erasing}, the @key{DEL}
-(@code{backward-delete-char}) and @key{delete}
+(@code{backward-delete-char}) and @key{Delete}
 (@code{delete-forward-char}) commands also act this way.  If the mark
 is active, they delete the text in the region.  (As an exception, if
 you 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 5babd50..ae6f944 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
 usually turned on.
 
 @vindex desktop-restore-eager
-  By default, all the buffers in the desktop are restored at one go.
+  By default, all the buffers in the desktop are restored in one go.
 However, this may be slow if there are a lot of buffers in the
 desktop.  You can specify the maximum number of buffers to restore
 immediately with the variable @code{desktop-restore-eager}; the
@@ -2504,6 +2504,35 @@ expression matching the names of buffers not to kill.
   If you want to save minibuffer history from one session to
 another, use the @code{savehist} library.
 
address@hidden desktop-auto-save-timeout
+  While Emacs runs with @code{desktop-save-mode} turned on, it by
+default auto-saves the desktop whenever any of it changes.  The
+variable @code{desktop-auto-save-timeout} determines how frequently
+Emacs checks for modifications to your desktop.
+
address@hidden desktop-load-locked-desktop
+  The file in which Emacs saves the desktop is locked while the
+session runs, to avoid inadvertently overwriting it from another Emacs
+session.  That lock is normally removed when Emacs exits, but if Emacs
+or your system crashes, the lock stays, and when you restart Emacs, it
+will by default ask you whether to use the locked desktop file.  You
+can avoid the question by customizing the variable
address@hidden to either @code{nil}, which means
+never load the desktop in this case, or @code{t}, which means load the
+desktop without asking.
+
address@hidden desktop restore in daemon mode
+  When Emacs starts in daemon mode, it cannot ask you any questions,
+so if it finds the desktop file locked, it will not load it, unless
address@hidden is @code{t}.  Note that restoring
+the desktop in daemon mode is somewhat problematic for other reasons:
+e.g., the daemon cannot use GUI features, so parameters such as frame
+position, size, and decorations cannot be restored.  For that reason,
+you may wish to delay restoring the desktop in daemon mode until the
+first client connects, by calling @code{desktop-read} in a hook
+function that you add to @code{after-make-frame-functions}
+(@pxref{Creating Frames,,, elisp, The Emacs Lisp Reference Manual}).
+
 @node Recursive Edit
 @section Recursive Editing Levels
 @cindex recursive editing level
diff --git a/doc/emacs/msdos-xtra.texi b/doc/emacs/msdos-xtra.texi
index 541e29a..39d003c 100644
--- a/doc/emacs/msdos-xtra.texi
+++ b/doc/emacs/msdos-xtra.texi
@@ -84,7 +84,7 @@ a running command and for emergency escape
 @vindex dos-super-key
 @vindex dos-hyper-key
   The PC keyboard maps use the left @key{Alt} key as the @key{META} key.
-You have two choices for emulating the @key{SUPER} and @key{HYPER} keys:
+You have two choices for emulating the @key{SUPER} and @key{Hyper} keys:
 choose either the right @key{Ctrl} key or the right @key{Alt} key by
 setting the variables @code{dos-hyper-key} and @code{dos-super-key} to 1
 or 2 respectively.  If neither @code{dos-super-key} nor
diff --git a/doc/emacs/msdos.texi b/doc/emacs/msdos.texi
index 9c47f47..dd368ad 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.
   The Windows equivalent of @code{HOME} is the @dfn{user-specific
 application data directory}.  The actual location depends on the
 Windows version; typical values are @file{C:\Documents and
address@hidden Data} on Windows 2000/XP/2K3,
address@hidden:address@hidden on Windows
-Vista/7/2008, and either @file{C:\WINDOWS\Application Data} or
address@hidden Data} on Windows 2000 up to XP,
address@hidden:address@hidden on Windows Vista and
+later, and either @file{C:\WINDOWS\Application Data} or
 @file{C:address@hidden Data} on Windows
 9X/address@hidden  If this directory does not exist or cannot be accessed, 
Emacs
 falls 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
 variants).  However, if you set the variable
 @code{w32-capslock-is-shiftlock} to a address@hidden value, the
 @key{CapsLock} key will affect non-character keys as well, as if you
-pressed the @key{Shift} key while typing the non-character key.
+pressed the @key{SHIFT} key while typing the non-character key.
 
 @vindex w32-enable-caps-lock
   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 4989982..dc80bc9 100644
--- a/doc/emacs/mule.texi
+++ b/doc/emacs/mule.texi
@@ -1841,7 +1841,33 @@ sometimes jump when point traverses reordered 
bidirectional text.
 Similarly, a highlighted region covering a contiguous range of
 character positions may look discontinuous if the region spans
 reordered text.  This is normal and similar to the behavior of other
-programs that support bidirectional text.  If you set
address@hidden to a address@hidden value, cursor
-motion by the arrow keys follows the visual order on screen
-(@pxref{Moving Point, visual-order movement}).
+programs that support bidirectional text.
+
address@hidden address@hidden, and bidirectional text}
address@hidden address@hidden, and bidirectional text}
address@hidden address@hidden, and bidirectional text}
address@hidden address@hidden, and bidirectional text}
+  Cursor motion commands bound to arrow keys, such as @key{LEFT} and
address@hidden@key{RIGHT}}, are sensitive to the base direction of the
+current paragraph.  In a left-to-right paragraph, commands bound to
address@hidden with or without modifiers move @emph{forward} through
+buffer text, but in a right-to-left paragraph they move
address@hidden instead.  This reflects the fact that in a
+right-to-left paragraph buffer positions predominantly increase when
+moving to the left on display.
+
+  When you move out of a paragraph, the meaning of the arrow keys
+might change if the base direction of the preceding or the following
+paragraph is different from the paragraph out of which you moved.
+When that happens, you need to adjust the arrow key you press to the
+new base direction.
+
address@hidden visual-order-cursor-movement
address@hidden cursor, visual-order motion
+  By default, @key{LEFT} and @key{RIGHT} move in the logical order,
+but if @code{visual-order-cursor-movement} is address@hidden, these
+commands move to the character that is, correspondingly, to the left
+or right of the current screen position, moving to the next or
+previous screen line as appropriate.  Note that this might potentially
+move point many buffer positions away, depending on the surrounding
+bidirectional context.
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index c0adab4..51a0685 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.
 A symbol is a sequence of one or more symbol-constituent characters.
 A symbol-constituent character is a character whose syntax is either
 @samp{w} or @samp{_}.  @samp{\_<} matches at the beginning of the
-buffer only if a symbol-constituent character follows.
+buffer only if a symbol-constituent character follows.  As with words,
+the syntax table determines which characters are symbol-constituent.
 
 @item \_>
 matches the empty string, but only at the end of a symbol.  @samp{\_>}
@@ -1214,7 +1215,7 @@ search string matches exactly one space.
   Searches in Emacs by default ignore the case of the text they are
 searching through, if you specify the search string in lower case.
 Thus, if you specify searching for @samp{foo}, then @samp{Foo} and
address@hidden also match.  Regexps, and in particular character sets,
address@hidden also match.  Regexps, and in particular character sets,
 behave likewise: @samp{[ab]} matches @samp{a} or @samp{A} or @samp{b}
 or @samp{B}.  This feature is known as @dfn{case folding}, and it is
 supported in both incremental and non-incremental search modes.
@@ -1226,9 +1227,9 @@ case-sensitive.  Thus, searching for @samp{Foo} does not 
find
 as well as to literal string search.  The effect ceases if you delete
 the upper-case letter from the search string.  The variable
 @code{search-upper-case} controls this: if it is address@hidden (the
-default), an upper-case character in the search string make the search
-case-sensitive; setting it to @code{nil} disables this effect of
-upper-case characters.
+default), an upper-case character in the search string makes the
+search case-sensitive; setting it to @code{nil} disables this effect
+of upper-case characters.
 
 @vindex case-fold-search
   If you set the variable @code{case-fold-search} to @code{nil}, then
@@ -1349,7 +1350,7 @@ activating the mark; use @kbd{C-u address@hidden to move 
back there.
 surrounded by word boundaries.
 
   @xref{Replacement and Lax Matches}, for details about
-case-sensitivity in replace commands.
+case-sensitivity and character folding in replace commands.
 
 @node Regexp Replace
 @subsection Regexp Replacement
@@ -1411,13 +1412,14 @@ symbol name goes with the symbol name, so the value 
replaces them
 both.
 
   Inside such an expression, you can use some special sequences.
address@hidden&} and @address@hidden refer here, as usual, to the entire
-match as a string, and to a submatch as a string.  @var{n} may be
-multiple digits, and the value of @address@hidden is @code{nil} if
-subexpression @var{n} did not match.  You can also use @samp{\#&} and
address@hidden@var{n}} to refer to those matches as numbers (this is valid
-when the match or submatch has the form of a numeral).  @samp{\#} here
-too stands for the number of already-completed replacements.
address@hidden&} and @address@hidden refer here, as usual, to the entire
+match as a string, and to a submatch as a string.  @var{d} may be
+multiple digits, and the value of @address@hidden is @code{nil} if the
address@hidden'th parenthesized grouping did not match.  You can also use
address@hidden&} and @address@hidden to refer to those matches as numbers
+(this is valid when the match or submatch has the form of a numeral).
address@hidden here too stands for the number of already-completed
+replacements.
 
   Repeating our example to exchange @samp{x} and @samp{y}, we can thus
 do it also this way:
diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi
index 2edeb05..330497c 100644
--- a/doc/emacs/trouble.texi
+++ b/doc/emacs/trouble.texi
@@ -1322,7 +1322,7 @@ the Emacs Lisp Reference Manual
 @url{https://www.gnu.org/software/emacs}
 
 @item
address@hidden://www.emacswiki.org/}
address@hidden://www.emacswiki.org/}
 @end itemize
 
 @menu
diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi
index d58c6b9..ee59551 100644
--- a/doc/emacs/xresources.texi
+++ b/doc/emacs/xresources.texi
@@ -512,7 +512,7 @@ those are governed by normal X resources 
(@pxref{Resources}).
 
   The following sections describe how to customize GTK+ resources for
 Emacs.  For details about GTK+ resources, see the GTK+ API document at
address@hidden://developer.gnome.org/gtk2/stable/gtk2-Resource-Files.html}.
address@hidden://developer.gnome.org/gtk2/stable/gtk2-Resource-Files.html}.
 
   In GTK+ version 3, GTK+ resources have been replaced by a completely
 different 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+
 theme).  Therefore, the description of GTK+ resources in this section
 does not apply to GTK+ 3.  For details about the GTK+ 3 styling
 system, see
address@hidden://developer.gnome.org/gtk3/3.0/GtkCssProvider.html}.
address@hidden://developer.gnome.org/gtk3/3.0/GtkCssProvider.html}.
 
 @menu
 * GTK Resource Basics::   Basic usage of GTK+ resources.
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index ae544b0..e21df5a 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -681,6 +681,7 @@ In case both @command{mimencode} and @command{uuencode} are
 unavailable, @value{tramp} first transfers a small Perl program to the
 remote host, and then tries that program for encoding and decoding.
 
address@hidden tramp-inline-compress-start-size
 To increase transfer speeds for large text files, use compression
 before encoding.  The user option
 @option{tramp-inline-compress-start-size} specifies the file size for
@@ -1023,6 +1024,7 @@ can.
 @cindex @option{adb} method
 @cindex android (with @option{adb} method)
 
address@hidden tramp-adb-program
 This method uses Android Debug Bridge program for accessing Android
 devices.  The Android Debug Bridge must be installed locally for
 @value{tramp} to work.  Some GNU/Linux distributions provide Android
@@ -1031,6 +1033,7 @@ is installed as part of the Android address@hidden  
@value{tramp} finds the
 @command{adb} program either via the @env{PATH} environment variable
 or the absolute path set in the user option @option{tramp-adb-program}.
 
address@hidden tramp-adb-connect-if-not-connected
 @value{tramp} connects to Android devices with @option{adb} only when
 the user option @option{tramp-adb-connect-if-not-connected} is not
 @code{nil}.  Otherwise, the connection must be established outside
@@ -1696,6 +1699,7 @@ Set @code{password-cache} to @code{nil} to disable 
password caching.
 @cindex caching
 @vindex tramp-persistency-file-name
 
address@hidden tramp-persistency-file-name
 For faster initial connection times, @value{tramp} stores previous
 connection properties in a file specified by the user option
 @option{tramp-persistency-file-name}.
@@ -1898,6 +1902,7 @@ prompts, for which @value{tramp} uses 
@option{tramp-wrong-passwd-regexp}.
 @cindex @command{tset} unix command
 @vindex tramp-terminal-type
 
address@hidden tramp-terminal-type
 To suppress inappropriate prompts for terminal type, @value{tramp}
 sets the @env{TERM} to @code{dumb} before the remote login process
 begins 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
 @end group
 @end lisp
 
address@hidden backup-directory-alist
address@hidden tramp-backup-directory-alist
 Another option is to create better backup file naming with user and
 host names prefixed to the file name.  For example, transforming
 @file{/etc/secretfile} to
@@ -2204,6 +2211,7 @@ The backup file name of
 
@address@hidden,root@@localhost,~/.emacs.d/backups/![su!root@@localhost]!etc!secretfile~}}
 @end ifset
 
address@hidden auto-save-file-name-transforms
 Just as for backup files, similar issues of file naming affect
 auto-saving @value{tramp} files.  Auto-saved files are saved in the
 directory specified by the user option
@@ -2215,6 +2223,7 @@ compiled.  Reset such values to a valid directory.
 Set @option{auto-save-file-name-transforms} to @code{nil} to save
 auto-saved files to the same directory as the original file.
 
address@hidden tramp-auto-save-directory
 Alternatively, set the user option @option{tramp-auto-save-directory}
 to direct all auto saves to that location.
 
@@ -2615,6 +2624,7 @@ upon first connection.  Alternatively, use an absolute 
path or extend
 @end group
 @end lisp
 
address@hidden tramp-remote-process-environment
 Customize user option @option{tramp-remote-process-environment} to
 suit the remote program's environment for the remote host.
 @option{tramp-remote-process-environment} is a list of strings
@@ -2660,11 +2670,13 @@ this.  You could overwrite this behavior by evaluating
 @end group
 @end lisp
 
address@hidden does not use the defaults specified in
address@hidden for running @code{process-file} or
address@hidden on remote hosts.  When values from
address@hidden are needed for remote processes, then set
-them as follows:
+In addition to @option{tramp-remote-process-environment}, you can set
+environment variables for invidivual remote process calls by
+let-binding @code{process-environment}.  @value{tramp} will apply any
+entries which are not present in the global default value of
address@hidden (overriding
address@hidden settings, if they conflict).
+For example:
 
 @lisp
 @group
@@ -2673,8 +2685,10 @@ them as follows:
 @end group
 @end lisp
 
-This works only for environment variables not already set in the
address@hidden
+Let-binding in this way works regardless of whether the process to be
+called is local or remote, since @value{tramp} would add just the
address@hidden setting and local processes would take whole value of
address@hidden along with the new value of @env{HGPLAIN}.
 
 For integrating other Emacs packages so @value{tramp} can execute
 remotely, please file a bug report.  @xref{Bug Reports}.
@@ -3507,6 +3521,7 @@ the following code in @file{~/.emacs} file.
 How to get a Visual Warning when working with @samp{root} privileges?
 Host indication in the mode line?
 
address@hidden tramp-theme-face-remapping-alist
 Install @file{tramp-theme} from GNU ELPA via Emacs' Package Manager.
 Enable it via @kbd{M-x load-theme @key{RET} tramp}.  Further
 customization is explained in user option
@@ -3534,10 +3549,11 @@ then set them with a hook as follows:
 @item
 Why is @file{~/.sh_history} file on the remote host growing?
 
address@hidden tramp-histfile-override
 Due to the remote shell saving tilde expansions triggered by
 @value{tramp}, the history file is probably growing rapidly.
 @value{tramp} can suppress this behaviour with the user option
address@hidden  When set to @code{t}, environment
address@hidden  When set to @code{t}, environment
 variable @env{HISTFILE} is unset, and environment variables
 @env{HISTFILESIZE} @env{HISTSIZE} are set to 0.
 
diff --git a/etc/NEWS.26 b/etc/NEWS.26
index 00ff9cd..a8880d0 100644
--- a/etc/NEWS.26
+++ b/etc/NEWS.26
@@ -1714,7 +1714,13 @@ t for all Emacs integers N.
 ---
 ** Calls that accept floating-point integers (for use on hosts with
 limited integer range) now signal an error if arguments are not
-integral.  For example '(decode-char 'ascii 0.5)' now signals an error.
+integral.  For example '(decode-char 'ascii 0.5)' now signals an
+error.
+
+---
+** Functions 'string-trim-left', 'string-trim-right' and 'string-trim'
+now accept optional arguments which specify the regexp of a substring
+to trim.
 
 +++
 ** The new function 'char-from-name' converts a Unicode name string
diff --git a/lisp/bindings.el b/lisp/bindings.el
index 6082344..6ef8ffb 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."
              :button (:toggle . (bound-and-true-p flyspell-mode))))
 (bindings--define-key mode-line-mode-menu [auto-revert-tail-mode]
   '(menu-item "Auto revert tail (Tail)" auto-revert-tail-mode
-             :help "Revert the tail of the buffer when buffer grows"
+             :help "Revert the tail of the buffer when the file on disk grows"
              :enable (buffer-file-name)
              :button (:toggle . (bound-and-true-p auto-revert-tail-mode))))
 (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 32be336..e15eba7 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
 value of `mm-uu-text-plain-type'."
   (let ((case-fold-search t)
        (mm-uu-text-plain-type (or mime-type mm-uu-text-plain-type))
-       text-start start-point end-point file-name result entry func)
+       text-start start-point end-point file-name result mm-uu-entry func)
     (save-excursion
       (goto-char (point-min))
       (cond
@@ -637,26 +637,26 @@ value of `mm-uu-text-plain-type'."
       (setq text-start (point))
       (while (re-search-forward mm-uu-beginning-regexp nil t)
        (setq start-point (match-beginning 0)
-             entry nil)
+             mm-uu-entry nil)
        (let ((alist mm-uu-type-alist)
              (beginning-regexp (match-string 0)))
-         (while (not entry)
+         (while (not mm-uu-entry)
            (if (string-match (mm-uu-beginning-regexp (car alist))
                              beginning-regexp)
-               (setq entry (car alist))
+               (setq mm-uu-entry (car alist))
              (pop alist))))
-       (if (setq func (mm-uu-function-1 entry))
+       (if (setq func (mm-uu-function-1 mm-uu-entry))
            (funcall func))
        (forward-line);; in case of failure
-       (when (and (not (mm-uu-configure-p (mm-uu-type entry) 'disabled))
-                  (let ((end-regexp (mm-uu-end-regexp entry)))
+       (when (and (not (mm-uu-configure-p (mm-uu-type mm-uu-entry) 'disabled))
+                  (let ((end-regexp (mm-uu-end-regexp mm-uu-entry)))
                     (if (not end-regexp)
                         (or (setq end-point (point-max)) t)
                       (prog1
                           (re-search-forward end-regexp nil t)
                         (forward-line)
                         (setq end-point (point)))))
-                  (or (not (setq func (mm-uu-function-2 entry)))
+                  (or (not (setq func (mm-uu-function-2 mm-uu-entry)))
                       (funcall func)))
          (if (and (> start-point text-start)
                   (progn
@@ -675,7 +675,7 @@ value of `mm-uu-text-plain-type'."
                mm-uu-text-plain-type)
               result))
          (push
-          (funcall (mm-uu-function-extract entry))
+          (funcall (mm-uu-function-extract mm-uu-entry))
           result)
          (goto-char (setq text-start end-point))))
       (when result
diff --git a/lisp/image.el b/lisp/image.el
index 2a8ea1f..b5f2235 100644
--- a/lisp/image.el
+++ b/lisp/image.el
@@ -977,7 +977,7 @@ default is 20%."
 
 (defun image--get-imagemagick-and-warn ()
   (unless (or (fboundp 'imagemagick-types) (featurep 'ns))
-    (error "Can't rescale images without ImageMagick support"))
+    (error "Cannot rescale images without ImageMagick support"))
   (let ((image (image--get-image)))
     (image-flush image)
     (when (fboundp 'imagemagick-types)
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 9ce4ff8..14e251e 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -425,6 +425,14 @@ See `compilation-error-regexp-alist' for format details.")
 (defvar grep-context-face 'shadow
   "Face name to use for grep context lines.")
 
+(defvar grep-num-matches-found 0)
+
+(defconst grep-mode-line-matches
+  `(" [" (:propertize (:eval (int-to-string grep-num-matches-found))
+                      face ,grep-hit-face
+                      help-echo "Number of matches so far")
+    "]"))
+
 (defvar grep-mode-font-lock-keywords
    '(;; Command output lines.
      (": \\(.+\\): \\(?:Permission denied\\|No such \\(?:file or 
directory\\|device or address\\)\\)$"
@@ -432,7 +440,7 @@ See `compilation-error-regexp-alist' for format details.")
      ;; remove match from grep-regexp-alist before fontifying
      ("^Grep[/a-zA-z]* started.*"
       (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t))
-     ("^Grep[/a-zA-z]* finished \\(?:(\\(matches found\\))\\|with \\(no 
matches found\\)\\).*"
+     ("^Grep[/a-zA-z]* finished with \\(?:\\(\\(?:[0-9]+ \\)?matches 
found\\)\\|\\(no matches found\\)\\).*"
       (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t)
       (1 compilation-info-face nil t)
       (2 compilation-warning-face nil t))
@@ -503,21 +511,28 @@ Set up `compilation-exit-message-function' and run 
`grep-setup-hook'."
     (setenv "GREP_COLOR" "01;31")
     ;; GREP_COLORS is used in GNU grep 2.5.2 and later versions
     (setenv "GREP_COLORS" "mt=01;31:fn=:ln=:bn=:se=:sl=:cx=:ne"))
+  (setq-local grep-num-matches-found 0)
   (set (make-local-variable 'compilation-exit-message-function)
-       (lambda (status code msg)
-        (if (eq status 'exit)
-            ;; This relies on the fact that `compilation-start'
-            ;; sets buffer-modified to nil before running the command,
-            ;; so the buffer is still unmodified if there is no output.
-            (cond ((and (zerop code) (buffer-modified-p))
-                   '("finished (matches found)\n" . "matched"))
-                  ((not (buffer-modified-p))
-                   '("finished with no matches found\n" . "no match"))
-                  (t
-                   (cons msg code)))
-          (cons msg code))))
+       'grep-exit-message)
   (run-hooks 'grep-setup-hook))
 
+(defun grep-exit-message (status code msg)
+  "Return a status message for grep results."
+  (if (eq status 'exit)
+      ;; This relies on the fact that `compilation-start'
+      ;; sets buffer-modified to nil before running the command,
+      ;; so the buffer is still unmodified if there is no output.
+      (cond ((and (zerop code) (buffer-modified-p))
+            (if (> grep-num-matches-found 0)
+                 (cons (format "finished with %d matches found\n" 
grep-num-matches-found)
+                       "matched")
+               '("finished with matches found\n" . "matched")))
+           ((not (buffer-modified-p))
+            '("finished with no matches found\n" . "no match"))
+           (t
+            (cons msg code)))
+    (cons msg code)))
+
 (defun grep-filter ()
   "Handle match highlighting escape sequences inserted by the grep process.
 This function is called from `compilation-filter-hook'."
@@ -535,7 +550,8 @@ This function is called from `compilation-filter-hook'."
         (while (re-search-forward "\033\\[0?1;31m\\(.*?\\)\033\\[[0-9]*m" end 
1)
           (replace-match (propertize (match-string 1)
                                      'face nil 'font-lock-face grep-match-face)
-                         t t))
+                         t t)
+          (cl-incf grep-num-matches-found))
         ;; Delete all remaining escape sequences
         (goto-char beg)
         (while (re-search-forward "\033\\[[0-9;]*[mK]" end 1)
@@ -775,6 +791,8 @@ This function is called from `compilation-filter-hook'."
        grep-hit-face)
   (set (make-local-variable 'compilation-error-regexp-alist)
        grep-regexp-alist)
+  (set (make-local-variable 'compilation-mode-line-errors)
+       grep-mode-line-matches)
   ;; compilation-directory-matcher can't be nil, so we set it to a regexp that
   ;; can never match.
   (set (make-local-variable 'compilation-directory-matcher) '("\\`a\\`"))
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index 21f56c9..b877015 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."
        ((derived-mode-p 'diff-mode)     diff-vc-backend)
         ;; Maybe we could even use comint-mode rather than shell-mode?
        ((derived-mode-p 'dired-mode 'shell-mode 'compilation-mode)
-        (vc-responsible-backend default-directory))
+        (ignore-errors (vc-responsible-backend default-directory)))
        (vc-mode (vc-backend buffer-file-name))))
 
 (declare-function vc-dir-current-file "vc-dir" ())
diff --git a/src/frame.c b/src/frame.c
index 9b56080..9eac242 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -342,7 +342,9 @@ DEFUN ("frame-windows-min-size", Fframe_windows_min_size,
  * of `window-min-height' (`window-min-width' if HORIZONTAL is non-nil).
  * With IGNORE non-nil the values of these variables are ignored.
  *
- * In either case, never return a value less than 1.
+ * In either case, never return a value less than 1.  For TTY frames,
+ * additionally limit the minimum frame height to a value large enough
+ * to support the menu bar, the mode line, and the echo area.
  */
 static int
 frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal,
@@ -350,6 +352,7 @@ frame_windows_min_size (Lisp_Object frame, Lisp_Object 
horizontal,
 {
   struct frame *f = XFRAME (frame);
   Lisp_Object par_size;
+  int retval;
 
   if ((!NILP (horizontal)
        && NUMBERP (par_size = get_frame_param (f, Qmin_width)))
@@ -362,15 +365,27 @@ frame_windows_min_size (Lisp_Object frame, Lisp_Object 
horizontal,
       if (min_size < 1)
        min_size = 1;
 
-      return (NILP (pixelwise)
-             ? min_size
-             : min_size * (NILP (horizontal)
-                           ? FRAME_LINE_HEIGHT (f)
-                           : FRAME_COLUMN_WIDTH (f)));
+      retval = (NILP (pixelwise)
+               ? min_size
+               : min_size * (NILP (horizontal)
+                             ? FRAME_LINE_HEIGHT (f)
+                             : FRAME_COLUMN_WIDTH (f)));
     }
   else
-    return XINT (call4 (Qframe_windows_min_size, frame, horizontal,
-                     ignore, pixelwise));
+    retval = XINT (call4 (Qframe_windows_min_size, frame, horizontal,
+                         ignore, pixelwise));
+  /* Don't allow too small height of text-mode frames, or else cm.c
+     might abort in cmcheckmagic.  */
+  if ((FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f)) && NILP (horizontal))
+    {
+      int min_height = (FRAME_MENU_BAR_LINES (f)
+                       + FRAME_WANTS_MODELINE_P (f)
+                       + 2);   /* one text line and one echo-area line */
+      if (retval < min_height)
+       retval = min_height;
+    }
+
+  return retval;
 }
 
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]