From e41ec733fe54358d92f38d0d0a9bf424169d9d1e Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Mon, 21 May 2001 12:28:26 +0000 Subject: [PATCH] (Fmake_symbol): Adapt to changes of struct Lisp_Symbol. --- src/ChangeLog | 45 +++++++++++++++++++++++++++++++++++++++++++++ src/alloc.c | 6 ++++-- 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 2b9f48db551..48435d8fb6d 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,48 @@ +2001-05-21 Gerd Moellmann + + * lisp.h (enum symbol_interned): New enumeration. + (struct Lisp_Symbol): Remove member `obarray', add + `indirect_variable', `constant', and `interned'. + (SYMBOL_INTERNED_P, SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P) + (SYMBOL_CONSTANT_P, SYMBOL_VALUE, SET_SYMBOL_VALUE): New macros. + (indirect_variable): Add prototype. + + * print.c (print_preprocess, print_object): Test internedness of + symbols differently. + + * lread.c (Fintern, Funintern): Set symbol's interned and constant + bit-fields. + (init_obarray): Likewise for t and nil. + + * eval.c Use SYMBOL_VALUE/SET_SYMBOL_VALUE. + (Fdefvaralias): New function. + (specbind): Simplify the test if symbol is a constant. + (syms_of_eval): Defsubr Fdefvaralias. + + * data.c: Use SYMBOL_VALUE/SET_SYMBOL_VALUE. + (Qcyclic_variable_indirection): New variable. + (Fkeywordp): Check for internedness differently. + (Fmakunbound): Simplify the test if symbol is a constant. + (indirect_variable, Findirect_variable): New functions. + (swap_in_symval_forwarding): If SYMBOL is an alias, use the + aliased symbol. + (let_shadows_buffer_binding_p): Check for variable aliases. + (set_internal): Simplify the test if SYMBOL is a constant. If + SYMBOL has a buffer-local value and is an alias, use the aliased + symbol instead. + (syms_of_data): Initialize Qcyclic_variable_indirection and defsubr + Sindirect_variable. + + * bytecode.c (Fbyte_code) : Use SYMBOL_VALUE. + (Fbyte_code) : Simplify the test if symbol's value can be + set directly. + + * alloc.c (Fmake_symbol): Adapt to changes of struct Lisp_Symbol. + + * abbrev.c, buffer.c, coding.c, fns.c, frame.c, keyboard.c: Use + SYMBOL_VALUE/ SET_SYMBOL_VALUE macros instead of accessing + symbols' value directly. + 2001-05-18 Gerd Moellmann * eval.c (call_debugger): Don't bind inhibit-eval-during-redisplay. diff --git a/src/alloc.c b/src/alloc.c index a0c06a5c35b..d171e5f8811 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -2539,11 +2539,13 @@ Its value and function definition are void, and its property list is nil.") p = XSYMBOL (val); p->name = XSTRING (name); - p->obarray = Qnil; p->plist = Qnil; p->value = Qunbound; p->function = Qunbound; - p->next = 0; + p->next = NULL; + p->interned = SYMBOL_UNINTERNED; + p->constant = 0; + p->indirect_variable = 0; consing_since_gc += sizeof (struct Lisp_Symbol); symbols_consed++; return val; -- 2.39.5