summaryrefslogtreecommitdiff
path: root/src/editfns.c
diff options
context:
space:
mode:
authorJulien Danjou <julien@danjou.info>2011-03-23 11:06:57 +0100
committerJulien Danjou <julien@danjou.info>2011-03-23 11:06:57 +0100
commitdee091a37f6486dbbcf7bf00f6ee54d77033f997 (patch)
tree922b3490e04f512f9664ca350102d57a18296680 /src/editfns.c
parent904a432cf44c176fa3c88a975f046d0cf2992023 (diff)
downloademacs-dee091a37f6486dbbcf7bf00f6ee54d77033f997.tar.gz
emacs-dee091a37f6486dbbcf7bf00f6ee54d77033f997.tar.bz2
emacs-dee091a37f6486dbbcf7bf00f6ee54d77033f997.zip
Use Frun_hooks rather than calling Vrun_hooks manually
Diffstat (limited to 'src/editfns.c')
-rw-r--r--src/editfns.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 1f98ff040b3..009e1d34bde 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -928,18 +928,21 @@ save_excursion_restore (Lisp_Object info)
tem1 = BVAR (current_buffer, mark_active);
BVAR (current_buffer, mark_active) = tem;
- if (!NILP (Vrun_hooks))
+ /* If mark is active now, and either was not active
+ or was at a different place, run the activate hook. */
+ if (! NILP (tem))
{
- /* If mark is active now, and either was not active
- or was at a different place, run the activate hook. */
- if (! NILP (BVAR (current_buffer, mark_active)))
- {
- if (! EQ (omark, nmark))
- call1 (Vrun_hooks, intern ("activate-mark-hook"));
- }
- /* If mark has ceased to be active, run deactivate hook. */
- else if (! NILP (tem1))
- call1 (Vrun_hooks, intern ("deactivate-mark-hook"));
+ if (! EQ (omark, nmark))
+ {
+ tem = intern ("activate-mark-hook");
+ Frun_hooks (1, &tem);
+ }
+ }
+ /* If mark has ceased to be active, run deactivate hook. */
+ else if (! NILP (tem1))
+ {
+ tem = intern ("deactivate-mark-hook");
+ Frun_hooks (1, &tem);
}
/* If buffer was visible in a window, and a different window was