aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c91
1 files changed, 90 insertions, 1 deletions
diff --git a/src/data.c b/src/data.c
index 9f756de014a..955c39727bb 100644
--- a/src/data.c
+++ b/src/data.c
@@ -76,7 +76,8 @@ static Lisp_Object Qprocess, Qmarker;
76static Lisp_Object Qcompiled_function, Qframe; 76static Lisp_Object Qcompiled_function, Qframe;
77Lisp_Object Qbuffer; 77Lisp_Object Qbuffer;
78static Lisp_Object Qchar_table, Qbool_vector, Qhash_table; 78static Lisp_Object Qchar_table, Qbool_vector, Qhash_table;
79static Lisp_Object Qsubrp, Qmany, Qunevalled; 79static Lisp_Object Qsubrp;
80static Lisp_Object Qmany, Qunevalled;
80Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; 81Lisp_Object Qfont_spec, Qfont_entity, Qfont_object;
81static Lisp_Object Qdefun; 82static Lisp_Object Qdefun;
82 83
@@ -85,6 +86,94 @@ static Lisp_Object Qdefalias_fset_function;
85 86
86static void swap_in_symval_forwarding (struct Lisp_Symbol *, struct Lisp_Buffer_Local_Value *); 87static void swap_in_symval_forwarding (struct Lisp_Symbol *, struct Lisp_Buffer_Local_Value *);
87 88
89static bool
90BOOLFWDP (union Lisp_Fwd *a)
91{
92 return XFWDTYPE (a) == Lisp_Fwd_Bool;
93}
94static bool
95INTFWDP (union Lisp_Fwd *a)
96{
97 return XFWDTYPE (a) == Lisp_Fwd_Int;
98}
99static bool
100KBOARD_OBJFWDP (union Lisp_Fwd *a)
101{
102 return XFWDTYPE (a) == Lisp_Fwd_Kboard_Obj;
103}
104static bool
105OBJFWDP (union Lisp_Fwd *a)
106{
107 return XFWDTYPE (a) == Lisp_Fwd_Obj;
108}
109
110static struct Lisp_Boolfwd *
111XBOOLFWD (union Lisp_Fwd *a)
112{
113 eassert (BOOLFWDP (a));
114 return &a->u_boolfwd;
115}
116static struct Lisp_Kboard_Objfwd *
117XKBOARD_OBJFWD (union Lisp_Fwd *a)
118{
119 eassert (KBOARD_OBJFWDP (a));
120 return &a->u_kboard_objfwd;
121}
122static struct Lisp_Intfwd *
123XINTFWD (union Lisp_Fwd *a)
124{
125 eassert (INTFWDP (a));
126 return &a->u_intfwd;
127}
128static struct Lisp_Objfwd *
129XOBJFWD (union Lisp_Fwd *a)
130{
131 eassert (OBJFWDP (a));
132 return &a->u_objfwd;
133}
134
135static void
136CHECK_SUBR (Lisp_Object x)
137{
138 CHECK_TYPE (SUBRP (x), Qsubrp, x);
139}
140
141static void
142set_blv_found (struct Lisp_Buffer_Local_Value *blv, int found)
143{
144 eassert (found == !EQ (blv->defcell, blv->valcell));
145 blv->found = found;
146}
147
148static Lisp_Object
149blv_value (struct Lisp_Buffer_Local_Value *blv)
150{
151 return XCDR (blv->valcell);
152}
153
154static void
155set_blv_value (struct Lisp_Buffer_Local_Value *blv, Lisp_Object val)
156{
157 XSETCDR (blv->valcell, val);
158}
159
160static void
161set_blv_where (struct Lisp_Buffer_Local_Value *blv, Lisp_Object val)
162{
163 blv->where = val;
164}
165
166static void
167set_blv_defcell (struct Lisp_Buffer_Local_Value *blv, Lisp_Object val)
168{
169 blv->defcell = val;
170}
171
172static void
173set_blv_valcell (struct Lisp_Buffer_Local_Value *blv, Lisp_Object val)
174{
175 blv->valcell = val;
176}
88 177
89Lisp_Object 178Lisp_Object
90wrong_type_argument (register Lisp_Object predicate, register Lisp_Object value) 179wrong_type_argument (register Lisp_Object predicate, register Lisp_Object value)