bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#7381: 24.0.50; Provide a hook run when a window is selected


From: Štěpán Němec
Subject: bug#7381: 24.0.50; Provide a hook run when a window is selected
Date: Sat, 12 Jan 2019 12:46:34 +0100
User-agent: Notmuch/0.28 (https://notmuchmail.org) Emacs/26.1 (x86_64-pc-linux-gnu)

On Sat, 12 Jan 2019 10:15:24 +0100
martin rudalics wrote:

> Current master now provides a hook run when redisplay detects that the
> selected window has changed wrt last redisplay.  The hook is called
> 'window-selection-change-functions' and is described in detail in the
> Elisp manual.

Thank you very much. Despite still using GNU Emacs daily, I currently
don't follow the development version so I can't test the changes, but I
really appreciate your getting back to this after so many years.

> Below I sketch how that hook could be used to provide
> the behavior you asked for.

> (defvar .old-selected-window (selected-window))
>
> (defun .update-old-selected-window (frame)
>    (unless (eq .update-old-selected-window old-selected-window)
>      (setq .old-selected-window (old-selected-window))))

It seems to me this was meant to read

 (defun .update-old-selected-window (frame)
    (unless (eq .old-selected-window (old-selected-window))
      (setq .old-selected-window (old-selected-window))))

  Thanks,

  Štěpán





reply via email to

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