(save_excursion_restore): Don't call Vrun_hooks if nil.
authorRichard M. Stallman <rms@gnu.org>
Sat, 5 Mar 1994 20:32:35 +0000 (20:32 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 5 Mar 1994 20:32:35 +0000 (20:32 +0000)
src/editfns.c

index e12e39e..037c00d 100644 (file)
@@ -324,10 +324,13 @@ save_excursion_restore (info)
 
   tem1 = current_buffer->mark_active;
   current_buffer->mark_active = Fcdr (tem);
-  if (! NILP (current_buffer->mark_active))
-    call1 (Vrun_hooks, intern ("activate-mark-hook"));
-  else if (! NILP (tem1))
-    call1 (Vrun_hooks, intern ("deactivate-mark-hook"));
+  if (!NILP (Vrun_hooks))
+    {
+      if (! NILP (current_buffer->mark_active))
+       call1 (Vrun_hooks, intern ("activate-mark-hook"));
+      else if (! NILP (tem1))
+       call1 (Vrun_hooks, intern ("deactivate-mark-hook"));
+    }
   return Qnil;
 }