emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Redisplay hook


From: Clément Pit--Claudel
Subject: Redisplay hook
Date: Sat, 2 Jul 2016 15:24:36 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

Hi Emacs,

Is there a standard way to run a function after each redisplay cycle? The best 
I could come up with is the following:

(defun my-redisplay-hook (&rest args)
  (message "Redisplayed; %S" args)
  (set-window-redisplay-end-trigger (selected-window) 1))

(setq redisplay-end-trigger-functions '(my-redisplay-hook))
(my-redisplay-hook)

It seems to work OK, but it relies on the obsolete 
set-window-redisplay-end-trigger, and the deprecated variable 
redisplay-end-trigger-functions:

  This variable is obsolete since 23.1;
  use ‘jit-lock-register’ instead.
  This variable may be risky if used as a file-local variable.

But I'm not sure how jit-lock-register-function can help here.

Thanks!
Clément.

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]