Subject: Re: bug#16436: feature request: select-window-hook

From: martin rudalics <[email-masked]>
Date: Sat, 12 Jan 2019 10:15:39 +0100

> I don't know whether I missed something but I can't find a hook like
 > select-window-hook in stand
 > hooks<http://www.gnu.org/software/emacs/manual/html_node/elisp/Standard-Hooks.html>,
 > and I find some other emacs user has the same issue.
 >
 > I really want to have a function as select-last-window for emacs, by now, I
 > hack it in a ugly way, and I think select-window-hook can make it better.

Emacs now provides a hook called 'window-selection-change-functions'
which should fix your problem.  Please have a look.

Thanks, martin