From: Lars Ingebrigtsen Date: Wed, 23 Dec 2020 05:58:12 +0000 (+0100) Subject: Revert recent server.el frame-focus changes X-Git-Tag: emacs-28.0.90~4606 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=21097cdd32a29a14ba3b1af55cffb1a9180faf26;p=emacs.git Revert recent server.el frame-focus changes * lisp/server.el (server-switch-buffer, server-execute): Revert 9cef8fc8cdb5e6e18c9cf617eed3808d67ca340e and c5f2eb56c0164e87abc881955552e0b718921186. This change led to regressions in non-new-frame circumstances. --- diff --git a/lisp/server.el b/lisp/server.el index 7773da09c76..d1183b95d36 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -1327,8 +1327,6 @@ The following commands are accepted by the client: (t (server-return-error proc err)))) (defun server-execute (proc files nowait commands dontkill frame tty-name) - (when server-raise-frame - (select-frame-set-input-focus (or frame (selected-frame)))) ;; This is run from timers and process-filters, i.e. "asynchronously". ;; But w.r.t the user, this is not really asynchronous since the timer ;; is run after 0s and the process-filter is run in response to the @@ -1688,7 +1686,9 @@ be a cons cell (LINENUMBER . COLUMNNUMBER)." (switch-to-buffer next-buffer)) ;; After all the above, we might still have ended up with ;; a minibuffer/dedicated-window (if there's no other). - (error (pop-to-buffer next-buffer))))))))) + (error (pop-to-buffer next-buffer))))))) + (when server-raise-frame + (select-frame-set-input-focus (window-frame))))) ;;;###autoload (defun server-save-buffers-kill-terminal (arg)