Commit abde8f8c authored by Martin Rudalics's avatar Martin Rudalics

Install some window-size related functions and window-list-1.

* window.c (Fwindow_total_size, Fwindow_left_column)
(Fwindow_top_line, window_body_lines, Fwindow_body_size)
(Fwindow_list_1): New functions.
(window_box_text_cols): Replace with window_body_cols.
(Fwindow_width, Fscroll_left, Fscroll_right): Use
window_body_cols instead of window_box_text_cols.

* window.h: Extern window_body_cols instead of
window_box_text_cols.

* indent.c (compute_motion, Fcompute_motion): Use
window_body_cols instead of window_box_text_cols.
parent 81eafe29
2011-06-07 Martin Rudalics <rudalics@gmx.at>
* window.c (Fwindow_total_size, Fwindow_left_column)
(Fwindow_top_line, window_body_lines, Fwindow_body_size)
(Fwindow_list_1): New functions.
(window_box_text_cols): Replace with window_body_cols.
(Fwindow_width, Fscroll_left, Fscroll_right): Use
window_body_cols instead of window_box_text_cols.
* window.h: Extern window_body_cols instead of
window_box_text_cols.
* indent.c (compute_motion, Fcompute_motion): Use
window_body_cols instead of window_box_text_cols.
2011-06-07 Daniel Colascione <dan.colascione@gmail.com> 2011-06-07 Daniel Colascione <dan.colascione@gmail.com>
* fns.c (Fputhash): Document return value. * fns.c (Fputhash): Document return value.
......
...@@ -1102,8 +1102,8 @@ static struct position val_compute_motion; ...@@ -1102,8 +1102,8 @@ static struct position val_compute_motion;
WINDOW_HAS_VERTICAL_SCROLL_BAR (window) WINDOW_HAS_VERTICAL_SCROLL_BAR (window)
and frame_cols = FRAME_COLS (XFRAME (window->frame)) and frame_cols = FRAME_COLS (XFRAME (window->frame))
Or you can let window_box_text_cols do this all for you, and write: Or you can let window_body_cols do this all for you, and write:
window_box_text_cols (w) - 1 window_body_cols (w) - 1
The `-1' accounts for the continuation-line backslashes; the rest The `-1' accounts for the continuation-line backslashes; the rest
accounts for window borders if the window is split horizontally, and accounts for window borders if the window is split horizontally, and
...@@ -1179,7 +1179,7 @@ compute_motion (EMACS_INT from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_ ...@@ -1179,7 +1179,7 @@ compute_motion (EMACS_INT from, EMACS_INT fromvpos, EMACS_INT fromhpos, int did_
/* Negative width means use all available text columns. */ /* Negative width means use all available text columns. */
if (width < 0) if (width < 0)
{ {
width = window_box_text_cols (win); width = window_body_cols (win);
/* We must make room for continuation marks if we don't have fringes. */ /* We must make room for continuation marks if we don't have fringes. */
#ifdef HAVE_WINDOW_SYSTEM #ifdef HAVE_WINDOW_SYSTEM
if (!FRAME_WINDOW_P (XFRAME (win->frame))) if (!FRAME_WINDOW_P (XFRAME (win->frame)))
...@@ -1792,7 +1792,7 @@ visible section of the buffer, and pass LINE and COL as TOPOS. */) ...@@ -1792,7 +1792,7 @@ visible section of the buffer, and pass LINE and COL as TOPOS. */)
? window_internal_height (w) ? window_internal_height (w)
: XINT (XCDR (topos))), : XINT (XCDR (topos))),
(NILP (topos) (NILP (topos)
? (window_box_text_cols (w) ? (window_body_cols (w)
- ( - (
#ifdef HAVE_WINDOW_SYSTEM #ifdef HAVE_WINDOW_SYSTEM
FRAME_WINDOW_P (XFRAME (w->frame)) ? 0 : FRAME_WINDOW_P (XFRAME (w->frame)) ? 0 :
......
This diff is collapsed.
...@@ -867,6 +867,6 @@ extern void init_window (void); ...@@ -867,6 +867,6 @@ extern void init_window (void);
extern void syms_of_window (void); extern void syms_of_window (void);
extern void keys_of_window (void); extern void keys_of_window (void);
extern int window_box_text_cols (struct window *w); extern int window_body_cols (struct window *w);
#endif /* not WINDOW_H_INCLUDED */ #endif /* not WINDOW_H_INCLUDED */
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