* focus return to old frame after make-frame
@ 2005-08-05 13:25 Friedrich Laher
2005-08-05 17:45 ` Kevin Rodgers
0 siblings, 1 reply; 3+ messages in thread
From: Friedrich Laher @ 2005-08-05 13:25 UTC (permalink / raw)
Is it possible - by lisp-code - to get the focus back to the former
frame after evaluation of (make-frame ...) ?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: focus return to old frame after make-frame
2005-08-05 13:25 focus return to old frame after make-frame Friedrich Laher
@ 2005-08-05 17:45 ` Kevin Rodgers
2005-08-05 21:06 ` Friedrich Laher
0 siblings, 1 reply; 3+ messages in thread
From: Kevin Rodgers @ 2005-08-05 17:45 UTC (permalink / raw)
Friedrich Laher wrote:
> Is it possible - by lisp-code - to get the focus back to the former
> frame after evaluation of (make-frame ...) ?
Does this work:
(defadvice make-frame (around focus-frame activate)
"Restore focus to the (previously) selected frame."
(let ((selected-frame (selected-frame))
(focus-function (intern (format "%s-focus-frame" window-system))))
ad-do-it
(when (fboundp focus-function)
(funcall focus-function selected-frame))))
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: focus return to old frame after make-frame
2005-08-05 17:45 ` Kevin Rodgers
@ 2005-08-05 21:06 ` Friedrich Laher
0 siblings, 0 replies; 3+ messages in thread
From: Friedrich Laher @ 2005-08-05 21:06 UTC (permalink / raw)
T H A N K ' S Kevin. Works! Will cost me much study to understand it.
(what's the correct way to answers in this mailing list? - ( so the
archive is built correctly ) )
Kevin Rodgers wrote:
> Friedrich Laher wrote:
> > Is it possible - by lisp-code - to get the focus back to the former
> > frame after evaluation of (make-frame ...) ?
>
> Does this work:
>
> (defadvice make-frame (around focus-frame activate)
> "Restore focus to the (previously) selected frame."
> (let ((selected-frame (selected-frame))
> (focus-function (intern (format "%s-focus-frame"
> window-system))))
> ad-do-it
> (when (fboundp focus-function)
> (funcall focus-function selected-frame))))
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-08-05 21:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-05 13:25 focus return to old frame after make-frame Friedrich Laher
2005-08-05 17:45 ` Kevin Rodgers
2005-08-05 21:06 ` Friedrich Laher
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).