mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 18:40:39 -08:00
Fix one more case of the previous error.
lisp/server.el (server-delete-client): Added noframe parameter. (server-handle-delete-frame): Use it. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-149
This commit is contained in:
parent
6ed9e43af1
commit
de93c7914c
1 changed files with 10 additions and 7 deletions
|
|
@ -207,8 +207,10 @@ New clients have no properties."
|
|||
(setq server-clients (cons (cons proc nil)
|
||||
server-clients))))
|
||||
|
||||
(defun server-delete-client (client)
|
||||
"Delete CLIENT, including its buffers, displays and frames."
|
||||
(defun server-delete-client (client &optional noframe)
|
||||
"Delete CLIENT, including its buffers, displays and frames.
|
||||
If NOFRAME is non-nil, let the frames live. (To be used from
|
||||
`delete-frame-functions'."
|
||||
;; Force a new lookup of client (prevents infinite recursion).
|
||||
(setq client (server-client
|
||||
(if (listp client) (car client) client)))
|
||||
|
|
@ -235,10 +237,11 @@ New clients have no properties."
|
|||
(delete-tty tty)))
|
||||
|
||||
;; Delete the client's frames.
|
||||
(dolist (frame (frame-list))
|
||||
(if (and (frame-live-p frame)
|
||||
(equal (car client) (frame-parameter frame 'client)))
|
||||
(delete-frame frame)))
|
||||
(unless noframe
|
||||
(dolist (frame (frame-list))
|
||||
(if (and (frame-live-p frame)
|
||||
(equal (car client) (frame-parameter frame 'client)))
|
||||
(delete-frame frame))))
|
||||
|
||||
;; Delete the client's process.
|
||||
(if (eq (process-status (car client)) 'open)
|
||||
|
|
@ -285,7 +288,7 @@ New clients have no properties."
|
|||
;; (Closing a terminal frame must not trigger a delete;
|
||||
;; we must wait for delete-tty-after-functions.)
|
||||
(server-log (format "server-handle-delete-frame, frame %s" frame) proc)
|
||||
(server-delete-client proc))))
|
||||
(server-delete-client proc 'noframe)))) ; Let delete-frame delete the frame later.
|
||||
|
||||
(defun server-handle-suspend-tty (tty)
|
||||
"Notify the emacsclient process to suspend itself when its tty device is suspended."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue