[SQUASH] symbol
[bpt/emacs.git] / src / lisp.h
index c4c5344..86d20ce 100644 (file)
@@ -648,6 +648,7 @@ extern void initialize_symbol (Lisp_Object, Lisp_Object);
 INLINE Lisp_Object build_string (const char *);
 extern Lisp_Object symbol_module;
 extern Lisp_Object function_module;
+extern Lisp_Object plist_module;
 
 INLINE struct Lisp_Symbol *
 XSYMBOL (Lisp_Object a)
@@ -1283,15 +1284,6 @@ CHAR_TABLE_EXTRA_SLOTS (struct Lisp_Char_Table *ct)
                               Symbols
  ***********************************************************************/
 
-/* Interned state of a symbol.  */
-
-enum symbol_interned
-{
-  SYMBOL_UNINTERNED = 0,
-  SYMBOL_INTERNED = 1,
-  SYMBOL_INTERNED_IN_INITIAL_OBARRAY = 2
-};
-
 enum symbol_redirect
 {
   SYMBOL_PLAINVAL  = 4,
@@ -1316,10 +1308,6 @@ struct Lisp_Symbol
      can be changed, but only by `defconst'.  */
   unsigned constant : 2;
 
-  /* Interned state of the symbol.  This is an enumerator from
-     enum symbol_interned.  */
-  unsigned interned : 2;
-
   /* True means that this variable has been explicitly declared
      special (with `defvar' etc), and shouldn't be lexically bound.  */
   bool_bf declared_special : 1;
@@ -1327,9 +1315,6 @@ struct Lisp_Symbol
   /* True if pointed to from purespace and hence can't be GC'd.  */
   bool_bf pinned : 1;
 
-  /* The symbol's name, as a Lisp string.  */
-  Lisp_Object name;
-
   /* Value of the symbol or Qunbound if unbound.  Which alternative of the
      union is used depends on the `redirect' field above.  */
   union {
@@ -1338,9 +1323,6 @@ struct Lisp_Symbol
     struct Lisp_Buffer_Local_Value *blv;
     union Lisp_Fwd *fwd;
   } val;
-
-  /* The symbol's property list.  */
-  Lisp_Object plist;
 };
 
 /* Value is name of symbol.  */
@@ -1391,7 +1373,7 @@ SET_SYMBOL_FWD (struct Lisp_Symbol *sym, union Lisp_Fwd *v)
 INLINE Lisp_Object
 SYMBOL_NAME (Lisp_Object sym)
 {
-  return XSYMBOL (sym)->name;
+  return build_string (scm_to_locale_string (scm_symbol_to_string (sym)));
 }
 
 /* Value is true if SYM is an interned symbol.  */
@@ -1399,15 +1381,7 @@ SYMBOL_NAME (Lisp_Object sym)
 INLINE bool
 SYMBOL_INTERNED_P (Lisp_Object sym)
 {
-  return XSYMBOL (sym)->interned != SYMBOL_UNINTERNED;
-}
-
-/* Value is true if SYM is interned in initial_obarray.  */
-
-INLINE bool
-SYMBOL_INTERNED_IN_INITIAL_OBARRAY_P (Lisp_Object sym)
-{
-  return XSYMBOL (sym)->interned == SYMBOL_INTERNED_IN_INITIAL_OBARRAY;
+  return scm_is_true (scm_symbol_interned_p (sym));
 }
 
 INLINE Lisp_Object
@@ -2766,13 +2740,13 @@ set_symbol_function (Lisp_Object sym, Lisp_Object function)
 INLINE Lisp_Object
 symbol_plist (Lisp_Object sym)
 {
-  return XSYMBOL (sym)->plist;
+  return scm_variable_ref (scm_module_lookup (plist_module, sym));
 }
 
 INLINE void
 set_symbol_plist (Lisp_Object sym, Lisp_Object plist)
 {
-  XSYMBOL (sym)->plist = plist;
+  scm_variable_set_x (scm_module_lookup (plist_module, sym), plist);
 }
 
 /* Buffer-local (also frame-local) variable access functions.  */