Commit 5b65d888 authored by Karoly Lorentey's avatar Karoly Lorentey

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
parent b8c89bf6
......@@ -398,13 +398,17 @@ THINGS TO DO
> The reason is that terminal-init-xterm calls
> xterm-register-default-colors which calls (display-color-cells (selected-frame))
> and probably `selected-frame' is not completely setup at that time.
** emacsclient --no-wait and --eval is currently broken.
** xt-mouse.el needs to be adapted for multi-tty. It currently
signals an error on kill-emacs under X, which prevents the user
from exiting Emacs. (Reported by Mnemonikk on freenode.)
** Consider the `tty-type' frame parameter and the `display-tty-type'
function. They serve the exact same purpose. I think it may be
a good idea to eliminate one of them, preferably `tty-type'.
** The handling of lisp/term/*.el, and frame creation in general, is a
big, big mess. How come the terminal-specific file is loaded by
tty-create-frame-with-faces? I don't think it is necessary to load
......@@ -1213,6 +1217,7 @@ DIARY OF CHANGES
frame is selected.
(Done.)
;;; arch-tag: 8da1619e-2e79-41a8-9ac9-a0485daad17d
......@@ -6776,7 +6776,9 @@ For types not defined in VMS, use define emacs_term \"TYPE\".\n\
d->reference_count++;
d->display_info.tty->top_frame = selected_frame;
change_frame_size (XFRAME (selected_frame), FrameRows (d->display_info.tty), FrameCols (d->display_info.tty), 0, 0, 1);
change_frame_size (XFRAME (selected_frame),
FrameRows (d->display_info.tty),
FrameCols (d->display_info.tty), 0, 0, 1);
/* Delete the initial display. */
if (--initial_device->reference_count == 0
......@@ -6784,9 +6786,11 @@ For types not defined in VMS, use define emacs_term \"TYPE\".\n\
(*initial_device->delete_device_hook) (initial_device);
/* Update frame parameters to reflect the new type. */
Fmodify_frame_parameters (selected_frame, Fcons (Fcons (Qwindow_system, Qnil), Qnil));
Fmodify_frame_parameters
(selected_frame, Fcons (Fcons (Qtty_type,
Fdisplay_tty_type (selected_frame)), Qnil));
Fmodify_frame_parameters (selected_frame, Fcons (Fcons (Qtty, Qnil), Qnil));
}
{
......
......@@ -661,6 +661,8 @@ affects all frames on the same terminal device. */)
struct device *d = NULL;
Lisp_Object frame, tem;
struct frame *sf = SELECTED_FRAME ();
Lisp_Object tty, tty_type;
struct gcpro gcpro1, gcpro2;
#ifdef MSDOS
if (sf->output_method != output_msdos_raw
......@@ -693,7 +695,6 @@ affects all frames on the same terminal device. */)
if (!d)
{
Lisp_Object tty, tty_type;
char *name = 0, *type = 0;
tty = Fassq (Qtty, parms);
......@@ -711,7 +712,7 @@ affects all frames on the same terminal device. */)
tty_type = Fassq (Qtty_type, parms);
if (EQ (tty_type, Qnil))
tty_type = Fassq (Qtty, XFRAME (selected_frame)->param_alist);
tty_type = Fassq (Qtty_type, XFRAME (selected_frame)->param_alist);
if (EQ (tty_type, Qnil) && FRAME_TERMCAP_P (XFRAME (selected_frame))
&& FRAME_TTY (XFRAME (selected_frame))->type)
tty_type = build_string (FRAME_TTY (XFRAME (selected_frame))->type);
......@@ -750,10 +751,14 @@ affects all frames on the same terminal device. */)
adjust_glyphs (f);
calculate_costs (f);
XSETFRAME (frame, f);
GCPRO2 (tty_type, tty);
Fmodify_frame_parameters (frame, Vdefault_frame_alist);
Fmodify_frame_parameters (frame, parms);
Fmodify_frame_parameters (frame, Fcons (Fcons (Qwindow_system, Qnil), Qnil));
Fmodify_frame_parameters (frame, Fcons (Fcons (Qtty_type, tty_type), Qnil));
Fmodify_frame_parameters (frame, Fcons (Fcons (Qtty, tty), Qnil));
UNGCPRO;
/* Make the frame face alist be frame-specific, so that each
frame could change its face definitions independently. */
f->face_alist = Fcopy_alist (sf->face_alist);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment