diff options
| author | Paul Eggert | 2012-08-17 17:07:52 -0700 |
|---|---|---|
| committer | Paul Eggert | 2012-08-17 17:07:52 -0700 |
| commit | 3f22b86fc7d9b66ff3e332b9a56350e93ddbd0aa (patch) | |
| tree | cbdad3a66ebab38dba4f41ec3ad861252618b4fd /src/termhooks.h | |
| parent | 15dbb4d6ba5dea7d3e0f45ab3fd038c2b305a145 (diff) | |
| download | emacs-3f22b86fc7d9b66ff3e332b9a56350e93ddbd0aa.tar.gz emacs-3f22b86fc7d9b66ff3e332b9a56350e93ddbd0aa.zip | |
* termhooks.h (TSET): Remove.
Replace all uses with calls to new setter functions.
Use INLINE_HEADER_BEGIN, INLINE_HEADER_END.
(TERMHOOKS_INLINE): New macro.
(tset_charset_list, tset_selection_alist): New setter functions.
* terminal.c (TERMHOOKS_INLINE):
Define to EXTERN_INLINE, so that the corresponding functions
are compiled into code.
(tset_param_alist): New setter function.
Fixes: debbugs:12215
Diffstat (limited to 'src/termhooks.h')
| -rw-r--r-- | src/termhooks.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/src/termhooks.h b/src/termhooks.h index 78d8532e03f..46962a1217d 100644 --- a/src/termhooks.h +++ b/src/termhooks.h | |||
| @@ -22,6 +22,11 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 22 | 22 | ||
| 23 | #include "systime.h" /* for Time */ | 23 | #include "systime.h" /* for Time */ |
| 24 | 24 | ||
| 25 | INLINE_HEADER_BEGIN | ||
| 26 | #ifndef TERMHOOKS_INLINE | ||
| 27 | # define TERMHOOKS_INLINE INLINE | ||
| 28 | #endif | ||
| 29 | |||
| 25 | struct glyph; | 30 | struct glyph; |
| 26 | struct frame; | 31 | struct frame; |
| 27 | 32 | ||
| @@ -321,10 +326,6 @@ struct ns_display_info; | |||
| 321 | struct x_display_info; | 326 | struct x_display_info; |
| 322 | struct w32_display_info; | 327 | struct w32_display_info; |
| 323 | 328 | ||
| 324 | /* Most code should use this macro to set Lisp field in struct terminal. */ | ||
| 325 | |||
| 326 | #define TSET(f, field, value) ((f)->field = (value)) | ||
| 327 | |||
| 328 | /* Terminal-local parameters. */ | 329 | /* Terminal-local parameters. */ |
| 329 | struct terminal | 330 | struct terminal |
| 330 | { | 331 | { |
| @@ -631,6 +632,18 @@ struct terminal | |||
| 631 | void (*delete_terminal_hook) (struct terminal *); | 632 | void (*delete_terminal_hook) (struct terminal *); |
| 632 | }; | 633 | }; |
| 633 | 634 | ||
| 635 | /* Most code should use these functions to set Lisp fields in struct | ||
| 636 | terminal. */ | ||
| 637 | TERMHOOKS_INLINE void | ||
| 638 | tset_charset_list (struct terminal *t, Lisp_Object val) | ||
| 639 | { | ||
| 640 | t->charset_list = val; | ||
| 641 | } | ||
| 642 | TERMHOOKS_INLINE void | ||
| 643 | tset_selection_alist (struct terminal *t, Lisp_Object val) | ||
| 644 | { | ||
| 645 | t->Vselection_alist = val; | ||
| 646 | } | ||
| 634 | 647 | ||
| 635 | /* Chain of all terminal devices currently in use. */ | 648 | /* Chain of all terminal devices currently in use. */ |
| 636 | extern struct terminal *terminal_list; | 649 | extern struct terminal *terminal_list; |
| @@ -669,3 +682,5 @@ extern unsigned char *encode_terminal_code (struct glyph *, int, | |||
| 669 | #ifdef HAVE_GPM | 682 | #ifdef HAVE_GPM |
| 670 | extern void close_gpm (int gpm_fd); | 683 | extern void close_gpm (int gpm_fd); |
| 671 | #endif | 684 | #endif |
| 685 | |||
| 686 | INLINE_HEADER_END | ||