293 |
buf = Fcurrent_buffer (); |
buf = Fcurrent_buffer (); |
294 |
/* If buf is a 'hidden' buffer (i.e. one whose name starts with |
/* If buf is a 'hidden' buffer (i.e. one whose name starts with |
295 |
a space), try to find another one. */ |
a space), try to find another one. */ |
296 |
if (XSTRING (Fbuffer_name (buf))->data[0] == ' ') |
if (SREF (Fbuffer_name (buf), 0) == ' ') |
297 |
buf = Fother_buffer (buf, Qnil, Qnil); |
buf = Fother_buffer (buf, Qnil, Qnil); |
298 |
|
|
299 |
/* Use set_window_buffer, not Fset_window_buffer, and don't let |
/* Use set_window_buffer, not Fset_window_buffer, and don't let |
1115 |
#ifdef MAC_OS8 |
#ifdef MAC_OS8 |
1116 |
/* Terminal frame deleted before any other visible frames are |
/* Terminal frame deleted before any other visible frames are |
1117 |
created. */ |
created. */ |
1118 |
&& strcmp (XSTRING (f->name)->data, "F1") != 0 |
&& strcmp (SDATA (f->name), "F1") != 0 |
1119 |
#endif |
#endif |
1120 |
) |
) |
1121 |
error ("Attempt to delete the sole visible or iconified frame"); |
error ("Attempt to delete the sole visible or iconified frame"); |
1869 |
|
|
1870 |
/* Check for no change needed in this very common case |
/* Check for no change needed in this very common case |
1871 |
before we do any consing. */ |
before we do any consing. */ |
1872 |
if (frame_name_fnn_p (XSTRING (f->name)->data, |
if (frame_name_fnn_p (SDATA (f->name), |
1873 |
STRING_BYTES (XSTRING (f->name)))) |
SBYTES (f->name))) |
1874 |
return; |
return; |
1875 |
|
|
1876 |
terminal_frame_count++; |
terminal_frame_count++; |
1887 |
|
|
1888 |
/* Don't allow the user to set the frame name to F<num>, so it |
/* Don't allow the user to set the frame name to F<num>, so it |
1889 |
doesn't clash with the names we generate for terminal frames. */ |
doesn't clash with the names we generate for terminal frames. */ |
1890 |
if (frame_name_fnn_p (XSTRING (name)->data, STRING_BYTES (XSTRING (name)))) |
if (frame_name_fnn_p (SDATA (name), SBYTES (name))) |
1891 |
error ("Frame names of the form F<num> are usurped by Emacs"); |
error ("Frame names of the form F<num> are usurped by Emacs"); |
1892 |
} |
} |
1893 |
|
|
2005 |
elt = Fassq (Qforeground_color, alist); |
elt = Fassq (Qforeground_color, alist); |
2006 |
if (!NILP (elt) && CONSP (elt) && STRINGP (XCDR (elt))) |
if (!NILP (elt) && CONSP (elt) && STRINGP (XCDR (elt))) |
2007 |
{ |
{ |
2008 |
if (strncmp (XSTRING (XCDR (elt))->data, |
if (strncmp (SDATA (XCDR (elt)), |
2009 |
unspecified_bg, |
unspecified_bg, |
2010 |
XSTRING (XCDR (elt))->size) == 0) |
SCHARS (XCDR (elt))) == 0) |
2011 |
store_in_alist (&alist, Qforeground_color, tty_color_name (f, bg)); |
store_in_alist (&alist, Qforeground_color, tty_color_name (f, bg)); |
2012 |
else if (strncmp (XSTRING (XCDR (elt))->data, |
else if (strncmp (SDATA (XCDR (elt)), |
2013 |
unspecified_fg, |
unspecified_fg, |
2014 |
XSTRING (XCDR (elt))->size) == 0) |
SCHARS (XCDR (elt))) == 0) |
2015 |
store_in_alist (&alist, Qforeground_color, tty_color_name (f, fg)); |
store_in_alist (&alist, Qforeground_color, tty_color_name (f, fg)); |
2016 |
} |
} |
2017 |
else |
else |
2019 |
elt = Fassq (Qbackground_color, alist); |
elt = Fassq (Qbackground_color, alist); |
2020 |
if (!NILP (elt) && CONSP (elt) && STRINGP (XCDR (elt))) |
if (!NILP (elt) && CONSP (elt) && STRINGP (XCDR (elt))) |
2021 |
{ |
{ |
2022 |
if (strncmp (XSTRING (XCDR (elt))->data, |
if (strncmp (SDATA (XCDR (elt)), |
2023 |
unspecified_fg, |
unspecified_fg, |
2024 |
XSTRING (XCDR (elt))->size) == 0) |
SCHARS (XCDR (elt))) == 0) |
2025 |
store_in_alist (&alist, Qbackground_color, tty_color_name (f, fg)); |
store_in_alist (&alist, Qbackground_color, tty_color_name (f, fg)); |
2026 |
else if (strncmp (XSTRING (XCDR (elt))->data, |
else if (strncmp (SDATA (XCDR (elt)), |
2027 |
unspecified_bg, |
unspecified_bg, |
2028 |
XSTRING (XCDR (elt))->size) == 0) |
SCHARS (XCDR (elt))) == 0) |
2029 |
store_in_alist (&alist, Qbackground_color, tty_color_name (f, bg)); |
store_in_alist (&alist, Qbackground_color, tty_color_name (f, bg)); |
2030 |
} |
} |
2031 |
else |
else |
2112 |
|
|
2113 |
if (EQ (parameter, Qbackground_color)) |
if (EQ (parameter, Qbackground_color)) |
2114 |
{ |
{ |
2115 |
color_name = XSTRING (value)->data; |
color_name = SDATA (value); |
2116 |
csz = XSTRING (value)->size; |
csz = SCHARS (value); |
2117 |
if (strncmp (color_name, unspecified_bg, csz) == 0) |
if (strncmp (color_name, unspecified_bg, csz) == 0) |
2118 |
value = tty_color_name (f, FRAME_BACKGROUND_PIXEL (f)); |
value = tty_color_name (f, FRAME_BACKGROUND_PIXEL (f)); |
2119 |
else if (strncmp (color_name, unspecified_fg, csz) == 0) |
else if (strncmp (color_name, unspecified_fg, csz) == 0) |
2121 |
} |
} |
2122 |
else if (EQ (parameter, Qforeground_color)) |
else if (EQ (parameter, Qforeground_color)) |
2123 |
{ |
{ |
2124 |
color_name = XSTRING (value)->data; |
color_name = SDATA (value); |
2125 |
csz = XSTRING (value)->size; |
csz = SCHARS (value); |
2126 |
if (strncmp (color_name, unspecified_fg, csz) == 0) |
if (strncmp (color_name, unspecified_fg, csz) == 0) |
2127 |
value = tty_color_name (f, FRAME_FOREGROUND_PIXEL (f)); |
value = tty_color_name (f, FRAME_FOREGROUND_PIXEL (f)); |
2128 |
else if (strncmp (color_name, unspecified_bg, csz) == 0) |
else if (strncmp (color_name, unspecified_bg, csz) == 0) |