Commit f3d1777e authored by Martin Rudalics's avatar Martin Rudalics

window-height, window-width, and window-full-width-p are now in window.el.

* window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
Remove.
* window.el (window-height): Defalias to window-total-height.
(window-width): Defalias to window-body-width.
parent 18af70d0
2011-06-08 Martin Rudalics <rudalics@gmx.at>
* window.el (window-height): Defalias to window-total-height.
(window-width): Defalias to window-body-width.
2011-06-07 Chong Yidong <cyd@stupidchicken.com>
* image-mode.el (image-toggle-animation): New command.
......
......@@ -900,6 +900,9 @@ Note: This function does not take into account the value of
`line-spacing' when calculating the number of lines in WINDOW."
(window-total-size window))
;; Eventually we should make `window-height' obsolete.
(defalias 'window-height 'window-total-height)
;; See discussion in bug#4543.
(defsubst window-full-height-p (&optional window)
"Return t if WINDOW is as high as the containing frame.
......@@ -951,6 +954,9 @@ not include the number of columns used for WINDOW's fringes or
display margins either."
(window-body-size window t))
;; Eventually we should make `window-height' obsolete.
(defalias 'window-width 'window-body-width)
(defun one-window-p (&optional nomini all-frames)
"Return non-nil if the selected window is the only window.
Optional arg NOMINI non-nil means don't count the minibuffer
......
2011-06-08 Martin Rudalics <rudalics@gmx.at>
* window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
Remove.
2011-06-07 Martin Rudalics <rudalics@gmx.at>
* window.c (Fwindow_total_size, Fwindow_left_column)
......
......@@ -800,39 +800,6 @@ WINDOW's fringes or display margins either. */)
return make_number (window_body_cols (w));
}
DEFUN ("window-height", Fwindow_height, Swindow_height, 0, 1, 0,
doc: /* Return the number of lines in WINDOW.
WINDOW defaults to the selected window.
The return value includes WINDOW's mode line and header line, if any.
Note: The function does not take into account the value of `line-spacing'
when calculating the number of lines in WINDOW. */)
(Lisp_Object window)
{
return decode_any_window (window)->total_lines;
}
DEFUN ("window-width", Fwindow_width, Swindow_width, 0, 1, 0,
doc: /* Return the number of display columns in WINDOW.
WINDOW defaults to the selected window.
Note: The return value is the number of columns available for text in
WINDOW. If you want to find out how many columns WINDOW takes up, use
(let ((edges (window-edges))) (- (nth 2 edges) (nth 0 edges))). */)
(Lisp_Object window)
{
return make_number (window_body_cols (decode_any_window (window)));
}
DEFUN ("window-full-width-p", Fwindow_full_width_p, Swindow_full_width_p, 0, 1, 0,
doc: /* Return t if WINDOW is as wide as its frame.
WINDOW defaults to the selected window. */)
(Lisp_Object window)
{
return WINDOW_FULL_WIDTH_P (decode_any_window (window)) ? Qt : Qnil;
}
DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0,
doc: /* Return the number of columns by which WINDOW is scrolled from left margin.
WINDOW defaults to the selected window. */)
......@@ -7325,9 +7292,6 @@ frame to be redrawn only if it is a tty frame. */);
defsubr (&Swindow_left_column);
defsubr (&Swindow_total_size);
defsubr (&Swindow_body_size);
defsubr (&Swindow_height);
defsubr (&Swindow_width);
defsubr (&Swindow_full_width_p);
defsubr (&Swindow_hscroll);
defsubr (&Sset_window_hscroll);
defsubr (&Swindow_redisplay_end_trigger);
......
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