return XWINDOW (window);
}
+static struct window *
+decode_any_window (window)
+ register Lisp_Object window;
+{
+ if (NILP (window))
+ return XWINDOW (selected_window);
+
+ CHECK_WINDOW (window);
+ return XWINDOW (window);
+}
+
DEFUN ("window-buffer", Fwindow_buffer, Swindow_buffer, 0, 1, 0,
doc: /* Return the buffer that WINDOW is displaying. */)
(window)
(window)
Lisp_Object window;
{
- return decode_window (window)->total_lines;
+ return decode_any_window (window)->total_lines;
}
DEFUN ("window-width", Fwindow_width, Swindow_width, 0, 1, 0,
(window)
Lisp_Object window;
{
- return make_number (window_box_text_cols (decode_window (window)));
+ return make_number (window_box_text_cols (decode_any_window (window)));
}
DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0,
(window)
Lisp_Object window;
{
- register struct window *w = decode_window (window);
+ register struct window *w = decode_any_window (window);
return Fcons (make_number (WINDOW_LEFT_EDGE_COL (w)),
Fcons (make_number (WINDOW_TOP_EDGE_LINE (w)),
(window)
Lisp_Object window;
{
- register struct window *w = decode_window (window);
+ register struct window *w = decode_any_window (window);
return Fcons (make_number (WINDOW_LEFT_EDGE_X (w)),
Fcons (make_number (WINDOW_TOP_EDGE_Y (w)),
(window)
Lisp_Object window;
{
- register struct window *w = decode_window (window);
+ register struct window *w = decode_any_window (window);
return list4 (make_number (WINDOW_BOX_LEFT_EDGE_COL (w)
+ WINDOW_LEFT_MARGIN_COLS (w)
(window)
Lisp_Object window;
{
- register struct window *w = decode_window (window);
+ register struct window *w = decode_any_window (window);
return list4 (make_number (WINDOW_BOX_LEFT_EDGE_X (w)
+ WINDOW_LEFT_MARGIN_WIDTH (w)
int x, y;
Lisp_Object lx, ly;
- CHECK_LIVE_WINDOW (window);
+ CHECK_WINDOW (window);
w = XWINDOW (window);
f = XFRAME (w->frame);
CHECK_CONS (coordinates);