Commit 644b477c authored by Richard M. Stallman's avatar Richard M. Stallman

(Fscroll_left): Make argument optional.

(Fscroll_right): Ditto.

(Fprevious_window): When changing frames,
use the new frame's minibuffer if any.
parent 442c9ab6
...@@ -840,6 +840,9 @@ windows, eventually ending up back at the window you started with.\n\ ...@@ -840,6 +840,9 @@ windows, eventually ending up back at the window you started with.\n\
: Qnil); : Qnil);
else if (! EQ (all_frames, Qt)) else if (! EQ (all_frames, Qt))
all_frames = Qnil; all_frames = Qnil;
/* Now all_frames is t meaning search all frames,
nil meaning search just current frame,
or a window, meaning search the frame that window belongs to. */
/* Do this loop at least once, to get the next window, and perhaps /* Do this loop at least once, to get the next window, and perhaps
again, if we hit the minibuffer and that is not acceptable. */ again, if we hit the minibuffer and that is not acceptable. */
...@@ -942,6 +945,9 @@ windows, eventually ending up back at the window you started with.\n\ ...@@ -942,6 +945,9 @@ windows, eventually ending up back at the window you started with.\n\
: Qnil); : Qnil);
else if (! EQ (all_frames, Qt)) else if (! EQ (all_frames, Qt))
all_frames = Qnil; all_frames = Qnil;
/* Now all_frames is t meaning search all frames,
nil meaning search just current frame,
or a window, meaning search the frame that window belongs to. */
/* Do this loop at least once, to get the previous window, and perhaps /* Do this loop at least once, to get the previous window, and perhaps
again, if we hit the minibuffer and that is not acceptable. */ again, if we hit the minibuffer and that is not acceptable. */
...@@ -970,7 +976,11 @@ windows, eventually ending up back at the window you started with.\n\ ...@@ -970,7 +976,11 @@ windows, eventually ending up back at the window you started with.\n\
met. */ met. */
tem = prev_frame (tem, all_frames); tem = prev_frame (tem, all_frames);
#endif #endif
tem = FRAME_ROOT_WINDOW (XFRAME (tem)); /* If this frame has a minibuffer, find that window first,
because it is conceptually the last window in that frame. */
tem = FRAME_MINIBUFFER_WINDOW (XFRAME (tem));
if (NILP (tem))
tem = FRAME_ROOT_WINDOW (XFRAME (tem));
break; break;
} }
...@@ -2266,7 +2276,7 @@ showing that buffer, popping the buffer up if necessary.") ...@@ -2266,7 +2276,7 @@ showing that buffer, popping the buffer up if necessary.")
return Qnil; return Qnil;
} }
DEFUN ("scroll-left", Fscroll_left, Sscroll_left, 1, 1, "P", DEFUN ("scroll-left", Fscroll_left, Sscroll_left, 0, 1, "P",
"Scroll selected window display ARG columns left.\n\ "Scroll selected window display ARG columns left.\n\
Default for ARG is window width minus 2.") Default for ARG is window width minus 2.")
(arg) (arg)
...@@ -2284,7 +2294,7 @@ Default for ARG is window width minus 2.") ...@@ -2284,7 +2294,7 @@ Default for ARG is window width minus 2.")
+ XINT (arg))); + XINT (arg)));
} }
DEFUN ("scroll-right", Fscroll_right, Sscroll_right, 1, 1, "P", DEFUN ("scroll-right", Fscroll_right, Sscroll_right, 0, 1, "P",
"Scroll selected window display ARG columns right.\n\ "Scroll selected window display ARG columns right.\n\
Default for ARG is window width minus 2.") Default for ARG is window width minus 2.")
(arg) (arg)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment