--- frame.el.~1.300.~ 2009-07-27 03:20:02.000000000 +0800 +++ frame.el 2009-07-27 11:40:23.000000000 +0800 @@ -749,7 +749,8 @@ instance if the frame appears under the mouse pointer and your setup is for focus to follow the pointer." (interactive) - (let* ((w (cond + (let* ((f (selected-frame)) + (w (cond ((assq 'terminal parameters) (let ((type (terminal-live-p (cdr (assq 'terminal parameters))))) (cond @@ -777,6 +778,7 @@ (let ((val (frame-parameter oldframe param))) (when val (set-frame-parameter frame param val))))) (run-hook-with-args 'after-make-frame-functions frame) + (x-focus-frame f) frame)) (defun filtered-frame-list (predicate)