]> code.delx.au - gnu-emacs/blobdiff - src/bytecode.c
(Fdocumentation, Fdocumentation_property, Fsubstitute_command_keys):
[gnu-emacs] / src / bytecode.c
index 4e458ebe79c11235c0408c0074808dde5efeee2a..422855f4ed1b77ba31d1f11c2e61c159fb5e0b45 100644 (file)
@@ -251,8 +251,9 @@ Lisp_Object Qbytecode;
 
 DEFUN ("byte-code", Fbyte_code, Sbyte_code, 3, 3, 0,
   "Function used internally in byte-compiled code.\n\
-The first argument is a string of byte code; the second, a vector of constants;\n\
-the third, the maximum stack depth used in this function.\n\
+The first argument, BYTESTR, is a string of byte code;\n\
+the second, VECTOR, a vector of constants;\n\
+the third, MAXDEPTH, the maximum stack depth used in this function.\n\
 If the third argument is incorrect, Emacs may crash.")
   (bytestr, vector, maxdepth)
      Lisp_Object bytestr, vector, maxdepth;
@@ -341,20 +342,8 @@ If the third argument is incorrect, Emacs may crash.")
          else
            {
              v2 = XSYMBOL (v1)->value;
-#ifdef SWITCH_ENUM_BUG
-             switch ((int) XTYPE (v2))
-#else
-             switch (XTYPE (v2))
-#endif
-               {
-               case Lisp_Symbol:
-                 if (!EQ (v2, Qunbound))
-                   break;
-               case Lisp_Misc:
-               case Lisp_Buffer_Local_Value:
-               case Lisp_Some_Buffer_Local_Value:
-                 v2 = Fsymbol_value (v1);
-               }
+             if (MISCP (v2) || EQ (v2, Qunbound))
+               v2 = Fsymbol_value (v1);
            }
          PUSH (v2);
          break;
@@ -770,7 +759,18 @@ If the third argument is incorrect, Emacs may crash.")
          v2 = POP; v1 = TOP;
          CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (v1, 0);
          CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (v2, 0);
-         TOP = (XFLOATINT (v1) == XFLOATINT (v2)) ? Qt : Qnil;
+#ifdef LISP_FLOAT_TYPE
+         if (FLOATP (v1) || FLOATP (v2))
+           {
+             double f1, f2;
+
+             f1 = (FLOATP (v1) ? XFLOAT (v1)->data : XINT (v1));
+             f2 = (FLOATP (v2) ? XFLOAT (v2)->data : XINT (v2));
+             TOP = (f1 == f2 ? Qt : Qnil);
+           }
+         else
+#endif
+           TOP = (XINT (v1) == XINT (v2) ? Qt : Qnil);
          break;
 
        case Bgtr:
@@ -873,12 +873,12 @@ If the third argument is incorrect, Emacs may crash.")
          break;
 
        case Bfollowing_char:
-         XSETFASTINT (v1, PT == ZV ? 0 : FETCH_CHAR (point));
+         v1 = Ffollowing_char ();
          PUSH (v1);
          break;
 
        case Bpreceding_char:
-         XSETFASTINT (v1, point <= BEGV ? 0 : FETCH_CHAR (point - 1));
+         v1 = Fprevious_char ();
          PUSH (v1);
          break;
 
@@ -949,7 +949,7 @@ If the third argument is incorrect, Emacs may crash.")
        case Bchar_syntax:
          CHECK_NUMBER (TOP, 0);
          XSETFASTINT (TOP,
-                      syntax_code_spec[(int) SYNTAX (0xFF & XINT (TOP))]);
+                      syntax_code_spec[(int) SYNTAX (XINT (TOP))]);
          break;
 
        case Bbuffer_substring: