From 9fed2b18527d163fa2d9134295371aead803b2e1 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 5 Mar 1994 20:32:35 +0000 Subject: [PATCH] (save_excursion_restore): Don't call Vrun_hooks if nil. --- src/editfns.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/editfns.c b/src/editfns.c index e12e39e82f1..037c00d3c8b 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -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; } -- 2.39.5