emacs-diffs
[Top][All Lists]
Advanced

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

master c5f2eb5: Fix previous frame-focus server.el change


From: Lars Ingebrigtsen
Subject: master c5f2eb5: Fix previous frame-focus server.el change
Date: Fri, 18 Dec 2020 04:24:57 -0500 (EST)

branch: master
commit c5f2eb56c0164e87abc881955552e0b718921186
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix previous frame-focus server.el change
    
    * lisp/server.el (server-execute): Always give Emacs focus,
    whether we open a new frame or not.
---
 lisp/server.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/server.el b/lisp/server.el
index cd55d66..7773da0 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)))



reply via email to

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