/* Window creation, deletion and examination for GNU Emacs.
Does not include redisplay.
- Copyright (C) 1985-1987, 1993-1998, 2000-2012
- Free Software Foundation, Inc.
+ Copyright (C) 1985-1987, 1993-1998, 2000-2013 Free Software
+ Foundation, Inc.
This file is part of GNU Emacs.
}
DEFUN ("select-window", Fselect_window, Sselect_window, 1, 2, 0,
- doc: /* Select WINDOW. Most editing will apply to WINDOW's buffer.
-Also make WINDOW's buffer current and make WINDOW the frame's selected
-window. Return WINDOW.
+ doc: /* Select WINDOW which must be a live window.
+Also make WINDOW's frame the selected frame and WINDOW that frame's
+selected window. In addition, make WINDOW's buffer current and set that
+buffer's value of `point' to the value of WINDOW's `window-point'.
+Return WINDOW.
Optional second arg NORECORD non-nil means do not put this buffer at the
front of the buffer list and do not make this window the most recently
DEFUN ("window-combination-limit", Fwindow_combination_limit, Swindow_combination_limit, 1, 1, 0,
doc: /* Return combination limit of window WINDOW.
-WINDOW must be a valid window and defaults to the selected one.
-If the return value is nil, child windows of WINDOW can be recombined with
-WINDOW's siblings. A return value of t means that child windows of
-WINDOW are never \(re-)combined with WINDOW's siblings. */)
+If the return value is nil, child windows of WINDOW can be recombined
+with WINDOW's siblings. A return value of t means that child windows of
+WINDOW are never \(re-)combined with WINDOW's siblings.
+
+WINDOW must be a valid window. The return value is meaningful for
+internal windows only. */)
(Lisp_Object window)
{
return decode_valid_window (window)->combination_limit;
DEFUN ("set-window-combination-limit", Fset_window_combination_limit, Sset_window_combination_limit, 2, 2, 0,
doc: /* Set combination limit of window WINDOW to LIMIT; return LIMIT.
-WINDOW must be a valid window and defaults to the selected one.
If LIMIT is nil, child windows of WINDOW can be recombined with WINDOW's
siblings. LIMIT t means that child windows of WINDOW are never
\(re-)combined with WINDOW's siblings. Other values are reserved for
-future use. */)
+future use.
+
+WINDOW must be a valid window. Setting the combination limit is
+meaningful for internal windows only. */)
(Lisp_Object window, Lisp_Object limit)
{
wset_combination_limit (decode_valid_window (window), limit);
#endif
if (! NILP (update)
- && ! (! NILP (w->window_end_valid)
- && w->last_modified >= BUF_MODIFF (b)
- && w->last_overlay_modified >= BUF_OVERLAY_MODIFF (b))
+ && (windows_or_buffers_changed || NILP (w->window_end_valid))
&& !noninteractive)
{
struct text_pos startp;
return Qnil;
}
-
+/* Obsolete since 24.3. */
void
temp_output_buffer_show (register Lisp_Object buf)
{
}
}
}
-
-DEFUN ("internal-temp-output-buffer-show",
- Ftemp_output_buffer_show, Stemp_output_buffer_show,
- 1, 1, 0,
- doc: /* Internal function for `with-output-to-temp-buffer'. */)
- (Lisp_Object buf)
-{
- temp_output_buffer_show (buf);
- return Qnil;
-}
\f
/* Make new window, have it replace WINDOW in window-tree, and make
WINDOW its only vertical child (HORFLAG 1 means make WINDOW its only
(m, make_number (XINT (r->top_line) + XINT (r->total_lines)));
}
}
+
+ windows_or_buffers_changed++;
}
make_parent_window (old, horflag);
p = XWINDOW (o->parent);
- /* Store t in the new parent's combination_limit slot to avoid
- that its children get merged into another window. */
- wset_combination_limit (p, Qt);
+ if (EQ (Vwindow_combination_limit, Qt))
+ /* Store t in the new parent's combination_limit slot to avoid
+ that its children get merged into another window. */
+ wset_combination_limit (p, Qt);
/* These get applied below. */
wset_new_total (p, horflag ? o->total_cols : o->total_lines);
wset_new_normal (p, new_normal);
w->last_modified = 0;
w->last_overlay_modified = 0;
+ windows_or_buffers_changed++;
adjust_glyphs (f);
unblock_input ();
}
w->last_modified = 0;
w->last_overlay_modified = 0;
+ windows_or_buffers_changed++;
adjust_glyphs (f);
unblock_input ();
}
(Lisp_Object window, Lisp_Object pixels_p)
{
Lisp_Object result;
- struct frame *f;
- struct window *w;
-
- if (NILP (window))
- window = selected_window;
- else
- CHECK_WINDOW (window);
- w = XWINDOW (window);
- f = XFRAME (w->frame);
+ struct window *w = decode_live_window (window);
+ struct frame *f = XFRAME (w->frame);
if (FRAME_WINDOW_P (f))
result = (NILP (pixels_p)
If PIXELS-P is non-nil, the return value is VSCROLL. */)
(Lisp_Object window, Lisp_Object vscroll, Lisp_Object pixels_p)
{
- struct window *w;
- struct frame *f;
+ struct window *w = decode_live_window (window);
+ struct frame *f = XFRAME (w->frame);
- if (NILP (window))
- window = selected_window;
- else
- CHECK_WINDOW (window);
CHECK_NUMBER_OR_FLOAT (vscroll);
- w = XWINDOW (window);
- f = XFRAME (w->frame);
-
if (FRAME_WINDOW_P (f))
{
int old_dy = w->vscroll;
defsubr (&Srun_window_configuration_change_hook);
defsubr (&Sselect_window);
defsubr (&Sforce_window_update);
- defsubr (&Stemp_output_buffer_show);
defsubr (&Ssplit_window_internal);
defsubr (&Sscroll_up);
defsubr (&Sscroll_down);