Mercurial > hg > xemacs-beta
comparison src/symbols.c @ 452:3d3049ae1304 r21-2-41
Import from CVS: tag r21-2-41
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:40:21 +0200 |
parents | 1ccc32a20af4 |
children | c33ae14dd6d0 |
comparison
equal
deleted
inserted
replaced
451:8ad70c5cd5d7 | 452:3d3049ae1304 |
---|---|
2161 { | 2161 { |
2162 struct symbol_value_buffer_local *bfwd | 2162 struct symbol_value_buffer_local *bfwd |
2163 = alloc_lcrecord_type (struct symbol_value_buffer_local, | 2163 = alloc_lcrecord_type (struct symbol_value_buffer_local, |
2164 &lrecord_symbol_value_buffer_local); | 2164 &lrecord_symbol_value_buffer_local); |
2165 Lisp_Object foo; | 2165 Lisp_Object foo; |
2166 zero_lcrecord (&bfwd->magic); | |
2166 bfwd->magic.type = SYMVAL_BUFFER_LOCAL; | 2167 bfwd->magic.type = SYMVAL_BUFFER_LOCAL; |
2167 | 2168 |
2168 bfwd->default_value = find_symbol_value (variable); | 2169 bfwd->default_value = find_symbol_value (variable); |
2169 bfwd->current_value = valcontents; | 2170 bfwd->current_value = valcontents; |
2170 bfwd->current_alist_element = Qnil; | 2171 bfwd->current_alist_element = Qnil; |
2268 } | 2269 } |
2269 | 2270 |
2270 /* Make sure variable is set up to hold per-buffer values */ | 2271 /* Make sure variable is set up to hold per-buffer values */ |
2271 bfwd = alloc_lcrecord_type (struct symbol_value_buffer_local, | 2272 bfwd = alloc_lcrecord_type (struct symbol_value_buffer_local, |
2272 &lrecord_symbol_value_buffer_local); | 2273 &lrecord_symbol_value_buffer_local); |
2274 zero_lcrecord (&bfwd->magic); | |
2273 bfwd->magic.type = SYMVAL_SOME_BUFFER_LOCAL; | 2275 bfwd->magic.type = SYMVAL_SOME_BUFFER_LOCAL; |
2274 | 2276 |
2275 bfwd->current_buffer = Qnil; | 2277 bfwd->current_buffer = Qnil; |
2276 bfwd->current_alist_element = Qnil; | 2278 bfwd->current_alist_element = Qnil; |
2277 bfwd->current_value = valcontents; | 2279 bfwd->current_value = valcontents; |
2988 valcontents = XSYMBOL (variable)->value; | 2990 valcontents = XSYMBOL (variable)->value; |
2989 if (!SYMBOL_VALUE_LISP_MAGIC_P (valcontents)) | 2991 if (!SYMBOL_VALUE_LISP_MAGIC_P (valcontents)) |
2990 { | 2992 { |
2991 bfwd = alloc_lcrecord_type (struct symbol_value_lisp_magic, | 2993 bfwd = alloc_lcrecord_type (struct symbol_value_lisp_magic, |
2992 &lrecord_symbol_value_lisp_magic); | 2994 &lrecord_symbol_value_lisp_magic); |
2995 zero_lcrecord (&bfwd->magic); | |
2993 bfwd->magic.type = SYMVAL_LISP_MAGIC; | 2996 bfwd->magic.type = SYMVAL_LISP_MAGIC; |
2994 for (i = 0; i < MAGIC_HANDLER_MAX; i++) | 2997 for (i = 0; i < MAGIC_HANDLER_MAX; i++) |
2995 { | 2998 { |
2996 bfwd->handler[i] = Qnil; | 2999 bfwd->handler[i] = Qnil; |
2997 bfwd->harg[i] = Qnil; | 3000 bfwd->harg[i] = Qnil; |
3124 signal_simple_error ("Variable is magic and cannot be aliased", variable); | 3127 signal_simple_error ("Variable is magic and cannot be aliased", variable); |
3125 reject_constant_symbols (variable, Qunbound, 0, Qt); | 3128 reject_constant_symbols (variable, Qunbound, 0, Qt); |
3126 | 3129 |
3127 bfwd = alloc_lcrecord_type (struct symbol_value_varalias, | 3130 bfwd = alloc_lcrecord_type (struct symbol_value_varalias, |
3128 &lrecord_symbol_value_varalias); | 3131 &lrecord_symbol_value_varalias); |
3132 zero_lcrecord (&bfwd->magic); | |
3129 bfwd->magic.type = SYMVAL_VARALIAS; | 3133 bfwd->magic.type = SYMVAL_VARALIAS; |
3130 bfwd->aliasee = alias; | 3134 bfwd->aliasee = alias; |
3131 bfwd->shadowed = valcontents; | 3135 bfwd->shadowed = valcontents; |
3132 | 3136 |
3133 XSETSYMBOL_VALUE_MAGIC (valcontents, bfwd); | 3137 XSETSYMBOL_VALUE_MAGIC (valcontents, bfwd); |
3257 | 3261 |
3258 defsymbol (&Qt, "t"); | 3262 defsymbol (&Qt, "t"); |
3259 XSYMBOL (Qt)->value = Qt; /* Veritas aeterna */ | 3263 XSYMBOL (Qt)->value = Qt; /* Veritas aeterna */ |
3260 Vquit_flag = Qnil; | 3264 Vquit_flag = Qnil; |
3261 | 3265 |
3262 pdump_wire (&Qnil); | 3266 dump_add_root_object (&Qnil); |
3263 pdump_wire (&Qunbound); | 3267 dump_add_root_object (&Qunbound); |
3264 pdump_wire (&Vquit_flag); | 3268 dump_add_root_object (&Vquit_flag); |
3265 } | 3269 } |
3266 | 3270 |
3267 void | 3271 void |
3268 reinit_symbols_once_early (void) | 3272 reinit_symbols_once_early (void) |
3269 { | 3273 { |