diff options
| author | Tom Tromey | 2013-07-06 23:18:58 -0600 |
|---|---|---|
| committer | Tom Tromey | 2013-07-06 23:18:58 -0600 |
| commit | 6dacdad5fcb278e5a16b38bb81786aac9ca27be4 (patch) | |
| tree | f5f331ea361ba0f99e0f9b638d183ad492a7da31 /src/data.c | |
| parent | 0a6f2ff0c8ceb29703e76cddd46ea3f176dd873a (diff) | |
| parent | 219afb88d9d484393418820d1c08dc93299110ec (diff) | |
| download | emacs-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.c | 94 |
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; | |||
| 76 | static Lisp_Object Qcompiled_function, Qframe; | 76 | static Lisp_Object Qcompiled_function, Qframe; |
| 77 | Lisp_Object Qbuffer; | 77 | Lisp_Object Qbuffer; |
| 78 | static Lisp_Object Qchar_table, Qbool_vector, Qhash_table; | 78 | static Lisp_Object Qchar_table, Qbool_vector, Qhash_table; |
| 79 | static Lisp_Object Qsubrp, Qmany, Qunevalled; | 79 | static Lisp_Object Qsubrp; |
| 80 | static Lisp_Object Qmany, Qunevalled; | ||
| 80 | Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; | 81 | Lisp_Object Qfont_spec, Qfont_entity, Qfont_object; |
| 81 | static Lisp_Object Qdefun; | 82 | static Lisp_Object Qdefun; |
| 82 | Lisp_Object Qthread, Qmutex, Qcondition_variable; | 83 | Lisp_Object Qthread, Qmutex, Qcondition_variable; |
| @@ -86,6 +87,94 @@ static Lisp_Object Qdefalias_fset_function; | |||
| 86 | 87 | ||
| 87 | static void swap_in_symval_forwarding (struct Lisp_Symbol *, struct Lisp_Buffer_Local_Value *); | 88 | static void swap_in_symval_forwarding (struct Lisp_Symbol *, struct Lisp_Buffer_Local_Value *); |
| 88 | 89 | ||
| 90 | static bool | ||
| 91 | BOOLFWDP (union Lisp_Fwd *a) | ||
| 92 | { | ||
| 93 | return XFWDTYPE (a) == Lisp_Fwd_Bool; | ||
| 94 | } | ||
| 95 | static bool | ||
| 96 | INTFWDP (union Lisp_Fwd *a) | ||
| 97 | { | ||
| 98 | return XFWDTYPE (a) == Lisp_Fwd_Int; | ||
| 99 | } | ||
| 100 | static bool | ||
| 101 | KBOARD_OBJFWDP (union Lisp_Fwd *a) | ||
| 102 | { | ||
| 103 | return XFWDTYPE (a) == Lisp_Fwd_Kboard_Obj; | ||
| 104 | } | ||
| 105 | static bool | ||
| 106 | OBJFWDP (union Lisp_Fwd *a) | ||
| 107 | { | ||
| 108 | return XFWDTYPE (a) == Lisp_Fwd_Obj; | ||
| 109 | } | ||
| 110 | |||
| 111 | static struct Lisp_Boolfwd * | ||
| 112 | XBOOLFWD (union Lisp_Fwd *a) | ||
| 113 | { | ||
| 114 | eassert (BOOLFWDP (a)); | ||
| 115 | return &a->u_boolfwd; | ||
| 116 | } | ||
| 117 | static struct Lisp_Kboard_Objfwd * | ||
| 118 | XKBOARD_OBJFWD (union Lisp_Fwd *a) | ||
| 119 | { | ||
| 120 | eassert (KBOARD_OBJFWDP (a)); | ||
| 121 | return &a->u_kboard_objfwd; | ||
| 122 | } | ||
| 123 | static struct Lisp_Intfwd * | ||
| 124 | XINTFWD (union Lisp_Fwd *a) | ||
| 125 | { | ||
| 126 | eassert (INTFWDP (a)); | ||
| 127 | return &a->u_intfwd; | ||
| 128 | } | ||
| 129 | static struct Lisp_Objfwd * | ||
| 130 | XOBJFWD (union Lisp_Fwd *a) | ||
| 131 | { | ||
| 132 | eassert (OBJFWDP (a)); | ||
| 133 | return &a->u_objfwd; | ||
| 134 | } | ||
| 135 | |||
| 136 | static void | ||
| 137 | CHECK_SUBR (Lisp_Object x) | ||
| 138 | { | ||
| 139 | CHECK_TYPE (SUBRP (x), Qsubrp, x); | ||
| 140 | } | ||
| 141 | |||
| 142 | static void | ||
| 143 | set_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 | |||
| 149 | static Lisp_Object | ||
| 150 | blv_value (struct Lisp_Buffer_Local_Value *blv) | ||
| 151 | { | ||
| 152 | return XCDR (blv->valcell); | ||
| 153 | } | ||
| 154 | |||
| 155 | static void | ||
| 156 | set_blv_value (struct Lisp_Buffer_Local_Value *blv, Lisp_Object val) | ||
| 157 | { | ||
| 158 | XSETCDR (blv->valcell, val); | ||
| 159 | } | ||
| 160 | |||
| 161 | static void | ||
| 162 | set_blv_where (struct Lisp_Buffer_Local_Value *blv, Lisp_Object val) | ||
| 163 | { | ||
| 164 | blv->where = val; | ||
| 165 | } | ||
| 166 | |||
| 167 | static void | ||
| 168 | set_blv_defcell (struct Lisp_Buffer_Local_Value *blv, Lisp_Object val) | ||
| 169 | { | ||
| 170 | blv->defcell = val; | ||
| 171 | } | ||
| 172 | |||
| 173 | static void | ||
| 174 | set_blv_valcell (struct Lisp_Buffer_Local_Value *blv, Lisp_Object val) | ||
| 175 | { | ||
| 176 | blv->valcell = val; | ||
| 177 | } | ||
| 89 | 178 | ||
| 90 | Lisp_Object | 179 | Lisp_Object |
| 91 | wrong_type_argument (register Lisp_Object predicate, register Lisp_Object value) | 180 | wrong_type_argument (register Lisp_Object predicate, register Lisp_Object value) |
| @@ -295,7 +384,8 @@ DEFUN ("stringp", Fstringp, Sstringp, 1, 1, 0, | |||
| 295 | 384 | ||
| 296 | DEFUN ("multibyte-string-p", Fmultibyte_string_p, Smultibyte_string_p, | 385 | DEFUN ("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. |
| 388 | Return 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)) |