diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-08-17 18:42:52 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-08-17 18:42:52 -0700 |
commit | e8c17b818670b73acc2499b501aef3aab2ae8e58 (patch) | |
tree | c337fcdcfe153432f7af6ceccae7e09dc80f0285 /src/window.h | |
parent | 3f22b86fc7d9b66ff3e332b9a56350e93ddbd0aa (diff) | |
download | emacs-e8c17b818670b73acc2499b501aef3aab2ae8e58.tar.gz |
* window.h (WSET): Remove.
Replace all uses with calls to new setter functions.
Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
(WINDOW_INLINE): New macro.
(wset_buffer, wset_frame, wset_left_col, wset_next, wset_prev)
(wset_redisplay_end_trigger, wset_top_line, wset_total_cols)
(wset_total_lines, wset_vertical_scroll_bar)
(wset_window_end_pos, wset_window_end_valid)
(wset_window_end_vpos): New setter functions.
* window.c (WINDOW_INLINE):
Define to EXTERN_INLINE, so that the corresponding functions
are compiled into code.
(wset_combination_limit, wset_dedicated, wset_display_table)
(wset_hchild, wset_left_fringe_width, wset_left_margin_cols)
(wset_new_normal, wset_new_total, wset_next_buffers)
(wset_normal_cols, wset_normal_lines, wset_parent, wset_pointm)
(wset_prev_buffers, wset_right_fringe_width)
(wset_right_margin_cols, wset_scroll_bar_width, wset_start)
(wset_temslot, wset_vchild, wset_vertical_scroll_bar_type)
(wset_window_parameters):
* xdisp.c (wset_base_line_number, wset_base_line_pos)
(wset_column_number_displayed, wset_region_showing):
New setter functions.
Fixes: debbugs:12215
Diffstat (limited to 'src/window.h')
-rw-r--r-- | src/window.h | 80 |
1 files changed, 76 insertions, 4 deletions
diff --git a/src/window.h b/src/window.h index 77b31dafd8b..28b9678b667 100644 --- a/src/window.h +++ b/src/window.h @@ -22,6 +22,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include "dispextern.h" +INLINE_HEADER_BEGIN +#ifndef WINDOW_INLINE +# define WINDOW_INLINE INLINE +#endif + extern Lisp_Object Qleft, Qright; /* Windows are allocated as if they were vectors, but then the @@ -86,10 +91,6 @@ struct cursor_pos int hpos, vpos; }; -/* Most code should use this macro to set Lisp fields in struct window. */ - -#define WSET(w, field, value) ((w)->field = (value)) - struct window { /* This is for Lisp; the terminal code does not refer to it. */ @@ -348,6 +349,75 @@ struct window ptrdiff_t window_end_bytepos; }; +/* Most code should use these functions to set Lisp fields in struct + window. */ +WINDOW_INLINE void +wset_buffer (struct window *w, Lisp_Object val) +{ + w->buffer = val; +} +WINDOW_INLINE void +wset_frame (struct window *w, Lisp_Object val) +{ + w->frame = val; +} +WINDOW_INLINE void +wset_left_col (struct window *w, Lisp_Object val) +{ + w->left_col = val; +} +WINDOW_INLINE void +wset_next (struct window *w, Lisp_Object val) +{ + w->next = val; +} +WINDOW_INLINE void +wset_prev (struct window *w, Lisp_Object val) +{ + w->prev = val; +} +WINDOW_INLINE void +wset_redisplay_end_trigger (struct window *w, Lisp_Object val) +{ + w->redisplay_end_trigger = val; +} +WINDOW_INLINE void +wset_top_line (struct window *w, Lisp_Object val) +{ + w->top_line = val; +} +WINDOW_INLINE void +wset_total_cols (struct window *w, Lisp_Object val) +{ + w->total_cols = val; +} +WINDOW_INLINE void +wset_total_lines (struct window *w, Lisp_Object val) +{ + w->total_lines = val; +} +WINDOW_INLINE void +wset_vertical_scroll_bar (struct window *w, Lisp_Object val) +{ + w->vertical_scroll_bar = val; +} +WINDOW_INLINE void +wset_window_end_pos (struct window *w, Lisp_Object val) +{ + w->window_end_pos = val; +} +WINDOW_INLINE void +wset_window_end_valid (struct window *w, Lisp_Object val) +{ + w->window_end_valid = val; +} +WINDOW_INLINE void +wset_window_end_vpos (struct window *w, Lisp_Object val) +{ + w->window_end_vpos = val; +} + + /* 1 if W is a minibuffer window. */ #define MINI_WINDOW_P(W) ((W)->mini) @@ -916,4 +986,6 @@ extern void init_window (void); extern void syms_of_window (void); extern void keys_of_window (void); +INLINE_HEADER_END + #endif /* not WINDOW_H_INCLUDED */ |