From: Lars Ingebrigtsen Date: Fri, 18 Dec 2020 09:24:48 +0000 (+0100) Subject: Fix previous frame-focus server.el change X-Git-Tag: emacs-28.0.90~4671 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c5f2eb56c0164e87abc881955552e0b718921186;p=emacs.git Fix previous frame-focus server.el change * lisp/server.el (server-execute): Always give Emacs focus, whether we open a new frame or not. --- diff --git a/lisp/server.el b/lisp/server.el index cd55d66a975..7773da09c76 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -1327,6 +1327,8 @@ 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 @@ -1334,8 +1336,6 @@ The following commands are accepted by the client: ;; inhibit-quit flag, which is good since `commands' (as well as ;; find-file-noselect via the major-mode) can run arbitrary code, ;; including code that needs to wait. - (when (and frame server-raise-frame) - (select-frame-set-input-focus frame)) (with-local-quit (condition-case err (let ((buffers (server-visit-files files proc nowait)))