Use TSET for write access to Lisp_Object slots of struct terminal.
* termhooks.h (TSET): New macro. * coding.c, terminal.c, xselect.c: Adjust users.
This commit is contained in:
parent
e0cc4efac7
commit
a275282808
5 changed files with 17 additions and 7 deletions
|
|
@ -1,3 +1,9 @@
|
|||
2012-08-09 Dmitry Antipov <dmantipov@yandex.ru>
|
||||
|
||||
Use TSET for write access to Lisp_Object slots of struct terminal.
|
||||
* termhooks.h (TSET): New macro.
|
||||
* coding.c, terminal.c, xselect.c: Adjust users.
|
||||
|
||||
2012-08-08 Stefan Monnier <monnier@iro.umontreal.ca>
|
||||
|
||||
* xdisp.c (safe_eval_handler): Remove prototype. Receive args describing
|
||||
|
|
|
|||
|
|
@ -9294,9 +9294,9 @@ DEFUN ("set-terminal-coding-system-internal", Fset_terminal_coding_system_intern
|
|||
terminal_coding->src_multibyte = 1;
|
||||
terminal_coding->dst_multibyte = 0;
|
||||
if (terminal_coding->common_flags & CODING_REQUIRE_ENCODING_MASK)
|
||||
term->charset_list = coding_charset_list (terminal_coding);
|
||||
TSET (term, charset_list, coding_charset_list (terminal_coding));
|
||||
else
|
||||
term->charset_list = Fcons (make_number (charset_ascii), Qnil);
|
||||
TSET (term, charset_list, Fcons (make_number (charset_ascii), Qnil));
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -321,6 +321,10 @@ 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
|
||||
{
|
||||
|
|
|
|||
|
|
@ -446,7 +446,7 @@ store_terminal_param (struct terminal *t, Lisp_Object parameter, Lisp_Object val
|
|||
Lisp_Object old_alist_elt = Fassq (parameter, t->param_alist);
|
||||
if (EQ (old_alist_elt, Qnil))
|
||||
{
|
||||
t->param_alist = Fcons (Fcons (parameter, value), t->param_alist);
|
||||
TSET (t, param_alist, Fcons (Fcons (parameter, value), t->param_alist));
|
||||
return Qnil;
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -353,8 +353,8 @@ x_own_selection (Lisp_Object selection_name, Lisp_Object selection_value,
|
|||
INTEGER_TO_CONS (timestamp), frame);
|
||||
prev_value = LOCAL_SELECTION (selection_name, dpyinfo);
|
||||
|
||||
dpyinfo->terminal->Vselection_alist
|
||||
= Fcons (selection_data, dpyinfo->terminal->Vselection_alist);
|
||||
TSET (dpyinfo->terminal, Vselection_alist,
|
||||
Fcons (selection_data, dpyinfo->terminal->Vselection_alist));
|
||||
|
||||
/* If we already owned the selection, remove the old selection
|
||||
data. Don't use Fdelq as that may QUIT. */
|
||||
|
|
@ -989,7 +989,7 @@ x_handle_selection_clear (struct input_event *event)
|
|||
break;
|
||||
}
|
||||
}
|
||||
dpyinfo->terminal->Vselection_alist = Vselection_alist;
|
||||
TSET (dpyinfo->terminal, Vselection_alist, Vselection_alist);
|
||||
|
||||
/* Run the `x-lost-selection-functions' abnormal hook. */
|
||||
{
|
||||
|
|
@ -1039,7 +1039,7 @@ x_clear_frame_selections (FRAME_PTR f)
|
|||
args[1] = Fcar (Fcar (t->Vselection_alist));
|
||||
Frun_hook_with_args (2, args);
|
||||
|
||||
t->Vselection_alist = XCDR (t->Vselection_alist);
|
||||
TSET (t, Vselection_alist, XCDR (t->Vselection_alist));
|
||||
}
|
||||
|
||||
/* Delete elements after the beginning of Vselection_alist. */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue