GNU bug report logs -
#7381
24.0.50; Provide a hook run when a window is selected
Previous Next
Reported by: Štěpán Němec <stepnem <at> gmail.com>
Date: Fri, 12 Nov 2010 00:12:02 UTC
Severity: wishlist
Merged with 16436
Found in version 24.0.50
Fixed in version 27.1
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
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
This bug report was last modified 6 years and 136 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.