[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r109526: Use TSET for write access to
From: |
Dmitry Antipov |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r109526: Use TSET for write access to Lisp_Object slots of struct terminal. |
Date: |
Thu, 09 Aug 2012 09:14:23 +0400 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 109526
committer: Dmitry Antipov <address@hidden>
branch nick: trunk
timestamp: Thu 2012-08-09 09:14:23 +0400
message:
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.
modified:
src/ChangeLog
src/coding.c
src/termhooks.h
src/terminal.c
src/xselect.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2012-08-08 19:53:44 +0000
+++ b/src/ChangeLog 2012-08-09 05:14:23 +0000
@@ -1,3 +1,9 @@
+2012-08-09 Dmitry Antipov <address@hidden>
+
+ 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 <address@hidden>
* xdisp.c (safe_eval_handler): Remove prototype. Receive args
describing
=== modified file 'src/coding.c'
--- a/src/coding.c 2012-08-01 20:51:44 +0000
+++ b/src/coding.c 2012-08-09 05:14:23 +0000
@@ -9294,9 +9294,9 @@
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;
}
=== modified file 'src/termhooks.h'
--- a/src/termhooks.h 2012-02-10 18:58:48 +0000
+++ b/src/termhooks.h 2012-08-09 05:14:23 +0000
@@ -321,6 +321,10 @@
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
{
=== modified file 'src/terminal.c'
--- a/src/terminal.c 2012-07-05 06:32:41 +0000
+++ b/src/terminal.c 2012-08-09 05:14:23 +0000
@@ -446,7 +446,7 @@
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
=== modified file 'src/xselect.c'
--- a/src/xselect.c 2012-08-03 23:36:11 +0000
+++ b/src/xselect.c 2012-08-09 05:14:23 +0000
@@ -353,8 +353,8 @@
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 @@
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 @@
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. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r109526: Use TSET for write access to Lisp_Object slots of struct terminal.,
Dmitry Antipov <=