From 32fb8c4c33305fa3107f23d8ce8cfba8e04a7433 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 10 Feb 2018 09:51:00 +0200 Subject: [PATCH 01/18] Avoid printing garbled error message from image.el * lisp/image.el (image--get-imagemagick-and-warn): Don't use apostrophe in the error message, as that message is shown from a unibyte buffer, and will run afoul of the default style of showing quote characters. (Bug#30405) --- lisp/image.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/image.el b/lisp/image.el index 0fe03f55bbb..b021edb33dc 100644 --- a/lisp/image.el +++ b/lisp/image.el @@ -977,7 +977,7 @@ default is 20%." (defun image--get-imagemagick-and-warn () (unless (fboundp 'imagemagick-types) - (error "Can't rescale images without ImageMagick support")) + (error "Cannot rescale images without ImageMagick support")) (let ((image (image--get-image))) (image-flush image) (plist-put (cdr image) :type 'imagemagick) From 6a1c03d65bcdd5a9cb2a130948285bbfde341154 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 10 Feb 2018 11:19:43 +0200 Subject: [PATCH 02/18] More minor changes in the Emacs manual * doc/emacs/xresources.texi (GTK resources): * doc/emacs/trouble.texi (Contributing): * doc/emacs/frames.texi (Fonts): Use HTTPS URLs instead of HTTP. * doc/emacs/docstyle.texi: Add a few @hyphenation directives, based on reports in emacs-manual-bugs@gnu.org about incorrect hyphenation. --- doc/emacs/docstyle.texi | 6 ++++++ doc/emacs/frames.texi | 2 +- doc/emacs/trouble.texi | 2 +- doc/emacs/xresources.texi | 4 ++-- 4 files changed, 10 insertions(+), 4 deletions(-) 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 @@ @end ignore @set txicodequoteundirected @set txicodequotebacktick +@c It turns out TeX sometimes fails to hyphenate, so we help it here +@hyphenation{au-to-mat-i-cal-ly} +@hyphenation{spec-i-fied} +@hyphenation{work-a-round} +@hyphenation{work-a-rounds} +@hyphenation{un-marked} diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index afdfa6c39c1..15b576d3323 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -642,7 +642,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}. 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 @url{https://www.gnu.org/software/emacs} @item -@url{http://www.emacswiki.org/} +@url{https://www.emacswiki.org/} @end itemize @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}). The following sections describe how to customize GTK+ resources for Emacs. For details about GTK+ resources, see the GTK+ API document at -@uref{http://developer.gnome.org/gtk2/stable/gtk2-Resource-Files.html}. +@uref{https://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 -@uref{http://developer.gnome.org/gtk3/3.0/GtkCssProvider.html}. +@uref{https://developer.gnome.org/gtk3/3.0/GtkCssProvider.html}. @menu * GTK Resource Basics:: Basic usage of GTK+ resources. From 66e9527b9a8c66bc3c5a4e5c3e68777d93310be1 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 10 Feb 2018 13:23:22 +0200 Subject: [PATCH 03/18] Another minor change in the manual * doc/emacs/glossary.texi (Glossary): Add popular Latin abbreviations, such as "e.g.". --- doc/emacs/glossary.texi | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi index 7a0dd6db750..7a34692dc53 100644 --- a/doc/emacs/glossary.texi +++ b/doc/emacs/glossary.texi @@ -160,6 +160,11 @@ right away when you press down on a mouse button. @xref{Mouse Buttons}. @item Byte Compilation @xref{Glossary---Compilation}. +@item c.f. +@itemx cf. +Short for ``confer'' in Latin, which means ``compare with'' or +``compare to''. + @anchor{Glossary---C-} @item @kbd{C-} @kbd{C-} in the name of a character is an abbreviation for Control. @@ -440,6 +445,9 @@ tell it to. @xref{Bugs}. @c TODO? Not really appropriate for the user manual I think. @c Dynamic Binding +@item 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 +507,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. +@item etc. +Short for ``et cetera'' in Latin, which means ``and so on''. + @item Expression @xref{Glossary---Balanced Expression}. @@ -709,6 +720,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}. +@item 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 @@ -1082,6 +1096,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}). +@item 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}. From cb2487b173f84055692a3c978ccbef75b0fb70b3 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 10 Feb 2018 19:21:42 +0200 Subject: [PATCH 04/18] Improve Emacs user manual in fixit.texi * doc/emacs/fixit.texi (Undo): Clarify inaccurate description of repeated undo. (Transpose): Describe explicitly what happens at EOL. (Spelling): Use "spell-checking" consistently. Clarify wording. Suggested by Toon Claes in emacs-manual-bugs@gnu.org. --- doc/emacs/fixit.texi | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) 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. 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 +@kbd{C-f} 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, @w{@samp{FOO, BAR}} transposes into @w{@samp{BAR, FOO}} rather than -@samp{@w{BAR FOO,}}. +@samp{@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 From d924953e05f67874440fffac816a143e56af788f Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sat, 10 Feb 2018 23:55:48 +0100 Subject: [PATCH 05/18] Fix unbound mm-uu-entry in mm-uu * lisp/gnus/mm-uu.el (mm-uu-dissect): Rename entry to mm-uu-entry. --- lisp/gnus/mm-uu.el | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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 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 From 10637af91ac1bf777d880473cc8c804fd6dff4e2 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 11 Feb 2018 18:19:25 +0200 Subject: [PATCH 06/18] Improve the Emacs manual's chapter "Frames" * doc/emacs/frames.texi (Creating Frames): Add a cross-reference to where frame visibility is described. (Word and Line Mouse): Clarify wording. (Scroll Bars): Qualify scroll-bar behavior. Reported by Dmitry Gutov in emacs-manual-bugs@gnu.org. --- doc/emacs/frames.texi | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 15b576d3323..2c1a55b7dc6 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 @@ -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: @@ -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} From f8a493c800252621403ef281d8a26e4d6d6acd9a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sun, 11 Feb 2018 19:59:00 +0200 Subject: [PATCH 07/18] Improve documentation of desktop restoring * doc/emacs/misc.texi (Saving Emacs Sessions): Document 'desktop-auto-save-timeout', 'desktop-load-locked-desktop', and how to restore desktop in daemon mode. (Bug#30421) --- doc/emacs/misc.texi | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) 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 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. +@vindex 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. + +@vindex 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 +@code{desktop-load-locked-desktop} to either @code{nil}, which means +never load the desktop in this case, or @code{t}, which means load the +desktop without asking. + +@cindex 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 +@code{desktop-load-locked-desktop} 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 From cef3b4248c02d7540fd2b6b44317baf6d2f46eae Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Mon, 12 Feb 2018 11:10:17 +0100 Subject: [PATCH 08/18] Fix help in mode-line-mode-menu * lisp/bindings.el (mode-line-mode-menu) [auto-revert-tail-mode]: Fix help string. --- lisp/bindings.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/bindings.el b/lisp/bindings.el index ac84add3617..e03b9e9a0cb 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el @@ -575,7 +575,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] From 26f64410fd6845cde1a06373eea05e256b87513d Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 12 Feb 2018 19:52:48 +0200 Subject: [PATCH 09/18] Another set of improvements in the Emacs manual * doc/emacs/msdos-xtra.texi (MS-DOS Keyboard): * doc/emacs/msdos.texi (Windows Keyboard): * doc/emacs/mark.texi (Using Region): * doc/emacs/frames.texi (Menu Mouse Clicks): * doc/emacs/macos.texi (Mac / GNUstep Basics): Fix spelling of keys. Reported by Michael Albinus in emacs-manual-bugs@gnu.org. * doc/emacs/glossary.texi (Glossary): Document that "c.f." is a misspelling. Reported by Robert Pluim . Various minor wording improvements. Suggested by Toon Claes in emacs-manual-bugs@gnu.org. More minor changes. Suggested by Michael Albinus in emacs-manual-bugs@gnu.org. * doc/emacs/cmdargs.texi (Title X): Improve wording. * doc/emacs/building.texi (Grep Searching, Compilation): Avoid passive tense. * doc/emacs/basic.texi (Moving Point): Move the description of the bidi-related effects of the arrow keys from here ... * doc/emacs/mule.texi (Bidirectional Editing): ... to here. Explain the behavior of arrow keys between paragraphs. --- doc/emacs/basic.texi | 22 ++++-------------- doc/emacs/building.texi | 14 ++++++------ doc/emacs/cmdargs.texi | 15 ++++++------- doc/emacs/frames.texi | 2 +- doc/emacs/glossary.texi | 47 ++++++++++++++++++++++----------------- doc/emacs/macos.texi | 6 ++--- doc/emacs/mark.texi | 2 +- doc/emacs/msdos-xtra.texi | 2 +- doc/emacs/msdos.texi | 2 +- doc/emacs/mule.texi | 34 ++++++++++++++++++++++++---- 10 files changed, 82 insertions(+), 64 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}). @item @key{RIGHT} @kindex RIGHT @findex right-char -@vindex visual-order-cursor-movement -@cindex 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 non-@code{nil}, 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. -@xref{Bidirectional Editing}. - -The variable @code{visual-order-cursor-movement} affects this like -@key{RIGHT}, 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 f61e3335770..f2819c67c5d 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 @w{@kbd{C-x `}}, @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} 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. @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 @samp{@var{invocation-name}@@@var{machine}} -(if there is only one frame) or the selected window's buffer name (if -there is more than one frame). + 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 @samp{@var{invocation-name}@@@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 title for the initial Emacs frame with a command -line option: + 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/frames.texi b/doc/emacs/frames.texi index 2c1a55b7dc6..b2ec5746a0e 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -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 diff --git a/doc/emacs/glossary.texi b/doc/emacs/glossary.texi index 7a34692dc53..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. When the mark is active, we call the region an active region. @xref{Mark}. -@item Alt +@item @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 @kbd{@key{Alt}-} @@ -160,10 +160,11 @@ right away when you press down on a mouse button. @xref{Mouse Buttons}. @item Byte Compilation @xref{Glossary---Compilation}. -@item c.f. -@itemx cf. +@item cf. +@itemx c.f. Short for ``confer'' in Latin, which means ``compare with'' or -``compare to''. +``compare to''. The second variant, ``c.f.'', is a widespread +misspelling. @anchor{Glossary---C-} @item @kbd{C-} @@ -192,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}. @@ -225,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}. +@anchor{Glossary---Command 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 @@ -255,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 @@ -875,7 +879,7 @@ A local value of a variable (q.v.@:) applies to only one buffer. @xref{Locals}. @item @kbd{M-} -@kbd{M-} in the name of a character is an abbreviation for @key{Meta}, +@kbd{M-} 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-}. @@ -933,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 @@ -1139,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 @@ -1168,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}. @@ -1190,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. +@xref{Reverting}. @c Seems too obvious, also there is nothing special about the format @c these days. @@ -1363,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 @@ -1371,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. @@ -1473,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 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. @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 -@key{Meta}. 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 +@key{META}. 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 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}. @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/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 @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 9c47f47a736..032e82eb621 100644 --- a/doc/emacs/msdos.texi +++ b/doc/emacs/msdos.texi @@ -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 non-@code{nil} 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 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. 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 -@code{visual-order-cursor-movement} to a non-@code{nil} value, cursor -motion by the arrow keys follows the visual order on screen -(@pxref{Moving Point, visual-order movement}). +programs that support bidirectional text. + +@kindex RIGHT@r{, and bidirectional text} +@kindex LEFT@r{, and bidirectional text} +@findex right-char@r{, and bidirectional text} +@findex left-char@r{, and bidirectional text} + Cursor motion commands bound to arrow keys, such as @key{LEFT} and +@kbd{C-@key{RIGHT}}, are sensitive to the base direction of the +current paragraph. In a left-to-right paragraph, commands bound to +@key{RIGHT} with or without modifiers move @emph{forward} through +buffer text, but in a right-to-left paragraph they move +@emph{backward} 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. + +@vindex visual-order-cursor-movement +@cindex cursor, visual-order motion + By default, @key{LEFT} and @key{RIGHT} move in the logical order, +but if @code{visual-order-cursor-movement} is non-@code{nil}, 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. From a22820a31c191451334eec101125f7b621d6dbc0 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 12 Feb 2018 20:02:36 +0200 Subject: [PATCH 10/18] Avoid aborts in cm.c due to too small TTY frame * src/frame.c (frame_windows_min_size): Limit TTY frames to a minimum height large enough to allow for a menu bar, the mode line, one text line and one echo-area line. This avoids aborts in cm.c:cmcheckmagic. (Bug#30320) --- src/frame.c | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/src/frame.c b/src/frame.c index d5b080d688a..a86f05191a8 100644 --- a/src/frame.c +++ b/src/frame.c @@ -341,7 +341,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, @@ -349,6 +351,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))) @@ -361,15 +364,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; } From 4fa467eefa6c8ef97a4e1526c809cdabeba98878 Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 12 Feb 2018 23:39:28 +0200 Subject: [PATCH 11/18] * lisp/progmodes/grep.el (grep-num-matches-found): New variable. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (grep-mode-line-matches): New defconst. (grep-mode-font-lock-keywords): Update the regexp for “Grep finished” to include the number of matches found. (grep-process-setup): Set grep-num-matches-found to 0. (grep-exit-message): New function with body moved from lambda in grep-process-setup. Use grep-num-matches-found to return the number of matches found. (grep-filter): Increment grep-num-matches-found. (grep-mode): Set compilation-mode-line-errors to grep-mode-line-matches. (Bug#30397, bug#14017) --- lisp/progmodes/grep.el | 46 +++++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 14 deletions(-) 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.") (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\\`")) From 96b6e243ec006b6c69642506a4f470aa5878e299 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sun, 11 Feb 2018 09:20:29 -0500 Subject: [PATCH 12/18] Clarify TRAMP process-environment interaction (Bug#30419) * doc/misc/tramp.texi (Remote processes): Index the tramp-remote-process-environment description. Clarify the effects of let-binding process-environment and the motivation for that behavior. --- doc/misc/tramp.texi | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 25ae8ae3e81..8bb34e2c56d 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -2596,6 +2596,7 @@ upon first connection. Alternatively, use an absolute path or extend @end group @end lisp +@vindex 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 @@ -2641,11 +2642,13 @@ this. You could overwrite this behavior by evaluating @end group @end lisp -@value{tramp} does not use the defaults specified in -@code{process-environment} for running @code{process-file} or -@code{start-file-process} on remote hosts. When values from -@code{process-environment} 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 +@code{process-environment} (overriding +@option{tramp-remote-process-environment} settings, if they conflict). +For example: @lisp @group @@ -2654,8 +2657,10 @@ them as follows: @end group @end lisp -This works only for environment variables not already set in the -@code{process-environment}. +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 +@env{HGPLAIN} setting and local processes would take whole value of +@code{process-environment} 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}. From e055a12839b7b41f76f553dfaf13ca9202a5f5af Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 13 Feb 2018 07:49:30 +0200 Subject: [PATCH 13/18] NEWS update about 'string-trim' * etc/NEWS: Mention changes in string-trim family of functions. (Bug#30442) --- etc/NEWS | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/etc/NEWS b/etc/NEWS index 00ff9cda8ef..a8880d0f323 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -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 From 92ca881dc83617a53fb057bcb9e91877cc848f9a Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 13 Feb 2018 07:59:26 +0200 Subject: [PATCH 14/18] Minor change in the Emacs manual * doc/emacs/building.texi (Lisp Libraries): Explain why nil in load-path is not a good idea. Suggested by James Yoo in emacs-manual-bugs@gnu.org. --- doc/emacs/building.texi | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index f2819c67c5d..878d2f53d53 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -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 From f568c916b6d1e20e18fced8d773aa8f86e7c576f Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Tue, 13 Feb 2018 08:35:50 +0100 Subject: [PATCH 15/18] * doc/misc/tramp.texi: Index more user options. --- doc/misc/tramp.texi | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 8bb34e2c56d..161f48ca3c8 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -670,6 +670,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. +@vindex 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 @@ -1020,6 +1021,7 @@ can. @cindex adb method @cindex android (with adb method) +@vindex 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 @@ -1028,6 +1030,7 @@ is installed as part of the Android SDK@. @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}. +@vindex 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 @@ -1678,6 +1681,7 @@ Set @code{password-cache} to @code{nil} to disable password caching. @cindex caching @vindex tramp-persistency-file-name +@vindex 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}. @@ -1880,6 +1884,7 @@ prompts, for which @value{tramp} uses @option{tramp-wrong-passwd-regexp}. @cindex tset unix command @vindex tramp-terminal-type +@vindex 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 @@ -2153,6 +2158,8 @@ Disabling backups can be targeted to just the @option{su} and @end group @end lisp +@vindex backup-directory-alist +@vindex 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 @@ -2186,6 +2193,7 @@ The backup file name of @file{@trampfn{su,root@@localhost,~/.emacs.d/backups/![su!root@@localhost]!etc!secretfile~}} @end ifset +@vindex 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 @@ -2197,6 +2205,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. +@vindex tramp-auto-save-directory Alternatively, set the user option @option{tramp-auto-save-directory} to direct all auto saves to that location. @@ -3284,6 +3293,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? +@vindex 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 @@ -3311,10 +3321,11 @@ then set them with a hook as follows: @item Why is @file{~/.sh_history} file on the remote host growing? +@vindex 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 -@code{tramp-histfile-override}. When set to @code{t}, environment +@option{tramp-histfile-override}. When set to @code{t}, environment variable @env{HISTFILE} is unset, and environment variables @env{HISTFILESIZE} @env{HISTSIZE} are set to 0. From 69e804669bacfef05c1ecdcd3f664dd486273db4 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 13 Feb 2018 12:13:27 +0100 Subject: [PATCH 16/18] Don't signal error in vc-deduce-backend * lisp/vc/vc.el (vc-deduce-backend): Return nil if vc-responsible-backend signals an error. --- lisp/vc/vc.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index 6516c91de3c..e767deace2e 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -996,7 +996,9 @@ 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)) + (condition-case nil + (vc-responsible-backend default-directory) + (error nil))) (vc-mode (vc-backend buffer-file-name)))) (declare-function vc-dir-current-file "vc-dir" ()) From 52ca0d1a3e01a3af8b482bd1f174f48a5c0b1fa2 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 13 Feb 2018 14:05:20 +0100 Subject: [PATCH 17/18] * lisp/vc/vc.el (vc-deduce-backend): Use ignore-errors. --- lisp/vc/vc.el | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index e767deace2e..a0b4cc92719 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -996,9 +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) - (condition-case nil - (vc-responsible-backend default-directory) - (error nil))) + (ignore-errors (vc-responsible-backend default-directory))) (vc-mode (vc-backend buffer-file-name)))) (declare-function vc-dir-current-file "vc-dir" ()) From 333d6f4d99a80f30ae6cd3880b9d9ec38a85691b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Tue, 13 Feb 2018 19:12:37 +0200 Subject: [PATCH 18/18] More changes in the Emacs manual * doc/emacs/search.texi (Regexp Backslash): Say that symbol-constituent characters are determined by the syntax table. (Lax Search): Fix example of case-insensitive search. Fix a typo. (Unconditional Replace): Improve wording. (Regexp Replace): More consistent wording. Reported by Michael Albinus in emacs-manual-bugs@gnu.org. * doc/emacs/msdos.texi (Windows HOME): Avoid enumerating all the Windows versions. Reported by Isaac Carter in emacs-manual-bugs@gnu.org. --- doc/emacs/msdos.texi | 6 +++--- doc/emacs/search.texi | 28 +++++++++++++++------------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/doc/emacs/msdos.texi b/doc/emacs/msdos.texi index 032e82eb621..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. 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 -Settings\@var{username}\Application Data} on Windows 2000/XP/2K3, -@file{C:\Users\@var{username}\AppData\Roaming} on Windows -Vista/7/2008, and either @file{C:\WINDOWS\Application Data} or +Settings\@var{username}\Application Data} on Windows 2000 up to XP, +@file{C:\Users\@var{username}\AppData\Roaming} on Windows Vista and +later, and either @file{C:\WINDOWS\Application Data} or @file{C:\WINDOWS\Profiles\@var{username}\Application Data} on Windows 9X/ME@. If this directory does not exist or cannot be accessed, Emacs falls back to @file{C:\} as the default value of @code{HOME}. 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. 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 -@samp{foo} also match. Regexps, and in particular character sets, +@samp{fOO} 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 non-@code{nil} (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 C-@key{SPC}} 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. -@samp{\&} and @samp{\@var{n}} 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 @samp{\@var{n}} is @code{nil} if -subexpression @var{n} did not match. You can also use @samp{\#&} and -@samp{\#@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. +@samp{\&} and @samp{\@var{d}} 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 @samp{\@var{d}} is @code{nil} if the +@var{d}'th parenthesized grouping did not match. You can also use +@samp{\#&} and @samp{\#@var{d}} 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. Repeating our example to exchange @samp{x} and @samp{y}, we can thus do it also this way: