Commit 6345f6aa authored by Gerd Moellmann's avatar Gerd Moellmann

(Fframe_parameter): Handle `name' and `background-mode'

specially.
(Fframe_parameter) [HAVE_X_WINDOWS]: Handle `display' specially.
(Qbackground_mode): New variable.
(syms_of_frame_1): Initialize Qbackground_mode.
parent 016c7a15
......@@ -105,6 +105,7 @@ Lisp_Object Qbuffer_predicate;
Lisp_Object Qbuffer_list;
Lisp_Object Qtitle;
Lisp_Object Qdisplay_type;
Lisp_Object Qbackground_mode;
Lisp_Object Vterminal_frame;
Lisp_Object Vdefault_frame_alist;
......@@ -156,6 +157,8 @@ syms_of_frame_1 ()
staticpro (&Qtitle);
Qdisplay_type = intern ("display-type");
staticpro (&Qdisplay_type);
Qbackground_mode = intern ("background-mode");
staticpro (&Qbackground_mode);
DEFVAR_LISP ("default-frame-alist", &Vdefault_frame_alist,
"Alist of default values for frame creation.\n\
......@@ -2106,13 +2109,18 @@ If FRAME is nil, describe the currently selected frame.")
{
if (EQ (parameter, Qname))
value = f->name;
#ifdef HAVE_X_WINDOWS
else if (EQ (parameter, Qdisplay) && FRAME_X_P (f))
value = XCAR (FRAME_X_DISPLAY_INFO (f)->name_list_element);
#endif /* HAVE_X_WINDOWS */
else
{
value = Fassq (parameter, f->param_alist);
if (CONSP (value))
value = XCDR (value);
else if (EQ (parameter, Qdisplay_type))
/* Avoid consing in a frequent case. */
else if (EQ (parameter, Qdisplay_type)
|| EQ (parameter, Qbackground_mode))
/* Avoid consing in frequent cases. */
value = Qnil;
else
value = Fcdr (Fassq (parameter, Fframe_parameters (frame)));
......
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