changeset 13447:8c89b569cfa9

(syms_of_callint): Set up Qlet, Qletx, Qsave_excursion. (Fcall_interactively): Look past those special forms when checking for a call to `list'.
author Richard M. Stallman <rms@gnu.org>
date Fri, 10 Nov 1995 06:34:09 +0000
parents 005d7ed9d69b
children 89f89cadc30d
files src/callint.c
diffstat 1 files changed, 34 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/src/callint.c	Fri Nov 10 06:32:38 1995 +0000
+++ b/src/callint.c	Fri Nov 10 06:34:09 1995 +0000
@@ -41,7 +41,7 @@
 
 Lisp_Object Vmouse_leave_buffer_hook, Qmouse_leave_buffer_hook;
 
-Lisp_Object Qlist;
+Lisp_Object Qlist, Qlet, Qletx, Qsave_excursion;
 static Lisp_Object preserved_fns;
 
 /* Marker used within call-interactively to refer to point.  */
@@ -302,22 +302,36 @@
 	     look for elements that were computed with (region-beginning)
 	     or (region-end), and put those expressions into VALUES
 	     instead of the present values.  */
-	  car = Fcar (input);
-	  if (EQ (car, Qlist))
+	  if (CONSP (input))
 	    {
-	      Lisp_Object intail, valtail;
-	      for (intail = Fcdr (input), valtail = values;
-		   CONSP (valtail);
-		   intail = Fcdr (intail), valtail = Fcdr (valtail))
+	      car = XCONS (input)->car;
+	      /* Skip through certain special forms.  */
+	      while (EQ (car, Qlet) || EQ (car, Qletx)
+		     || EQ (car, Qsave_excursion))
 		{
-		  Lisp_Object elt;
-		  elt = Fcar (intail);
-		  if (CONSP (elt))
+		  while (CONSP (XCONS (input)->cdr))
+		    input = XCONS (input)->cdr;
+		  input = XCONS (input)->car;
+		  if (!CONSP (input))
+		    break;
+		  car = XCONS (input)->car;
+		}
+	      if (EQ (car, Qlist))
+		{
+		  Lisp_Object intail, valtail;
+		  for (intail = Fcdr (input), valtail = values;
+		       CONSP (valtail);
+		       intail = Fcdr (intail), valtail = Fcdr (valtail))
 		    {
-		      Lisp_Object presflag;
-		      presflag = Fmemq (Fcar (elt), preserved_fns);
-		      if (!NILP (presflag))
-			Fsetcar (valtail, Fcar (intail));
+		      Lisp_Object elt;
+		      elt = Fcar (intail);
+		      if (CONSP (elt))
+			{
+			  Lisp_Object presflag;
+			  presflag = Fmemq (Fcar (elt), preserved_fns);
+			  if (!NILP (presflag))
+			    Fsetcar (valtail, Fcar (intail));
+			}
 		    }
 		}
 	    }
@@ -696,6 +710,12 @@
 
   Qlist = intern ("list");
   staticpro (&Qlist);
+  Qlet = intern ("let");
+  staticpro (&Qlet);
+  Qletx = intern ("let*");
+  staticpro (&Qletx);
+  Qsave_excursion = intern ("save-excursion");
+  staticpro (&Qsave_excursion);
 
   Qminus = intern ("-");
   staticpro (&Qminus);