[Top][All Lists]

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

Re: focus return to old frame after make-frame

From: Friedrich Laher
Subject: Re: focus return to old frame after make-frame
Date: Fri, 05 Aug 2005 23:06:28 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1

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))))
    (when (fboundp focus-function)
      (funcall focus-function selected-frame))))

reply via email to

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