aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2005-09-07 23:28:54 +0000
committerKaroly Lorentey2005-09-07 23:28:54 +0000
commit5b65d888a676b023b7232b460105551e51a58a13 (patch)
treee4de724a9d0b94abe002537267adf38f6f80b76b
parentb8c89bf6382f885d1d20e94a617d55ea0709b023 (diff)
downloademacs-5b65d888a676b023b7232b460105551e51a58a13.tar.gz
emacs-5b65d888a676b023b7232b460105551e51a58a13.zip
Enforce the presence of `window-system' and `tty-type' frame parameters in all frames.
* src/dispnew.c (init_display): Set up `window-system' and `tty-type' frame parameters in the initial tty frame. * src/frame.c (Fmake_terminal_frame): Look up the `tty-type' frame parameter, not `tty' when discovering the tty type of the new frame. Initialize `tty' and `tty-type' frame parameters in the new frame. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-402
-rw-r--r--README.multi-tty7
-rw-r--r--src/dispnew.c6
-rw-r--r--src/frame.c11
3 files changed, 19 insertions, 5 deletions
diff --git a/README.multi-tty b/README.multi-tty
index aa11d9538ea..7d0d420a0a7 100644
--- a/README.multi-tty
+++ b/README.multi-tty
@@ -398,13 +398,17 @@ THINGS TO DO
398 > The reason is that terminal-init-xterm calls 398 > The reason is that terminal-init-xterm calls
399 > xterm-register-default-colors which calls (display-color-cells (selected-frame)) 399 > xterm-register-default-colors which calls (display-color-cells (selected-frame))
400 > and probably `selected-frame' is not completely setup at that time. 400 > and probably `selected-frame' is not completely setup at that time.
401 401
402** emacsclient --no-wait and --eval is currently broken. 402** emacsclient --no-wait and --eval is currently broken.
403 403
404** xt-mouse.el needs to be adapted for multi-tty. It currently 404** xt-mouse.el needs to be adapted for multi-tty. It currently
405 signals an error on kill-emacs under X, which prevents the user 405 signals an error on kill-emacs under X, which prevents the user
406 from exiting Emacs. (Reported by Mnemonikk on freenode.) 406 from exiting Emacs. (Reported by Mnemonikk on freenode.)
407 407
408** Consider the `tty-type' frame parameter and the `display-tty-type'
409 function. They serve the exact same purpose. I think it may be
410 a good idea to eliminate one of them, preferably `tty-type'.
411
408** The handling of lisp/term/*.el, and frame creation in general, is a 412** The handling of lisp/term/*.el, and frame creation in general, is a
409 big, big mess. How come the terminal-specific file is loaded by 413 big, big mess. How come the terminal-specific file is loaded by
410 tty-create-frame-with-faces? I don't think it is necessary to load 414 tty-create-frame-with-faces? I don't think it is necessary to load
@@ -1213,6 +1217,7 @@ DIARY OF CHANGES
1213 frame is selected. 1217 frame is selected.
1214 1218
1215 (Done.) 1219 (Done.)
1220
1216 1221
1217;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d 1222;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d
1218 1223
diff --git a/src/dispnew.c b/src/dispnew.c
index 2cb661c6ba7..1ee951b0be0 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -6776,7 +6776,9 @@ For types not defined in VMS, use define emacs_term \"TYPE\".\n\
6776 6776
6777 d->reference_count++; 6777 d->reference_count++;
6778 d->display_info.tty->top_frame = selected_frame; 6778 d->display_info.tty->top_frame = selected_frame;
6779 change_frame_size (XFRAME (selected_frame), FrameRows (d->display_info.tty), FrameCols (d->display_info.tty), 0, 0, 1); 6779 change_frame_size (XFRAME (selected_frame),
6780 FrameRows (d->display_info.tty),
6781 FrameCols (d->display_info.tty), 0, 0, 1);
6780 6782
6781 /* Delete the initial display. */ 6783 /* Delete the initial display. */
6782 if (--initial_device->reference_count == 0 6784 if (--initial_device->reference_count == 0
@@ -6784,9 +6786,11 @@ For types not defined in VMS, use define emacs_term \"TYPE\".\n\
6784 (*initial_device->delete_device_hook) (initial_device); 6786 (*initial_device->delete_device_hook) (initial_device);
6785 6787
6786 /* Update frame parameters to reflect the new type. */ 6788 /* Update frame parameters to reflect the new type. */
6789 Fmodify_frame_parameters (selected_frame, Fcons (Fcons (Qwindow_system, Qnil), Qnil));
6787 Fmodify_frame_parameters 6790 Fmodify_frame_parameters
6788 (selected_frame, Fcons (Fcons (Qtty_type, 6791 (selected_frame, Fcons (Fcons (Qtty_type,
6789 Fdisplay_tty_type (selected_frame)), Qnil)); 6792 Fdisplay_tty_type (selected_frame)), Qnil));
6793 Fmodify_frame_parameters (selected_frame, Fcons (Fcons (Qtty, Qnil), Qnil));
6790 } 6794 }
6791 6795
6792 { 6796 {
diff --git a/src/frame.c b/src/frame.c
index ecbae7f593f..5ebdf7f11d8 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -661,6 +661,8 @@ affects all frames on the same terminal device. */)
661 struct device *d = NULL; 661 struct device *d = NULL;
662 Lisp_Object frame, tem; 662 Lisp_Object frame, tem;
663 struct frame *sf = SELECTED_FRAME (); 663 struct frame *sf = SELECTED_FRAME ();
664 Lisp_Object tty, tty_type;
665 struct gcpro gcpro1, gcpro2;
664 666
665#ifdef MSDOS 667#ifdef MSDOS
666 if (sf->output_method != output_msdos_raw 668 if (sf->output_method != output_msdos_raw
@@ -693,7 +695,6 @@ affects all frames on the same terminal device. */)
693 695
694 if (!d) 696 if (!d)
695 { 697 {
696 Lisp_Object tty, tty_type;
697 char *name = 0, *type = 0; 698 char *name = 0, *type = 0;
698 699
699 tty = Fassq (Qtty, parms); 700 tty = Fassq (Qtty, parms);
@@ -711,7 +712,7 @@ affects all frames on the same terminal device. */)
711 712
712 tty_type = Fassq (Qtty_type, parms); 713 tty_type = Fassq (Qtty_type, parms);
713 if (EQ (tty_type, Qnil)) 714 if (EQ (tty_type, Qnil))
714 tty_type = Fassq (Qtty, XFRAME (selected_frame)->param_alist); 715 tty_type = Fassq (Qtty_type, XFRAME (selected_frame)->param_alist);
715 if (EQ (tty_type, Qnil) && FRAME_TERMCAP_P (XFRAME (selected_frame)) 716 if (EQ (tty_type, Qnil) && FRAME_TERMCAP_P (XFRAME (selected_frame))
716 && FRAME_TTY (XFRAME (selected_frame))->type) 717 && FRAME_TTY (XFRAME (selected_frame))->type)
717 tty_type = build_string (FRAME_TTY (XFRAME (selected_frame))->type); 718 tty_type = build_string (FRAME_TTY (XFRAME (selected_frame))->type);
@@ -750,10 +751,14 @@ affects all frames on the same terminal device. */)
750 adjust_glyphs (f); 751 adjust_glyphs (f);
751 calculate_costs (f); 752 calculate_costs (f);
752 XSETFRAME (frame, f); 753 XSETFRAME (frame, f);
754 GCPRO2 (tty_type, tty);
753 Fmodify_frame_parameters (frame, Vdefault_frame_alist); 755 Fmodify_frame_parameters (frame, Vdefault_frame_alist);
754 Fmodify_frame_parameters (frame, parms); 756 Fmodify_frame_parameters (frame, parms);
755 Fmodify_frame_parameters (frame, Fcons (Fcons (Qwindow_system, Qnil), Qnil)); 757 Fmodify_frame_parameters (frame, Fcons (Fcons (Qwindow_system, Qnil), Qnil));
756 758 Fmodify_frame_parameters (frame, Fcons (Fcons (Qtty_type, tty_type), Qnil));
759 Fmodify_frame_parameters (frame, Fcons (Fcons (Qtty, tty), Qnil));
760 UNGCPRO;
761
757 /* Make the frame face alist be frame-specific, so that each 762 /* Make the frame face alist be frame-specific, so that each
758 frame could change its face definitions independently. */ 763 frame could change its face definitions independently. */
759 f->face_alist = Fcopy_alist (sf->face_alist); 764 f->face_alist = Fcopy_alist (sf->face_alist);