changeset 9878:8a68b5794c91

(Fboundp, find_symbol_value): Use type test macros instead of checking XTYPE directly.
author Karl Heuer <kwzh@gnu.org>
date Wed, 09 Nov 1994 23:13:31 +0000
parents 689bcdba1d40
children f54857d6c2f7
files src/data.c
diffstat 1 files changed, 8 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/src/data.c	Wed Nov 09 22:54:15 1994 +0000
+++ b/src/data.c	Wed Nov 09 23:13:31 1994 +0000
@@ -464,16 +464,9 @@
 
   valcontents = XSYMBOL (sym)->value;
 
-#ifdef SWITCH_ENUM_BUG
-  switch ((int) XTYPE (valcontents))
-#else
-  switch (XTYPE (valcontents))
-#endif
-    {
-    case Lisp_Buffer_Local_Value:
-    case Lisp_Some_Buffer_Local_Value:
-      valcontents = swap_in_symval_forwarding (sym, valcontents);
-    }
+  if (LISP_BUFFER_LOCAL_VALUEP (valcontents)
+      || LISP_SOME_BUFFER_LOCAL_VALUEP (valcontents))
+    valcontents = swap_in_symval_forwarding (sym, valcontents);
 
   return (EQ (valcontents, Qunbound) ? Qnil : Qt);
 }
@@ -765,19 +758,12 @@
   CHECK_SYMBOL (sym, 0);
   valcontents = XSYMBOL (sym)->value;
 
- retry:
-#ifdef SWITCH_ENUM_BUG
-  switch ((int) XTYPE (valcontents))
-#else
-  switch (XTYPE (valcontents))
-#endif
+  if (LISP_BUFFER_LOCAL_VALUEP (valcontents)
+      || LISP_SOME_BUFFER_LOCAL_VALUEP (valcontents))
+    valcontents = swap_in_symval_forwarding (sym, valcontents);
+
+  if (MISCP (valcontents))
     {
-    case Lisp_Buffer_Local_Value:
-    case Lisp_Some_Buffer_Local_Value:
-      valcontents = swap_in_symval_forwarding (sym, valcontents);
-      goto retry;
-
-    case Lisp_Misc:
       switch (XMISC (valcontents)->type)
 	{
 	case Lisp_Misc_Intfwd: