changeset 13444:17f3f1c1bdf8

(run-hook-with-args, run-hook-list-with-args): Safeguard against a t in the global value of hook variables.
author Richard M. Stallman <rms@gnu.org>
date Fri, 10 Nov 1995 04:48:27 +0000
parents c21527e2f125
children 2e30fc2cbae8
files src/eval.c
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/eval.c	Fri Nov 10 04:44:37 1995 +0000
+++ b/src/eval.c	Fri Nov 10 04:48:27 1995 +0000
@@ -1959,7 +1959,10 @@
 		   globals = XCONS (globals)->cdr)
 		{
 		  args[0] = XCONS (globals)->car;
-		  ret = Ffuncall (nargs, args);
+		  /* In a global value, t should not occur.  If it does, we
+		     must ignore it to avoid an endless loop.  */
+		  if (!EQ (args[0], Qt))
+		    ret = Ffuncall (nargs, args);
 		}
 	    }
 	  else
@@ -2007,7 +2010,10 @@
 	       globals = XCONS (globals)->cdr)
 	    {
 	      args[0] = XCONS (globals)->car;
-	      Ffuncall (nargs, args);
+	      /* In a global value, t should not occur.  If it does, we
+		 must ignore it to avoid an endless loop.  */
+	      if (!EQ (args[0], Qt))
+		Ffuncall (nargs, args);
 	    }
 	}
       else