]> code.delx.au - gnu-emacs/blobdiff - src/callint.c
Fix rare aborts in bidi.c.
[gnu-emacs] / src / callint.c
index 51d0a5fa2e8e0e7d87eb22badf5aec298ecf26ec..cd303908f69cd317716a2b2ae66bf7f74de4f8b6 100644 (file)
@@ -1,6 +1,6 @@
 /* Call a Lisp function interactively.
-   Copyright (C) 1985-1986, 1993-1995, 1997, 2000-2012
-                 Free Software Foundation, Inc.
+   Copyright (C) 1985-1986, 1993-1995, 1997, 2000-2013 Free Software
+   Foundation, Inc.
 
 This file is part of GNU Emacs.
 
@@ -19,7 +19,6 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 
 
 #include <config.h>
-#include <setjmp.h>
 
 #include "lisp.h"
 #include "character.h"
@@ -150,7 +149,7 @@ static const char *callint_argfuns[]
     = {"", "point", "mark", "region-beginning", "region-end"};
 
 static void
-check_mark (int for_region)
+check_mark (bool for_region)
 {
   Lisp_Object tem;
   tem = Fmarker_buffer (BVAR (current_buffer, mark));
@@ -273,11 +272,11 @@ invoke it.  If KEYS is omitted or nil, the return value of
   signed char *varies;
 
   ptrdiff_t i, nargs;
-  int foo;
-  int arg_from_tty = 0;
+  ptrdiff_t mark;
+  bool arg_from_tty = 0;
   struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
   ptrdiff_t key_count;
-  int record_then_fail = 0;
+  bool record_then_fail = 0;
 
   Lisp_Object save_this_command, save_last_command;
   Lisp_Object save_this_original_command, save_real_this_command;
@@ -372,7 +371,7 @@ invoke it.  If KEYS is omitted or nil, the return value of
       Vthis_command = save_this_command;
       Vthis_original_command = save_this_original_command;
       Vreal_this_command = save_real_this_command;
-      KVAR (current_kboard, Vlast_command) = save_last_command;
+      kset_last_command (current_kboard, save_last_command);
 
       temporarily_switch_to_single_kboard (NULL);
       return unbind_to (speccount, apply1 (function, specs));
@@ -685,7 +684,7 @@ invoke it.  If KEYS is omitted or nil, the return value of
            goto have_prefix_arg;
        case 'n':               /* Read number from minibuffer.  */
          {
-           int first = 1;
+           bool first = 1;
            do
              {
                Lisp_Object str;
@@ -726,11 +725,11 @@ invoke it.  If KEYS is omitted or nil, the return value of
          check_mark (1);
          set_marker_both (point_marker, Qnil, PT, PT_BYTE);
          /* visargs[i+1] = Qnil; */
-         foo = marker_position (BVAR (current_buffer, mark));
+         mark = marker_position (BVAR (current_buffer, mark));
          /* visargs[i] = Qnil; */
-         args[i] = PT < foo ? point_marker : BVAR (current_buffer, mark);
+         args[i] = PT < mark ? point_marker : BVAR (current_buffer, mark);
          varies[i] = 3;
-         args[++i] = PT > foo ? point_marker : BVAR (current_buffer, mark);
+         args[++i] = PT > mark ? point_marker : BVAR (current_buffer, mark);
          varies[i] = 4;
          break;
 
@@ -843,7 +842,7 @@ invoke it.  If KEYS is omitted or nil, the return value of
   Vthis_command = save_this_command;
   Vthis_original_command = save_this_original_command;
   Vreal_this_command = save_real_this_command;
-  KVAR (current_kboard, Vlast_command) = save_last_command;
+  kset_last_command (current_kboard, save_last_command);
 
   {
     Lisp_Object val;