]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fmake_symbol): Adapt to changes of struct Lisp_Symbol.
authorGerd Moellmann <gerd@gnu.org>
Mon, 21 May 2001 12:28:26 +0000 (12:28 +0000)
committerGerd Moellmann <gerd@gnu.org>
Mon, 21 May 2001 12:28:26 +0000 (12:28 +0000)
src/ChangeLog
src/alloc.c

index 2b9f48db5518970a2318ac4de806a4d132bc5f1a..48435d8fb6d3acfdee74cc2fb47bbb790ba47a06 100644 (file)
@@ -1,3 +1,48 @@
+2001-05-21  Gerd Moellmann  <gerd@gnu.org>
+
+       * 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) <varref>: Use SYMBOL_VALUE.
+       (Fbyte_code) <varset>: 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  <gerd@gnu.org>
 
        * eval.c (call_debugger): Don't bind inhibit-eval-during-redisplay.
index a0c06a5c35bbdcc96ae950539f1e3f0fcec492a5..d171e5f8811b51e7e4016e6c16fc8d810b9c8edb 100644 (file)
@@ -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;