From: Martin Rudalics Date: Wed, 8 Jun 2011 05:40:45 +0000 (+0200) Subject: window-height, window-width, and window-full-width-p are now in window.el. X-Git-Tag: emacs-pretest-24.0.90~104^2~616 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f3d1777e719dce79af5b78950deeff9e30ce00b0;p=emacs.git 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. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e5911a35db2..5838d198d9b 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2011-06-08 Martin Rudalics + + * window.el (window-height): Defalias to window-total-height. + (window-width): Defalias to window-body-width. + 2011-06-07 Chong Yidong * image-mode.el (image-toggle-animation): New command. diff --git a/lisp/window.el b/lisp/window.el index 856ec66a005..98c49faaf28 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -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 diff --git a/src/ChangeLog b/src/ChangeLog index 435b5ea7468..206f1362b8e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2011-06-08 Martin Rudalics + + * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p): + Remove. + 2011-06-07 Martin Rudalics * window.c (Fwindow_total_size, Fwindow_left_column) diff --git a/src/window.c b/src/window.c index 5b95db634a0..786619df755 100644 --- a/src/window.c +++ b/src/window.c @@ -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);