aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Rudalics2011-06-08 07:40:45 +0200
committerMartin Rudalics2011-06-08 07:40:45 +0200
commitf3d1777e719dce79af5b78950deeff9e30ce00b0 (patch)
tree5784ceca0d5f094f05804d5075c045c25a299d8a
parent18af70d0258153a042be9fd71d4eb090f7189a8f (diff)
downloademacs-f3d1777e719dce79af5b78950deeff9e30ce00b0.tar.gz
emacs-f3d1777e719dce79af5b78950deeff9e30ce00b0.zip
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.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/window.el6
-rw-r--r--src/ChangeLog5
-rw-r--r--src/window.c36
4 files changed, 16 insertions, 36 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index e5911a35db2..5838d198d9b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12011-06-08 Martin Rudalics <rudalics@gmx.at>
2
3 * window.el (window-height): Defalias to window-total-height.
4 (window-width): Defalias to window-body-width.
5
12011-06-07 Chong Yidong <cyd@stupidchicken.com> 62011-06-07 Chong Yidong <cyd@stupidchicken.com>
2 7
3 * image-mode.el (image-toggle-animation): New command. 8 * 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
900`line-spacing' when calculating the number of lines in WINDOW." 900`line-spacing' when calculating the number of lines in WINDOW."
901 (window-total-size window)) 901 (window-total-size window))
902 902
903;; Eventually we should make `window-height' obsolete.
904(defalias 'window-height 'window-total-height)
905
903;; See discussion in bug#4543. 906;; See discussion in bug#4543.
904(defsubst window-full-height-p (&optional window) 907(defsubst window-full-height-p (&optional window)
905 "Return t if WINDOW is as high as the containing frame. 908 "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
951display margins either." 954display margins either."
952 (window-body-size window t)) 955 (window-body-size window t))
953 956
957;; Eventually we should make `window-height' obsolete.
958(defalias 'window-width 'window-body-width)
959
954(defun one-window-p (&optional nomini all-frames) 960(defun one-window-p (&optional nomini all-frames)
955 "Return non-nil if the selected window is the only window. 961 "Return non-nil if the selected window is the only window.
956Optional arg NOMINI non-nil means don't count the minibuffer 962Optional 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 @@
12011-06-08 Martin Rudalics <rudalics@gmx.at>
2
3 * window.c (Fwindow_height, Fwindow_width, Fwindow_full_width_p):
4 Remove.
5
12011-06-07 Martin Rudalics <rudalics@gmx.at> 62011-06-07 Martin Rudalics <rudalics@gmx.at>
2 7
3 * window.c (Fwindow_total_size, Fwindow_left_column) 8 * 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. */)
800 return make_number (window_body_cols (w)); 800 return make_number (window_body_cols (w));
801} 801}
802 802
803DEFUN ("window-height", Fwindow_height, Swindow_height, 0, 1, 0,
804 doc: /* Return the number of lines in WINDOW.
805WINDOW defaults to the selected window.
806
807The return value includes WINDOW's mode line and header line, if any.
808
809Note: The function does not take into account the value of `line-spacing'
810when calculating the number of lines in WINDOW. */)
811 (Lisp_Object window)
812{
813 return decode_any_window (window)->total_lines;
814}
815
816DEFUN ("window-width", Fwindow_width, Swindow_width, 0, 1, 0,
817 doc: /* Return the number of display columns in WINDOW.
818WINDOW defaults to the selected window.
819
820Note: The return value is the number of columns available for text in
821WINDOW. If you want to find out how many columns WINDOW takes up, use
822(let ((edges (window-edges))) (- (nth 2 edges) (nth 0 edges))). */)
823 (Lisp_Object window)
824{
825 return make_number (window_body_cols (decode_any_window (window)));
826}
827
828DEFUN ("window-full-width-p", Fwindow_full_width_p, Swindow_full_width_p, 0, 1, 0,
829 doc: /* Return t if WINDOW is as wide as its frame.
830WINDOW defaults to the selected window. */)
831 (Lisp_Object window)
832{
833 return WINDOW_FULL_WIDTH_P (decode_any_window (window)) ? Qt : Qnil;
834}
835
836DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, 803DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0,
837 doc: /* Return the number of columns by which WINDOW is scrolled from left margin. 804 doc: /* Return the number of columns by which WINDOW is scrolled from left margin.
838WINDOW defaults to the selected window. */) 805WINDOW defaults to the selected window. */)
@@ -7325,9 +7292,6 @@ frame to be redrawn only if it is a tty frame. */);
7325 defsubr (&Swindow_left_column); 7292 defsubr (&Swindow_left_column);
7326 defsubr (&Swindow_total_size); 7293 defsubr (&Swindow_total_size);
7327 defsubr (&Swindow_body_size); 7294 defsubr (&Swindow_body_size);
7328 defsubr (&Swindow_height);
7329 defsubr (&Swindow_width);
7330 defsubr (&Swindow_full_width_p);
7331 defsubr (&Swindow_hscroll); 7295 defsubr (&Swindow_hscroll);
7332 defsubr (&Sset_window_hscroll); 7296 defsubr (&Sset_window_hscroll);
7333 defsubr (&Swindow_redisplay_end_trigger); 7297 defsubr (&Swindow_redisplay_end_trigger);