aboutsummaryrefslogtreecommitdiffstats
path: root/src/data.c
diff options
context:
space:
mode:
authorTom Tromey2013-07-06 23:18:58 -0600
committerTom Tromey2013-07-06 23:18:58 -0600
commit6dacdad5fcb278e5a16b38bb81786aac9ca27be4 (patch)
treef5f331ea361ba0f99e0f9b638d183ad492a7da31 /src/data.c
parent0a6f2ff0c8ceb29703e76cddd46ea3f176dd873a (diff)
parent219afb88d9d484393418820d1c08dc93299110ec (diff)
downloademacs-6dacdad5fcb278e5a16b38bb81786aac9ca27be4.tar.gz
emacs-6dacdad5fcb278e5a16b38bb81786aac9ca27be4.zip
merge from trunk
this merges frmo trunk and fixes various build issues. this needed a few ugly tweaks. this hangs in "make check" now
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c94
1 files changed, 92 insertions, 2 deletions
diff --git a/src/data.c b/src/data.c
index 59fd921747a..ea72a3fc181 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;
82Lisp_Object Qthread, Qmutex, Qcondition_variable; 83Lisp_Object Qthread, Qmutex, Qcondition_variable;
@@ -86,6 +87,94 @@ static Lisp_Object Qdefalias_fset_function;
86 87
87static void swap_in_symval_forwarding (struct Lisp_Symbol *, struct Lisp_Buffer_Local_Value *); 88static void swap_in_symval_forwarding (struct Lisp_Symbol *, struct Lisp_Buffer_Local_Value *);
88 89
90static bool
91BOOLFWDP (union Lisp_Fwd *a)
92{
93 return XFWDTYPE (a) == Lisp_Fwd_Bool;
94}
95static bool
96INTFWDP (union Lisp_Fwd *a)
97{
98 return XFWDTYPE (a) == Lisp_Fwd_Int;
99}
100static bool
101KBOARD_OBJFWDP (union Lisp_Fwd *a)
102{
103 return XFWDTYPE (a) == Lisp_Fwd_Kboard_Obj;
104}
105static bool
106OBJFWDP (union Lisp_Fwd *a)
107{
108 return XFWDTYPE (a) == Lisp_Fwd_Obj;
109}
110
111static struct Lisp_Boolfwd *
112XBOOLFWD (union Lisp_Fwd *a)
113{
114 eassert (BOOLFWDP (a));
115 return &a->u_boolfwd;
116}
117static struct Lisp_Kboard_Objfwd *
118XKBOARD_OBJFWD (union Lisp_Fwd *a)
119{
120 eassert (KBOARD_OBJFWDP (a));
121 return &a->u_kboard_objfwd;
122}
123static struct Lisp_Intfwd *
124XINTFWD (union Lisp_Fwd *a)
125{
126 eassert (INTFWDP (a));
127 return &a->u_intfwd;
128}
129static struct Lisp_Objfwd *
130XOBJFWD (union Lisp_Fwd *a)
131{
132 eassert (OBJFWDP (a));
133 return &a->u_objfwd;
134}
135
136static void
137CHECK_SUBR (Lisp_Object x)
138{
139 CHECK_TYPE (SUBRP (x), Qsubrp, x);
140}
141
142static void
143set_blv_found (struct Lisp_Buffer_Local_Value *blv, int found)
144{
145 eassert (found == !EQ (blv->defcell, blv->valcell));
146 blv->found = found;
147}
148
149static Lisp_Object
150blv_value (struct Lisp_Buffer_Local_Value *blv)
151{
152 return XCDR (blv->valcell);
153}
154
155static void
156set_blv_value (struct Lisp_Buffer_Local_Value *blv, Lisp_Object val)
157{
158 XSETCDR (blv->valcell, val);
159}
160
161static void
162set_blv_where (struct Lisp_Buffer_Local_Value *blv, Lisp_Object val)
163{
164 blv->where = val;
165}
166
167static void
168set_blv_defcell (struct Lisp_Buffer_Local_Value *blv, Lisp_Object val)
169{
170 blv->defcell = val;
171}
172
173static void
174set_blv_valcell (struct Lisp_Buffer_Local_Value *blv, Lisp_Object val)
175{
176 blv->valcell = val;
177}
89 178
90Lisp_Object 179Lisp_Object
91wrong_type_argument (register Lisp_Object predicate, register Lisp_Object value) 180wrong_type_argument (register Lisp_Object predicate, register Lisp_Object value)
@@ -295,7 +384,8 @@ DEFUN ("stringp", Fstringp, Sstringp, 1, 1, 0,
295 384
296DEFUN ("multibyte-string-p", Fmultibyte_string_p, Smultibyte_string_p, 385DEFUN ("multibyte-string-p", Fmultibyte_string_p, Smultibyte_string_p,
297 1, 1, 0, 386 1, 1, 0,
298 doc: /* Return t if OBJECT is a multibyte string. */) 387 doc: /* Return t if OBJECT is a multibyte string.
388Return nil if OBJECT is either a unibyte string, or not a string. */)
299 (Lisp_Object object) 389 (Lisp_Object object)
300{ 390{
301 if (STRINGP (object) && STRING_MULTIBYTE (object)) 391 if (STRINGP (object) && STRING_MULTIBYTE (object))