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

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

Re: Save on losing focus in Emacs


From: David Kastrup
Subject: Re: Save on losing focus in Emacs
Date: Sun, 01 Jul 2007 22:12:20 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

Sergey Pariev <spariev@gmail.com> writes:

> Thanks for the answer.
> Yes, I see, of course, I can type 'C-x s' all the time. But the whole
> idea is to have buffers saved automagically every time I leave Emacs
> and save myself from typing there keystrokes - it may look like a
> small detail, but believe me, it's extremely convinient when doing,
> for example, web development, when you frequently switch to browser to
> check the results of your changes.

Try advising the following function, or binding yourself to
switch-frame.

handle-switch-frame is an interactive built-in function in `C source code'.
It is bound to <switch-frame>.
(handle-switch-frame EVENT)

Handle a switch-frame event EVENT.
Switch-frame events are usually bound to this function.
A switch-frame event tells Emacs that the window manager has requested
that the user's events be directed to the frame mentioned in the event.
This function selects the selected window of the frame of EVENT.

If EVENT is frame object, handle it as if it were a switch-frame event
to that frame.

[back]


-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

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