]> code.delx.au - gnu-emacs/blobdiff - src/bytecode.c
Tentative fix for bug #13546 with failure to save files on Windows.
[gnu-emacs] / src / bytecode.c
index 753f149ae01091cd6872ef486ea6747b2a83d1d2..843a12a0e339e24dd6ad575ff89c305094ea9cd8 100644 (file)
@@ -1,5 +1,6 @@
 /* Execution of byte code produced by bytecomp.el.
-   Copyright (C) 1985-1988, 1993, 2000-2012 Free Software Foundation, Inc.
+   Copyright (C) 1985-1988, 1993, 2000-2013 Free Software Foundation,
+   Inc.
 
 This file is part of GNU Emacs.
 
@@ -33,7 +34,7 @@ by Hallvard:
  */
 
 #include <config.h>
-#include <setjmp.h>
+
 #include "lisp.h"
 #include "character.h"
 #include "buffer.h"
@@ -435,7 +436,7 @@ unmark_byte_stack (void)
 #ifdef BYTE_CODE_SAFE
 
 #define CHECK_RANGE(ARG) \
-  if (ARG >= bytestr_length) abort ()
+  if (ARG >= bytestr_length) emacs_abort ()
 
 #else /* not BYTE_CODE_SAFE */
 
@@ -458,7 +459,8 @@ unmark_byte_stack (void)
        Fsignal (Qquit, Qnil);                          \
        AFTER_POTENTIAL_GC ();                          \
       }                                                        \
-    ELSE_PENDING_SIGNALS                               \
+    else if (pending_signals)                          \
+      process_pending_signals ();                      \
   } while (0)
 
 
@@ -508,7 +510,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
    if (FRAME_X_P (f)
        && FRAME_FONT (f)->direction != 0
        && FRAME_FONT (f)->direction != 1)
-     abort ();
+     emacs_abort ();
  }
 #endif
 
@@ -600,9 +602,9 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
     {
 #ifdef BYTE_CODE_SAFE
       if (top > stacke)
-       abort ();
+       emacs_abort ();
       else if (top < stack.bottom - 1)
-       abort ();
+       emacs_abort ();
 #endif
 
 #ifdef BYTE_CODE_METER
@@ -1051,7 +1053,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
 
        CASE (Bsave_current_buffer): /* Obsolete since ??.  */
        CASE (Bsave_current_buffer_1):
-         record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ());
+         record_unwind_current_buffer ();
          NEXT;
 
        CASE (Bsave_window_excursion): /* Obsolete since 24.1.  */
@@ -1875,7 +1877,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
          /* Actually this is Bstack_ref with offset 0, but we use Bdup
             for that instead.  */
          /* CASE (Bstack_ref): */
-         abort ();
+         error ("Invalid byte opcode");
 
          /* Handy byte-codes for lexical binding.  */
        CASE (Bstack_ref1):
@@ -1928,11 +1930,11 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
 #ifdef BYTE_CODE_SAFE
          if (op < Bconstant)
            {
-             abort ();
+             emacs_abort ();
            }
          if ((op -= Bconstant) >= const_length)
            {
-             abort ();
+             emacs_abort ();
            }
          PUSH (vectorp[op]);
 #else
@@ -1951,7 +1953,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
 #ifdef BYTE_CODE_SAFE
     error ("binding stack not balanced (serious byte compiler bug)");
 #else
-    abort ();
+    emacs_abort ();
 #endif
 
   return result;