# HG changeset patch # User Richard M. Stallman # Date 1036473347 0 # Node ID 2b5f7e1254d1ecb0c308b50bc968967605d6199c # Parent 8f11dde95c66096d0df090fe7a18cbd8b654a1f8 (Fcall_interactively): New local filter_specs. (Fcall_interactively): Check for progn as well as let. Add a gcpro. (Qprogn): New variable. (syms_of_callint): Staticpro and init Qprogn. diff -r 8f11dde95c66 -r 2b5f7e1254d1 src/callint.c --- a/src/callint.c Mon Nov 04 19:16:29 2002 +0000 +++ b/src/callint.c Tue Nov 05 05:15:47 2002 +0000 @@ -51,7 +51,7 @@ Lisp_Object Vmouse_leave_buffer_hook, Qmouse_leave_buffer_hook; -Lisp_Object Qlist, Qlet, Qletx, Qsave_excursion; +Lisp_Object Qlist, Qlet, Qletx, Qsave_excursion, Qprogn; static Lisp_Object preserved_fns; /* Marker used within call-interactively to refer to point. */ @@ -196,6 +196,7 @@ Lisp_Object fun; Lisp_Object funcar; Lisp_Object specs; + Lisp_Object filter_specs; Lisp_Object teml; Lisp_Object enable; int speccount = SPECPDL_INDEX (); @@ -243,6 +244,10 @@ specs = Qnil; string = 0; + /* The idea of FILTER_SPECS is to provide away to + specify how to represent the arguments in command history. + The feature is not fully implemented. */ + filter_specs = Qnil; /* Decode the kind of function. Either handle it and return, or go to `lose' if not interactive, or go to `retry' @@ -278,6 +283,7 @@ specs = Fassq (Qinteractive, Fcdr (XCDR (fun))); if (NILP (specs)) goto lose; + filter_specs = Fnth (make_number (1), specs); specs = Fcar (Fcdr (specs)); } else @@ -298,7 +304,9 @@ i = num_input_events; input = specs; /* Compute the arg values using the user's expression. */ + GCPRO2 (input, filter_specs); specs = Feval (specs); + UNGCPRO; if (i != num_input_events || !NILP (record_flag)) { /* We should record this command on the command history. */ @@ -315,7 +323,8 @@ car = XCAR (input); /* Skip through certain special forms. */ while (EQ (car, Qlet) || EQ (car, Qletx) - || EQ (car, Qsave_excursion)) + || EQ (car, Qsave_excursion) + || EQ (car, Qprogn)) { while (CONSP (XCDR (input))) input = XCDR (input); @@ -836,6 +845,8 @@ staticpro (&Qletx); Qsave_excursion = intern ("save-excursion"); staticpro (&Qsave_excursion); + Qprogn = intern ("progn"); + staticpro (&Qprogn); Qminus = intern ("-"); staticpro (&Qminus);