aboutsummaryrefslogtreecommitdiffstats
path: root/src/termhooks.h
diff options
context:
space:
mode:
authorPaul Eggert2012-08-17 17:07:52 -0700
committerPaul Eggert2012-08-17 17:07:52 -0700
commit3f22b86fc7d9b66ff3e332b9a56350e93ddbd0aa (patch)
treecbdad3a66ebab38dba4f41ec3ad861252618b4fd /src/termhooks.h
parent15dbb4d6ba5dea7d3e0f45ab3fd038c2b305a145 (diff)
downloademacs-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.h23
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
25INLINE_HEADER_BEGIN
26#ifndef TERMHOOKS_INLINE
27# define TERMHOOKS_INLINE INLINE
28#endif
29
25struct glyph; 30struct glyph;
26struct frame; 31struct frame;
27 32
@@ -321,10 +326,6 @@ struct ns_display_info;
321struct x_display_info; 326struct x_display_info;
322struct w32_display_info; 327struct 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. */
329struct terminal 330struct 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. */
637TERMHOOKS_INLINE void
638tset_charset_list (struct terminal *t, Lisp_Object val)
639{
640 t->charset_list = val;
641}
642TERMHOOKS_INLINE void
643tset_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. */
636extern struct terminal *terminal_list; 649extern 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
670extern void close_gpm (int gpm_fd); 683extern void close_gpm (int gpm_fd);
671#endif 684#endif
685
686INLINE_HEADER_END