diff --git a/admin/admin.el b/admin/admin.el
index 8c68b181831..6be378b9246 100644
--- a/admin/admin.el
+++ b/admin/admin.el
@@ -351,11 +351,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")
@@ -486,6 +488,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))
diff --git a/doc/lispref/control.texi b/doc/lispref/control.texi
index 2f1666ba771..63dc2f866af 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
diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi
index 488967088b7..413e17750e9 100644
--- a/doc/lispref/strings.texi
+++ b/doc/lispref/strings.texi
@@ -443,12 +443,12 @@ strings.
@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
diff --git a/src/frame.c b/src/frame.c
index ea4c904e20a..46ac54d7677 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1576,8 +1576,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);