From 691790b8ea5192395a2eeac0f89a2f41d74f2ddb Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 8 Aug 2019 16:17:51 +0300 Subject: [PATCH 1/5] Avoid Groff hanging on MS-Windows when invoked by "M-x man" * lisp/man.el (Man-build-man-command): On MS-Windows, redirect stdin of 'man' to the null device, to make sure Groff exits immediately after formatting the man page. --- lisp/man.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/man.el b/lisp/man.el index 409fadb66b8..731d480cbee 100644 --- a/lisp/man.el +++ b/lisp/man.el @@ -624,7 +624,13 @@ This is necessary if one wants to dump man.el with Emacs." ;; so we don't need `2>' even with DOS shells ;; which do support stderr redirection. ((not (fboundp 'make-process)) " %s") - ((concat " %s 2>" null-device))))) + ((concat " %s 2>" null-device + ;; Some MS-Windows ports of Groff + ;; try to read stdin after exhausting + ;; the command-line arguments; make + ;; them exit if/when they do. + (if (eq system-type 'windows-nt) + (concat " <" null-device))))))) (flist Man-filter-list)) (while (and flist (car flist)) (let ((pcom (car (car flist))) From cb0403d7467502a1a9ef2699ccce826aac2ace7a Mon Sep 17 00:00:00 2001 From: Mauro Aranda Date: Tue, 6 Aug 2019 12:45:28 -0300 Subject: [PATCH 2/5] Fix octave-mode ElDoc support * lisp/progmodes/octave.el (octave-eldoc-function-signatures): Fix the regexp used, so no match happens when there is no defined function FN. Also, tweak the regexp to support GNU Octave 4.2.x and newer. (Bug#36459) --- lisp/progmodes/octave.el | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index 6caf8d93d3f..76181892cdb 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -1591,8 +1591,23 @@ code line." (list (format "print_usage ('%s');\n" fn))) (let (result) (dolist (line inferior-octave-output-list) + ;; The help output has changed a few times in GNU Octave. + ;; Earlier versions output "usage: " before the function signature. + ;; After deprecating the usage function, and up until GNU Octave 4.0.3, + ;; the output looks like this: + ;; -- Mapping Function: abs (Z). + ;; After GNU Octave 4.2.0, the output is less verbose and it looks like + ;; this: + ;; -- abs (Z) + ;; The following regexp matches these three formats. + ;; The "usage: " alternative matches the symbol, because a call to + ;; print_usage with a non-existent function (e.g., print_usage ('A')) + ;; would output: + ;; error: print_usage: 'A' not found + ;; and we wouldn't like to match anything in this case. + ;; See bug #36459. (when (string-match - "\\s-*\\(?:--[^:]+\\|usage\\):\\s-*\\(.*\\)$" + "\\s-*\\(?:--[^:]+:\\|\\_ Date: Fri, 9 Aug 2019 10:31:39 +0300 Subject: [PATCH 3/5] Improve doc strings of 'append-to-buffer' and friends * lisp/simple.el (append-to-buffer, prepend-to-buffer) (copy-to-buffer): Doc fixes. --- lisp/simple.el | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index b10c7861d13..b5c7052184b 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5268,8 +5268,10 @@ BUFFER may be a buffer or a buffer name." nil) (defun append-to-buffer (buffer start end) - "Append to specified buffer the text of the region. -It is inserted into that buffer before its point. + "Append to specified BUFFER the text of the region. +The text is inserted into that buffer before its point. +BUFFER can be a buffer or the name of a buffer; this +function will create BUFFER if it doesn't already exist. When calling from a program, give three arguments: BUFFER (or buffer name), START and END. @@ -5291,8 +5293,10 @@ START and END specify the portion of the current buffer to be copied." (set-window-point window (point)))))))) (defun prepend-to-buffer (buffer start end) - "Prepend to specified buffer the text of the region. -It is inserted into that buffer after its point. + "Prepend to specified BUFFER the text of the region. +The text is inserted into that buffer after its point. +BUFFER can be a buffer or the name of a buffer; this +function will create BUFFER if it doesn't already exist. When calling from a program, give three arguments: BUFFER (or buffer name), START and END. @@ -5305,8 +5309,10 @@ START and END specify the portion of the current buffer to be copied." (insert-buffer-substring oldbuf start end))))) (defun copy-to-buffer (buffer start end) - "Copy to specified buffer the text of the region. -It is inserted into that buffer, replacing existing text there. + "Copy to specified BUFFER the text of the region. +The text is inserted into that buffer, replacing existing text there. +BUFFER can be a buffer or the name of a buffer; this +function will create BUFFER if it doesn't already exist. When calling from a program, give three arguments: BUFFER (or buffer name), START and END. From fae1ff69c3fd84f208b7b803adafeb95a36e44e7 Mon Sep 17 00:00:00 2001 From: Mauro Aranda Date: Wed, 7 Aug 2019 11:55:54 -0300 Subject: [PATCH 4/5] Fix docstrings in pong * lisp/play/pong.el (pong-move-left pong-move-right): Refer to the right bats and directions of movement. (Bug#36959) --- lisp/play/pong.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/play/pong.el b/lisp/play/pong.el index 555c1939d26..13fe8b82a41 100644 --- a/lisp/play/pong.el +++ b/lisp/play/pong.el @@ -262,7 +262,7 @@ (defun pong-move-left () - "Move bat 2 up. + "Move bat 1 up. This is called left for historical reasons, since in some pong implementations you move with left/right paddle." (interactive) @@ -274,7 +274,7 @@ implementations you move with left/right paddle." (defun pong-move-right () - "Move bat 2 up." + "Move bat 1 down." (interactive) (if (< (+ pong-bat-player1 pong-bat-width) (1- pong-height)) (and From 0860ac0e9db15ee0f094df7f6b0bbd5961bb08ac Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 10 Aug 2019 12:48:03 +0300 Subject: [PATCH 5/5] Improve documentation of features that use the fringes * doc/emacs/display.texi (Fringes): Add cross-reference to where indicate-empty-lines is described. (Useless Whitespace): Add an @anchor for a more accurate cross-reference in "Fringes". --- doc/emacs/display.texi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index ac1ce3606b6..74bcc3283c2 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -1110,7 +1110,8 @@ the arrows scrolls the display horizontally in the direction of the arrow. The fringes can also indicate other things, such as buffer -boundaries (@pxref{Displaying Boundaries}), and where a program you +boundaries (@pxref{Displaying Boundaries}), unused lines near the end +of the window (@pxref{indicate-empty-lines}), and where a program you are debugging is executing (@pxref{Debuggers}). @vindex overflow-newline-into-fringe @@ -1203,6 +1204,7 @@ extra spaces at the end of each line in the region. @vindex indicate-empty-lines @cindex unused lines @cindex fringes, and unused line indication +@anchor{indicate-empty-lines} On graphical displays, Emacs can indicate unused lines at the end of the window with a small image in the left fringe (@pxref{Fringes}). The image appears for screen lines that do not correspond to any