summaryrefslogtreecommitdiff
path: root/src/termhooks.h
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2012-08-17 17:07:52 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2012-08-17 17:07:52 -0700
commit3f22b86fc7d9b66ff3e332b9a56350e93ddbd0aa (patch)
treecbdad3a66ebab38dba4f41ec3ad861252618b4fd /src/termhooks.h
parent15dbb4d6ba5dea7d3e0f45ab3fd038c2b305a145 (diff)
* 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 78d8532e03..46962a1217 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/>. */
#include "systime.h" /* for Time */
+INLINE_HEADER_BEGIN
+#ifndef TERMHOOKS_INLINE
+# define TERMHOOKS_INLINE INLINE
+#endif
+
struct glyph;
struct frame;
@@ -321,10 +326,6 @@ struct ns_display_info;
struct x_display_info;
struct w32_display_info;
-/* Most code should use this macro to set Lisp field in struct terminal. */
-
-#define TSET(f, field, value) ((f)->field = (value))
-
/* Terminal-local parameters. */
struct terminal
{
@@ -631,6 +632,18 @@ struct terminal
void (*delete_terminal_hook) (struct terminal *);
};
+/* Most code should use these functions to set Lisp fields in struct
+ terminal. */
+TERMHOOKS_INLINE void
+tset_charset_list (struct terminal *t, Lisp_Object val)
+{
+ t->charset_list = val;
+}
+TERMHOOKS_INLINE void
+tset_selection_alist (struct terminal *t, Lisp_Object val)
+{
+ t->Vselection_alist = val;
+}
/* Chain of all terminal devices currently in use. */
extern struct terminal *terminal_list;
@@ -669,3 +682,5 @@ extern unsigned char *encode_terminal_code (struct glyph *, int,
#ifdef HAVE_GPM
extern void close_gpm (int gpm_fd);
#endif
+
+INLINE_HEADER_END