From ebea3415b0720e900867356c334e201e531401b5 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 28 May 2022 10:55:01 +0300 Subject: [PATCH 1/4] Fix documentation of 'string-pad' * doc/lispref/strings.texi (Creating Strings): Fix description of 'string-pad'. (Bug#55688) --- doc/lispref/strings.texi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi index 2810f686eb7..3d8db985e9c 100644 --- a/doc/lispref/strings.texi +++ b/doc/lispref/strings.texi @@ -440,12 +440,12 @@ Split @var{string} into a list of strings on newline boundaries. If @end defun @defun string-pad string length &optional padding start -Pad @var{string} to the be of @var{length} using @var{padding} as the -padding character (defaulting to the space character). If -@var{string} is shorter than @var{length}, no padding is done. If -@var{start} is @code{nil} (or not present), the padding is done to the -end of the string, and if it's non-@code{nil}, to the start of the -string. +Pad @var{string} to be of the given @var{length} using @var{padding} +as the padding character. @var{padding} defaults to the space +character. If @var{string} is longer than @var{length}, no padding is +done. If @var{start} is @code{nil} or omitted, the padding is +appended to the characters of @var{string}, and if it's +non-@code{nil}, the padding is prepended to @var{string}'s characters. @end defun @defun string-chop-newline string From fff770fb97e8a251b4138ea0ce06f153f8a936ad Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 28 May 2022 11:51:15 +0300 Subject: [PATCH 2/4] Fix a bad cross-reference in elisp.pdf * doc/lispref/control.texi (pcase Macro): Fix a conditional cross-reference (bug#55689). --- doc/lispref/control.texi | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi index 92cd67c1260..ecf616fc2be 100644 --- a/doc/lispref/control.texi +++ b/doc/lispref/control.texi @@ -629,7 +629,10 @@ Attempts to match @var{pattern1}, @var{pattern2}, @dots{}, in order, until one of them succeeds. In that case, @code{or} likewise matches, and the rest of the sub-patterns are not tested. -To present a consistent environment (@pxref{Intro Eval}) +To present a consistent environment +@ifnottex +(@pxref{Intro Eval}) +@end ifnottex to @var{body-forms} (thus avoiding an evaluation error on match), the set of variables bound by the pattern is the union of the variables bound by each sub-pattern. If a variable is not bound by From 908e2e09d08c8058f40295096aec9251944875ca Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 28 May 2022 14:57:55 +0300 Subject: [PATCH 3/4] Fix commands used to produce on-line HTML docs * admin/admin.el (manual-meta-string): Only include the first line, and move the rest... (manual-links-string): ...to this new string. (manual-html-fix-headers): Don't remove the ', see gnu.org ticket #1840138. --- admin/admin.el | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/admin/admin.el b/admin/admin.el index a6cb33017ef..57d5afb23b7 100644 --- a/admin/admin.el +++ b/admin/admin.el @@ -340,11 +340,13 @@ Optional argument TYPE is type of output (nil means all)." \"https://www.w3.org/TR/html4/loose.dtd\">\n\n") (defconst manual-meta-string - " - + "\n") + +(defconst manual-links-string + " -\n\n") +\n") (defconst manual-style-string "\n") @@ -475,6 +477,12 @@ the @import directive." (delete-region opoint (point)) (search-forward "\n") + (delete-region opoint (point)) + (search-forward "") (goto-char (match-beginning 0)) (delete-region opoint (point)) From f9ee83bfb9f09a32ca8c15385f0cd3ec12ebde8c Mon Sep 17 00:00:00 2001 From: Alan Mackenzie Date: Sat, 28 May 2022 12:55:32 +0000 Subject: [PATCH 4/4] do_switch_frame: before leaving mini-window, check other (mru) window is live This fixes bug#55684. There, with a minibuffer-only frame at start up, Emacs tried to switch to this frame, whose selected window was the mini-window. There is no other active window in this frame, so the attempt to swith to another window failed. * src/frame.c (do_switch_frame): On switching to a frame whose selected window is as above, before selecting the most recently used window, check this ostensible window is an actual live window. Otherwise leave the mini-window selected. --- src/frame.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/frame.c b/src/frame.c index dc8045f41e6..0c278259a79 100644 --- a/src/frame.c +++ b/src/frame.c @@ -1568,8 +1568,14 @@ do_switch_frame (Lisp_Object frame, int track, int for_deletion, Lisp_Object nor to a different window, the most recently used one, unless there is a valid active minibuffer in the mini-window. */ if (EQ (f->selected_window, f->minibuffer_window) + /* The following test might fail if the mini-window contains a + non-active minibuffer. */ && NILP (Fminibufferp (XWINDOW (f->minibuffer_window)->contents, Qt))) - Fset_frame_selected_window (frame, call1 (Qget_mru_window, frame), Qnil); + { + Lisp_Object w = call1 (Qget_mru_window, frame); + if (WINDOW_LIVE_P (w)) /* W can be nil in minibuffer-only frames. */ + Fset_frame_selected_window (frame, w, Qnil); + } Fselect_window (f->selected_window, norecord);