Commit graph

276 commits

Author SHA1 Message Date
Richard M. Stallman e8edb3aef6 (Fdisplay_buffer): If pop_up_frames != 0,
consider just visible frames when looking for existing window.
1994-03-08 23:28:14 +00:00
Richard M. Stallman 89bca6129b (Fprevious_window, Fnext_window): ALL_FRAMES = visible
means consider only visible frames.
(window_loop): Likewise for FRAMES.
(Fget_buffer_window, Fget_largest_window, Fget_lru_window): Doc fix.
(Fdelete_windows_on): Doc fix.
1994-03-08 06:20:18 +00:00
Richard M. Stallman 3b5908ef61 (Fwindow_width): Doc fix. 1994-03-08 00:09:03 +00:00
Karl Heuer 77b24de6f6 (Fscroll_other_window): Doc fix. 1994-03-07 18:39:11 +00:00
Karl Heuer 8f6ea2e9b7 (Fset_window_configuration): Allow for menu-bar-lines to have changed since
the configuration was created.
1994-02-26 04:24:37 +00:00
Richard M. Stallman 573f41aba9 (unshow_buffer): Unconditionally set last_window_start. 1994-02-18 06:10:23 +00:00
Richard M. Stallman 4f2eb61d72 (Fdelete_other_windows): Don't call Frecenter;
do it by hand and avoid setting w->force_start.
1994-02-18 01:12:10 +00:00
Karl Heuer afdb248596 (Fpos_visible_in_window_p): Take hscroll into account. 1994-02-11 00:00:28 +00:00
Karl Heuer 33eb4ede43 (Fpos_visible_in_window_p): Return nil if POS > ZV. 1994-02-02 07:16:51 +00:00
Richard M. Stallman 5141b90115 (Fdisplay_buffer): If pop_up_frames, pass t to Fget_buffer_window. 1993-12-23 01:07:58 +00:00
Richard M. Stallman d895abb0ba (window_loop, case DELETE_BUFFER_WINDOWS):
Select a new buffer only if w is selected window.
1993-11-21 22:15:04 +00:00
Brian Fox 3cbbb729f9 (Fdelete_windows_on): Fix DEFUN to allow optional second arg to appear. 1993-09-22 18:14:10 +00:00
Roland McGrath 18160b98ce Include <config.h> instead of "config.h". 1993-09-10 06:15:46 +00:00
Richard M. Stallman a68c0d3b6e (enum window_loop): Delete final comma. 1993-08-11 20:46:27 +00:00
Richard M. Stallman f16a1ed371 (Frecenter): Preserve point in the buffer we change it in. 1993-08-11 19:29:19 +00:00
Jim Blandy 628df3bfd9 * window.c (check_frame_size): Include the menu bar height in the
minimum frame height.
1993-07-30 01:48:19 +00:00
Richard M. Stallman 5a41ab94d9 (Fset_window_buffer): Clear window_end_{pos,valid}. 1993-07-26 19:14:26 +00:00
Jim Blandy 26f6279de1 * window.c [not MULTI_FRAME] (Fdelete_windows_on): Set FRAME
argument to Qt, instead of trying to typecheck it.

	* window.c (Fdelete_windows_on): New optional argument FRAME; if
	nil, delete windows on all frames.  If t, delete windows on the
	selected frame only.  If a frame, delete windows on that frame
	only.

	* window.c (Fnext_window, Fprevious_window): Put these docstrings
	in comments; the strings are too long for some C compilers.
1993-07-18 06:28:40 +00:00
Jim Blandy 1bc981d2b5 Don't let the 'B' interactive spec default to buffers viewed in
any visible frame.
	* buffer.c (Fother_buffer): Pass Qt as the second argument
	to Fget_buffer_window.
	* window.c (window_loop): In GET_BUFFER_WINDOW case, ignore
	non-visible frames.
	(Fget_buffer_window): Change doc string to mention that passing Qt
	for the FRAME argument returns windows on visible frames only.
	(Qvisible): Removed.
1993-06-17 05:06:36 +00:00
Jim Blandy 75d8f6686c Don't let the 'B' interactive spec default to buffers viewed in
any visible frame.
	* buffer.c (Fother_buffer): Pass Qvisible as the second argument
	to Fget_buffer_window.
	* window.c (Qvisible): New symbol.
	(window_loop): In GET_BUFFER_WINDOW case, if frames is Qvisible,
	ignore non-visible frames.
	(Fget_buffer_window): Expand doc string to mention that Qvisible
	is an interesting value for FRAME argument.
	(syms_of_window): Init and staticpro Qvisible.
	* lisp.h (Qvisible): New declaration.
1993-06-17 00:39:37 +00:00
Jim Blandy 79f92720d1 * window.c (check_frame_size): Allow minibuffer-only frames to be
one line high.
1993-06-16 21:26:47 +00:00
Richard M. Stallman 0def0403ca (Fdelete_window): Handle deleting a parent of the selected window.
(Fdelete_window): Mostly undo last change which made `frame' a FRAME_PTR.
Don't initialize `frame' in the declaration.
1993-06-14 07:07:05 +00:00
Richard M. Stallman ae3050b389 (Fdelete_window): Make `frame' a FRAME_PTR and use as such. 1993-06-12 17:06:34 +00:00
Jim Blandy 5e12e32f7b * window.c (Fprevious_window): Use FRAME_HAS_MINIBUF_P to decide
if the frame has a minibuffer; FRAME_MINIBUF_WINDOW points to the
	surrogate on minibufferless frames, not nil.
1993-06-12 09:31:25 +00:00
Jim Blandy 7ee2a20445 * window.c (Fprevious_window): Typo. 1993-06-11 11:18:37 +00:00
Richard M. Stallman 644b477c86 (Fscroll_left): Make argument optional.
(Fscroll_right): Ditto.

(Fprevious_window): When changing frames,
use the new frame's minibuffer if any.
1993-06-10 20:08:25 +00:00
Richard M. Stallman 52a68e986d (Fset_window_configuration): If a window is supposed
to have a buffer, always give it one.

(syms_of_window): Always defvar pop-up-frames
and pop-up-frame-function.
1993-06-07 05:29:40 +00:00
Richard M. Stallman e36ab06b7f (Fset_window_buffer): Set window's force_start to Qnil. 1993-05-31 18:22:48 +00:00
Richard M. Stallman a2db42d60f (window_loop, case GET_LRU_WINDOW): Get frame's width properly. 1993-05-27 03:46:21 +00:00
Jim Blandy c6c5df7f76 Updated copyright years. 1993-05-22 21:34:42 +00:00
Jim Blandy 1f18c48f3a * window.c (window-dedicated-p): Doc fix. 1993-05-18 22:07:14 +00:00
Richard M. Stallman 3a68f530fe (Vmouse_event): Var deleted.
(syms_of_window): Don't make it  Lisp var.
1993-05-08 16:28:36 +00:00
Richard M. Stallman 6648f23a73 (Fdisplay_buffer): Add space to prompt. 1993-05-04 22:13:52 +00:00
Eric S. Raymond 270967b219 (Fset-window-buffer): Set horizontal-scrolling on a window to zero when
we connect it to a new buffer.
1993-04-25 06:15:18 +00:00
Richard M. Stallman d5b2799ef6 (Fselect_window): Use Fhandle_switch_frame.
(Fset_window_configuration): Likewise.
1993-03-21 06:50:50 +00:00
Jim Blandy 806b4d9b90 Rename live-window-p' to window-live-p', for consistency with
`frame-live-p'.
	* window.c (Fwindow_live_p): Renamed from Flive_window_p.
	* lisp.h (CHECK_LIVE_WINDOW): Change to use Qwindow_live_p.
	(Qwindow_live_p): Extern declaration renamed fom Qlive_window_p.
1993-03-16 05:55:57 +00:00
Richard M. Stallman 70728a80cb (Fdelete_other_windows): Handle FRAME_MENU_BAR_LINES. 1993-03-15 05:50:55 +00:00
Jim Blandy a3c87d4e63 Use the term scroll bar', instead of scrollbar'.
* alloc.c, frame.c, frame.h, indent.c, keyboard.c, keyboard.h,
	lisp.h, term.c, termhooks.h, window.c, window.h, xdisp.c, xfns.c,
	xterm.c, xterm.h: Terminology changed.
1993-03-02 08:22:42 +00:00
Jim Blandy f4e7b2c2ea * keyboard.c (recursive_edit_1, command_loop_1): Pass the proper
number of arguments to unbind_to.
	* lread.c (Feval_buffer): Same.
	* window.c (Fscroll_other_window): Same.

	* window.c (Fset_window_configuration): Pass the proper number of
	arguments to Fselect_frame.
1993-02-22 14:53:13 +00:00
Jim Blandy b8baad4034 * window.c (Fscroll_left, Fscroll_right): Don't forget to apply
XWINDOW to selected_window before passing it to window_internal_width.
1993-01-30 01:21:00 +00:00
Jim Blandy dbc4e1c129 JimB's changes since January 18th 1993-01-26 01:58:16 +00:00
Roland McGrath 46d3268aa2 (Fdisplay_buffer): Doc fix. 1993-01-19 00:56:45 +00:00
Richard M. Stallman b0c33a9470 (Fwindow_at): Doc fix. 1993-01-14 21:20:01 +00:00
Jim Blandy 535e0b8ef6 * window.c (window_internal_width): New function, which accounts
for scrollbars if present.
	* lisp.h (window_internal_height, window_internal_width): Add
	extern declarations for these.
	* dispnew.c (direct_output_for_insert, direct_output_forward_char,
	buffer_posn_from_coords): Use window_internal_width instead of
	writing out its definition.
	* indent.c (compute_motion): Doc fix; mention scrollbars and
	window_internal_width.
	(pos_tab_offset, Fvertical_motion): Use window_internal_width
	instead of writing it out.
	* window.c (Fpos_visible_in_window_p, Fwindow_width, Fscroll_left,
	Fscroll_right): Same.
	* xdisp.c (redisplay, try_window, try_window_id,
	display_text_line): Same.

	* termhooks.h (mouse_position_hook): Doc fix.
	(set_vertical_scrollbar_hook): This doesn't return anything any
	more, and doesn't take a struct scrollbar * argument any more.
	(condemn_scrollbars_hook, redeem_scrollbar_hook,
	judge_scrollbars_hook): Doc fixes.
	* term.c (mouse_position_hook): Doc fix.
	(set_vertical_scrollbar_hook): This doesn't return
	anything any more.  Doc fixes.
	* keyboard.c (kbd_buffer_get_event): Receive the scrollbar's
	window from *mouse_position_hook and pass it to
	make_lispy_movement, instead of working with a pointer to a struct
	scrollbar.
	(make_lispy_event): We don't need a window_from_scrollbar function
	anymore; we are given the window directly in *EVENT.
	Unify the code which generates
	text-area mouse clicks and scrollbar clicks; use the same code to
	distinguish clicks from drags on the scrollbar as in the text area.
	Distinguish clicks from drags by storing a copy of the lispy
	position list returned as part of the event.
	(button_down_location): Make this a lisp vector, rather than an
	array of random structures.
	(struct mouse_position): Remove this; it's been replaced by a lisp
	list.
	(make_lispy_movement): Accept the scrollbar's window as a
	parameter, rather than the scrollbar itself.
	If FRAME is zero, assume that the other arguments are garbage.
	(syms_of_keyboard): No need to staticpro each window of
	button_down_location now; just initialize and staticpro it.
	* window.c (window_from_scrollbar): Function deleted; no longer
	needed.
	* xdisp.c (redisplay_window): Just pass the window to
	set_vertical_scrollbar hook; don't pass the scrollbar object too.
	* xterm.c (XTmouse_position): Don't return a pointer to the
	scrollbar for scrollbar motion; instead, return the scrollbar's
	window.
1993-01-14 15:17:11 +00:00
Jim Blandy db269683bc * keyboard.c (Qscrollbar_movement, Qvertical_scrollbar,
Qabove_handle, Qhandle, Qbelow_handle): New symbols.
	(make_lispy_event): New code to build scrollbar clicks.
	(make_lispy_movement): New code to handle scrollbar movement.
	(head_table): Include Qscrollbar_movement in the event heads.
	(syms_of_keyboard): Init and staticpro Qvertical_scrollbar,
	Qabove_handle, Qhandle, and Qbelow_handle.
	* keyboard.h (Qscrollbar_movement): Declare this along with the
	other event types.
	* lisp.h (Qvertical_scrollbar): Declare this.
	* window.c (window_from_scrollbar): New function.

	* window.c (Fset_window_configuration): Don't restore the frame's
	focus redirection if the target frame is now dead.
1992-12-24 06:16:36 +00:00
Jim Blandy fd482be5a7 * window.c (Fset_window_configuration): If we're restoring the
configuration of a dead frame, don't bother rebuilding its window
	tree, restoring its focus redirection, or temporarily resizing it
	to fit the saved window configuration.  If the frame which was
	selected when the configuration was captured is now dead, don't
	try to select it.

	* frame.c (Fdelete_frame): Delete all the windows in the frame's
	window tree, using delete_all_subwindows.
	* window.c (delete_all_subwindows): Don't make this static
	anymore.
1992-12-12 15:38:45 +00:00
Jim Blandy ad85424916 * window.c (Fset_window_configuration): Protect call to
Fselect_frame with a #ifdef MULTI_FRAME.
	[not MULTI_FRAME] (Fcurrent_window_configuration): Don't bother
	setting the window configuration's selected_frame member.
1992-11-07 07:37:42 +00:00
Jim Blandy 7f4161e011 * window.c (Fwindow_width, Fset_window_hscroll): Use accessors on
w->width, w->left, w->hscroll, and arguments.
	(replace_window): Use EQ, not ==.
	(Fdelete_window): p->top and p->left are not C integers.
	(Fnext_window, Fprevious_window): Use EQ, not ==.
1992-10-31 05:39:49 +00:00
Jim Blandy 605be8af79 * window.c: Try to deal coherently with deleted windows:
*	(Flive_window_p): New function.
	(Qlive_window_p): New variable, to name it in type errors.
	(syms_of_window): Defsubr Slive_window_p, init and staticpro
	Qlive_window_p.
	(decode_window): Use CHECK_LIVE_WINDOW instead of
	CHECK_WINDOW; the only thing a user should be able to do to a dead
	window is check its type.
	(Fcoordinates_in_window_p, Fnext_window, Fprevious_window,
	Fdelete_other_windows, Fselect_window, Fsplit_window,
	Fscroll_other_window): Use CHECK_LIVE_WINDOW instead of
	CHECK_WINDOW.
	(Fdelete_window): If WINDOW is a deleted window, do nothing;
	there's no harm in allowing people to delete deleted windows.
	Delete all of WINDOW's subwindows, too.
	(delete_all_subwindows): Set the buffer, vchild, and hchild of the
	windows we delete all to nil.

	* window.c (Fwindow_minibuffer_p): Make the WINDOW argument
	optional, like all the other window-querying functions.

	* window.c (Fpos_visible_in_window_p): Use decode_window to handle
	the WINDOW argument, instead of writing out that function's code.

	* window.c (check_frame_size): Don't define this extern; that
	doesn't mean anything.

	* window.c (Fdelete_window): Choose an alternative when we delete
	any frame's selected window, not just when we delete the selected
	frame's selected window.
1992-10-19 18:46:29 +00:00
Richard M. Stallman faa64cf7ba (window_loop): Pass 2nd arg to Fother_buffer. 1992-10-06 00:02:06 +00:00
Richard M. Stallman 99e5add39c Doc fix. 1992-10-05 07:37:10 +00:00
Jim Blandy ff06df24f6 * window.c (SAVE_WINDOW_DATA_SIZE): Define this using sizeof,
instead of just saying it's 7; that way, we won't get screwed if
	we add members to struct save_window_data.

	* window.c (Fset_window_configuration): The pointer to the
	saved window data is called `data', not just `d'.
1992-10-03 07:15:35 +00:00
Jim Blandy bdc727bf41 * window.c (struct save_window_data): Save the currently selected
frame, too.
	(Fset_window_configuration): Restore the frame's selected window
	using Fselect_window, and then restore the selected frame using
	Fselect_frame.
	(Fcurrent_window_configuration): Record the currently selected
	frame.  Update docstring to describe the information now recorded.

	* window.c (Fset_window_configuration): Clean up the way we save
	and restore the frame's size.

        * window.c (struct save_window_data): Add a member called
	focus_frame, to save and restore the screen's focus frame.
	(Fset_window_configuration): Redirect the frame's focus as
	indicated in the window configuration.
	(Fcurrent_window_configuration): Record the frame's current focus.
1992-10-03 05:42:42 +00:00
Jim Blandy e8121f2afa * window.c (Fset_window_configuration): Don't select the frame
just because we restored its configuration.

	* window.c (Fset_window_configuration): Don't forget to set the
	frame's selected window when we can't call Fselect_window.
1992-09-30 14:28:46 +00:00
Jim Blandy 9ace597fcf * window.c (delete_all_subwindows): Save the window's buffer in
its `height' field; we may need to know the window's old buffer
	once we have restored it from a window configuration.
	Fset_window_configuration): When we restore a window, if its
	`height' field is a buffer, restore its `buffer' field from that.
	This allows us to leave the window's buffer unchanged if the
	buffer recorded in the configuration is dead.

	* window.c (delete_all_subwindows): Removed unused variable named
	"count".
1992-09-28 06:10:03 +00:00
Jim Blandy 83762ba49a * window.c (minibuffer_window): Accept an optional FRAME argument;
if specified, return the minibuffer used by that frame.

	* window.c (Fset_window_configuration): Don't signal an error
	if the frame size saved in the window configuration doesn't
	match the frame's current size; instead, temporarily resize
	the frame while installing the window configuration.  This is
	important because using the minibuffer saves and restores the
	current window configuration, and you don't want to signal an
	error just because the user resized the frame while using the
	minibuffer.
1992-09-13 12:38:21 +00:00
Jim Blandy 05c2896ac5 * window.c (coordinates_in_window): Do not assume that all
one-line windows are the minibuffer, or that all minibuffers are
	one line high.  Use MINI_WINDOW_P.

	* window.c (change_window_height): If the size of the window will
	shrink below the minimum, this code would only try to delete it if
	it had a parent.  Well, even if the window doesn't have a parent,
	you want Fdelete_window to signal an error, since you're trying to
	resize one of the undeleteable windows into nothingness.  So call
	Fdelete_window even if the window doesn't have a parent.

	* window.c (MINSIZE): Add kludge so that the minibuffer is always
	allowed to shrink to one line in height.
	(MINSIZE, CURBEG, CURSIZE): Change these so that their argument
	are always Lisp_Objects, not struct window *'s.
	(change_window_height): Changed accordingly.
1992-08-29 03:14:44 +00:00
Jim Blandy 2f83aebe09 * window.c (Fset_window_configuration): Removed #if 0'd code which
assumes that minibuf_window is on the same frame as the window
	configuration.  Removed special case for windows whose prevs
	point to themselves.

	* window.c (Fset_window_configuration): Rename the argument from
	ARG to CONFIGURATION, so it matches the docstring.  The
	make-docfile program cares.

	* window.c [MULTI_FRAME] (syms_of_window): Don't staticpro
	minibuf_window; the frame list will take care of it.

	* window.c (window_loop): This used to keep track of the first
	window processed and wait until we came back around to it.  Sadly,
	this doesn't work if that window gets deleted.  So instead, use
	Fprevious_window to find the last window to process, and loop
	until we've done that one.

	* window.c [not MULTI_FRAME] (init_window_once): Don't forget to
	set the `mini_p' flag on the new minibuffer window to t.

	* window.c (Fwindow_at): Don't check the type of the frame
	argument.

	* window.c [not MULTI_FRAME] (window_loop): Set frame to zero,
	instead of trying to decode it.

	* window.c (init_window_once): Initialize minibuf_window before
	FRAME_ROOT_WINDOW, so the latter actually points to something.
1992-08-19 06:40:02 +00:00
Jim Blandy 4b206065b9 * window.c (window_loop): This used to keep track of the first
window processed and wait until we came back around to it.  Sadly,
	this doesn't work if that window gets deleted.  So instead, use
	Fprevious_window to find the last window to process, and loop
	until we've done that one.

	* window.c [not MULTI_FRAME] (init_window_once): Don't forget to
	set the `mini_p' flag on the new minibuffer window to t.

	* window.c (Fwindow_at): Don't check the type of the frame
	argument.

	* window.c [not MULTI_FRAME] (window_loop): Set frame to zero,
	instead of trying to decode it.

	* window.c (init_window_once): Initialize minibuf_window before
	FRAME_ROOT_WINDOW, so the latter actually points to something.
1992-08-14 02:27:26 +00:00
Jim Blandy a481b3ea0c * window.c (MIN_SAFE_WINDOW_HEIGHT, MIN_SAFE_WINDOW_WIDTH): Macros
defined here now, rather than window.h.
	(check_frame_size): New function.

	* window.c (FRAME_IS_TERMCAP, FRAME_IS_X, FRAME_HAS_MINIBUF):
	Renamed these to FRAME_TERMCAP_P, FRAME_X_P, and
	FRAME_HAS_MINIBUF_P, for consistency with the rest of the
	frame macros.

	* window.c (check_min_window_sizes): New function.
	(set_window_height): Call it.
	(Fsplit_window, change_window_height): Call it, instead of writing
	out its code.
1992-08-12 14:28:27 +00:00
Jim Blandy 700f75a481 entered into RCS 1992-07-15 03:25:30 +00:00
Jim Blandy 44fa5b1e24 *** empty log message *** 1992-07-14 15:21:18 +00:00
Roland McGrath 35aaf00cff *** empty log message *** 1992-07-02 02:36:29 +00:00
Jim Blandy e5d77022e8 *** empty log message *** 1992-06-30 13:54:21 +00:00
Richard M. Stallman d207b766c8 *** empty log message *** 1992-06-23 21:48:27 +00:00
Jim Blandy 1113d9db4b *** empty log message *** 1992-06-10 03:53:16 +00:00
Richard M. Stallman ab17c3f26e *** empty log message *** 1992-06-03 22:58:36 +00:00
Jim Blandy 3a2712f9be *** empty log message *** 1992-02-21 05:39:59 +00:00
Jim Blandy 95605e15f1 *** empty log message *** 1992-02-12 03:35:14 +00:00
Jim Blandy f8026fd834 *** empty log message *** 1992-01-31 20:02:34 +00:00
Jim Blandy 265a9e559d *** empty log message *** 1992-01-13 21:48:08 +00:00
Jim Blandy d5783c4084 *** empty log message *** 1991-11-15 22:14:20 +00:00
Jim Blandy 1d8d96fa60 *** empty log message *** 1991-07-28 14:50:08 +00:00
Jim Blandy 43bad9918a *** empty log message *** 1991-07-27 06:54:44 +00:00
Jim Blandy 62c07cc72d *** empty log message *** 1991-07-19 16:05:34 +00:00
Jim Blandy 7ab12479e9 Initial revision 1991-05-13 16:00:04 +00:00