aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey2003-12-27 13:55:54 +0000
committerKaroly Lorentey2003-12-27 13:55:54 +0000
commit8303ba32ba3f0c925ac8ac5540e85ca497e9b809 (patch)
treef5efb48c9489c8813086c757384f554cc5192bc9 /src
parentbc279d67ae14ecb4755aad2003f9f616ab22b92f (diff)
downloademacs-8303ba32ba3f0c925ac8ac5540e85ca497e9b809.tar.gz
emacs-8303ba32ba3f0c925ac8ac5540e85ca497e9b809.zip
Implemented automatic deletion of terminals.
lisp/server.el (server-process-filter): Switch to the new terminal frame. src/frame.c (Fdelete_frame): Delete the tty if this was its the last frame. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-12
Diffstat (limited to 'src')
-rw-r--r--src/frame.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/frame.c b/src/frame.c
index 72d28c72b79..8f8dea8fa75 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -1381,6 +1381,26 @@ The functions are run with one arg, the frame to be deleted. */)
1381 x_destroy_window (f); 1381 x_destroy_window (f);
1382#endif 1382#endif
1383 1383
1384 if (FRAME_TERMCAP_P (f))
1385 {
1386 /* See if the terminal needs to be closed. */
1387 Lisp_Object tail, frame1;
1388 int delete = 1;
1389
1390 FOR_EACH_FRAME (tail, frame1)
1391 {
1392 if (!FRAME_LIVE_P (XFRAME (frame1)) &&
1393 FRAME_TERMCAP_P (XFRAME (frame1)) &&
1394 FRAME_TTY (XFRAME (frame1)) == FRAME_TTY (f))
1395 {
1396 delete = 0;
1397 break;
1398 }
1399 }
1400 if (delete)
1401 delete_tty (FRAME_TTY (f));
1402 }
1403
1384 f->output_data.nothing = 0; 1404 f->output_data.nothing = 0;
1385 1405
1386 /* If we've deleted the last_nonminibuf_frame, then try to find 1406 /* If we've deleted the last_nonminibuf_frame, then try to find