]> code.delx.au - gnu-emacs/commitdiff
(server-buffer-done): Pause between client commands,
authorRichard M. Stallman <rms@gnu.org>
Thu, 10 Aug 1995 22:07:41 +0000 (22:07 +0000)
committerRichard M. Stallman <rms@gnu.org>
Thu, 10 Aug 1995 22:07:41 +0000 (22:07 +0000)
but not after the last one.

lisp/server.el

index cba3629b85f811a92234cc4415e1c2442354de6c..bc6cb2522b0260ecb4bad39bc4c3cd06ed83e0ca 100644 (file)
@@ -248,6 +248,7 @@ or nil.  KILLED is t if we killed BUFFER (because it was a temp file)."
   (let ((running (eq (process-status server-process) 'run))
        (next-buffer nil)
        (killed nil)
+       (first t)
        (old-clients server-clients))
     (while old-clients
       (let ((client (car old-clients)))
@@ -266,12 +267,13 @@ or nil.  KILLED is t if we killed BUFFER (because it was a temp file)."
        (if (cdr client) nil
          (if running
              (progn
-               (send-string server-process 
-                            (format "Close: %s Done\n" (car client)))
-               (server-log (format "Close: %s Done\n" (car client)))
                ;; Don't send emacsserver two commands in close succession.
                ;; It cannot handle that.
-               (sit-for 1)))
+               (or first (sit-for 1))
+               (setq first nil)
+               (send-string server-process 
+                            (format "Close: %s Done\n" (car client)))
+               (server-log (format "Close: %s Done\n" (car client)))))
          (setq server-clients (delq client server-clients))))
       (setq old-clients (cdr old-clients)))
     (if (and (bufferp buffer) (buffer-name buffer))