From c9cfc3e17b5bddb3a19951344da8d1c947d56643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Pit--Claudel?= Date: Sun, 3 Jul 2016 19:58:35 -0400 Subject: [PATCH] Add a post_display_hook --- src/xterm.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/xterm.c b/src/xterm.c index 9fb19a1..f8e3ef0 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -1230,8 +1230,11 @@ x_update_end (struct frame *f) XFlush (FRAME_X_DISPLAY (f)); unblock_input (); #endif -} + block_input (); + run_hook(Qpost_redisplay_hook); + unblock_input (); +} /* This function is called from various places in xdisp.c whenever a complete update has been performed. */ @@ -12739,6 +12742,12 @@ With MS Windows or Nextstep, the value is t. */); #endif DEFSYM (Qmodifier_value, "modifier-value"); + DEFSYM (Qpost_redisplay_hook, "post-redisplay-hook"); + + DEFVAR_LISP ("post-redisplay-hook", Vpost_redisplay_hook, + doc: /* Hook run at end of redisplay. */); + Vpost_redisplay_hook = Qnil; + DEFSYM (Qalt, "alt"); Fput (Qalt, Qmodifier_value, make_number (alt_modifier)); DEFSYM (Qhyper, "hyper"); -- 2.9.0