These names are fine by me. On 18 November 2013 00:25, Brian Jenkins wrote: > Thanks for the encouragement and feedback, Bozhidar. > > I'm not married to the names. I noticed that terms for focus gain/loss > seem to vary between platforms, so I used the event names used elsewhere in > the Emacs source. > > Perhaps "focus-gain-hook" and "focus-loss-hook" would be more intuitive? > > Brian > > > On Sun, Nov 17, 2013 at 1:29 PM, Bozhidar Batsov wrote: > >> I welcome your idea! In fact I've been thinking for quite some time we >> needed something like this. I don't like the names of the hooks, however, >> since they don't seem particularly standard - usually the terminology used >> with focus is "focus gained" and "focus lost" (or "on focus" and "on lose >> focus"). >> >> >> On 17 November 2013 19:50, Brian Jenkins wrote: >> >>> Hello. >>> >>> I'd like to contribute the attached patch, which adds hooks into gain and >>> loss of focus events. >>> >>> This allows saving all buffers on loss of focus. (Alt-tabbing between >>> an editor and browser is a popular workflow for web programmers.) >>> >>> It also allows reversion of buffers on regain of focus, convenient if >>> one is switching between Emacs and another editor. >>> >>> People will probably find other handy uses for these hooks. >>> >>> Best, >>> Brian Jenkins >>> >> >> >