]> code.delx.au - gnu-emacs/blobdiff - src/callint.c
Update copyright year to 2016
[gnu-emacs] / src / callint.c
index 2ff2f80d740a618451dfc294d7fefc6f0af388fb..3b23f2229862d5eddba4c25bb8f1ac8fe592f62a 100644 (file)
@@ -1,5 +1,5 @@
 /* Call a Lisp function interactively.
-   Copyright (C) 1985-1986, 1993-1995, 1997, 2000-2015 Free Software
+   Copyright (C) 1985-1986, 1993-1995, 1997, 2000-2016 Free Software
    Foundation, Inc.
 
 This file is part of GNU Emacs.
@@ -23,10 +23,8 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "lisp.h"
 #include "character.h"
 #include "buffer.h"
-#include "commands.h"
 #include "keyboard.h"
 #include "window.h"
-#include "keymap.h"
 
 static Lisp_Object preserved_fns;
 
@@ -228,11 +226,9 @@ static Lisp_Object
 read_file_name (Lisp_Object default_filename, Lisp_Object mustmatch,
                Lisp_Object initial, Lisp_Object predicate)
 {
-  struct gcpro gcpro1;
-  GCPRO1 (default_filename);
-  RETURN_UNGCPRO (CALLN (Ffuncall, intern ("read-file-name"),
-                        callint_message, Qnil, default_filename,
-                        mustmatch, initial, predicate));
+  return CALLN (Ffuncall, intern ("read-file-name"),
+               callint_message, Qnil, default_filename,
+               mustmatch, initial, predicate);
 }
 
 /* BEWARE: Calling this directly from C would defeat the purpose!  */
@@ -298,7 +294,6 @@ invoke it.  If KEYS is omitted or nil, the return value of
   ptrdiff_t i, nargs;
   ptrdiff_t mark;
   bool arg_from_tty = 0;
-  struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
   ptrdiff_t key_count;
   bool record_then_fail = 0;
 
@@ -340,9 +335,7 @@ invoke it.  If KEYS is omitted or nil, the return value of
   /* Set SPECS to the interactive form, or barf if not interactive.  */
   {
     Lisp_Object form;
-    GCPRO2 (function, prefix_arg);
     form = Finteractive_form (function);
-    UNGCPRO;
     if (CONSP (form))
       specs = filter_specs = Fcar (XCDR (form));
     else
@@ -357,11 +350,9 @@ invoke it.  If KEYS is omitted or nil, the return value of
       uintmax_t events = num_input_events;
       input = specs;
       /* Compute the arg values using the user's expression.  */
-      GCPRO2 (input, filter_specs);
       specs = Feval (specs,
                     CONSP (funval) && EQ (Qclosure, XCAR (funval))
                     ? CAR_SAFE (XCDR (funval)) : Qnil);
-      UNGCPRO;
       if (events != num_input_events || !NILP (record_flag))
        {
          /* We should record this command on the command history.  */
@@ -500,10 +491,6 @@ invoke it.  If KEYS is omitted or nil, the return value of
 
   memclear (args, nargs * (2 * word_size + 1));
 
-  GCPRO5 (prefix_arg, function, *args, *visargs, up_event);
-  gcpro3.nvars = nargs;
-  gcpro4.nvars = nargs;
-
   if (!NILP (enable))
     specbind (Qenable_recursive_minibuffers, Qt);
 
@@ -512,7 +499,7 @@ invoke it.  If KEYS is omitted or nil, the return value of
     {
       visargs[1] = make_string (tem + 1, strcspn (tem + 1, "\n"));
       if (strchr (SSDATA (visargs[1]), '%'))
-       callint_message = Fformat (i - 1, visargs + 1);
+       callint_message = Fformat_message (i - 1, visargs + 1);
       else
        callint_message = visargs[1];
 
@@ -847,7 +834,6 @@ invoke it.  If KEYS is omitted or nil, the return value of
 
   {
     Lisp_Object val = Ffuncall (nargs, args);
-    UNGCPRO;
     val = unbind_to (speccount, val);
     SAFE_FREE ();
     return val;