unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: focus return to old frame after make-frame
Date: Fri, 05 Aug 2005 11:45:12 -0600	[thread overview]
Message-ID: <dd08jc$lbr$1@sea.gmane.org> (raw)
In-Reply-To: <42F368C3.2050704@schmieder-laher.de>

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

  reply	other threads:[~2005-08-05 17:45 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-05 13:25 focus return to old frame after make-frame Friedrich Laher
2005-08-05 17:45 ` Kevin Rodgers [this message]
2005-08-05 21:06   ` Friedrich Laher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='dd08jc$lbr$1@sea.gmane.org' \
    --to=ihs_4664@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).