[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/src/macterm.c
From: |
YAMAMOTO Mitsuharu |
Subject: |
[Emacs-diffs] Changes to emacs/src/macterm.c |
Date: |
Wed, 16 Mar 2005 03:08:07 -0500 |
Index: emacs/src/macterm.c
diff -c emacs/src/macterm.c:1.105 emacs/src/macterm.c:1.106
*** emacs/src/macterm.c:1.105 Wed Mar 16 03:29:13 2005
--- emacs/src/macterm.c Wed Mar 16 08:08:06 2005
***************
*** 129,137 ****
struct x_display_info *x_display_list;
/* This is a list of cons cells, each of the form (NAME
! . FONT-LIST-CACHE), one for each element of x_display_list and in
! the same order. NAME is the name of the frame. FONT-LIST-CACHE
! records previous values returned by x-list-fonts. */
Lisp_Object x_display_name_list;
--- 129,140 ----
struct x_display_info *x_display_list;
/* This is a list of cons cells, each of the form (NAME
! FONT-LIST-CACHE . RESOURCE-DATABASE), one for each element of
! x_display_list and in the same order. NAME is the name of the
! frame. FONT-LIST-CACHE records previous values returned by
! x-list-fonts. RESOURCE-DATABASE preserves the X Resource Database
! equivalent, which is implemented with a Lisp object, for the
! display. */
Lisp_Object x_display_name_list;
***************
*** 6447,6453 ****
if (dpyinfo)
{
! tem = XCDR (dpyinfo->name_list_element);
key = Fcons (pattern, make_number (maxnames));
newlist = Fassoc (key, tem);
--- 6450,6456 ----
if (dpyinfo)
{
! tem = XCAR (XCDR (dpyinfo->name_list_element));
key = Fcons (pattern, make_number (maxnames));
newlist = Fassoc (key, tem);
***************
*** 6466,6474 ****
if (dpyinfo)
{
! XSETCDR (dpyinfo->name_list_element,
Fcons (Fcons (key, newlist),
! XCDR (dpyinfo->name_list_element)));
}
label_cached:
--- 6469,6477 ----
if (dpyinfo)
{
! XSETCAR (XCDR (dpyinfo->name_list_element),
Fcons (Fcons (key, newlist),
! XCAR (XCDR (dpyinfo->name_list_element))));
}
label_cached:
***************
*** 9371,9429 ****
dpyinfo->mouse_face_hidden = 0;
}
- /* Create an xrdb-style database of resources to supercede registry settings.
- The database is just a concatenation of C strings, finished by an
additional
- \0. The string are submitted to some basic normalization, so
! [ *]option[ *]:[ *]value...
!
! becomes
!
! option:value...
!
! but any whitespace following value is not removed. */
!
! static char *
mac_make_rdb (xrm_option)
char *xrm_option;
{
! char *buffer = xmalloc (strlen (xrm_option) + 2);
! char *current = buffer;
! char ch;
! int in_option = 1;
! int before_value = 0;
!
! do {
! ch = *xrm_option++;
!
! if (ch == '\n')
! {
! *current++ = '\0';
! in_option = 1;
! before_value = 0;
! }
! else if (ch != ' ')
! {
! *current++ = ch;
! if (in_option && (ch == ':'))
! {
! in_option = 0;
! before_value = 1;
! }
! else if (before_value)
! {
! before_value = 0;
! }
! }
! else if (!(in_option || before_value))
! {
! *current++ = ch;
! }
! } while (ch);
! *current = '\0';
! return buffer;
}
struct mac_display_info *
--- 9374,9391 ----
dpyinfo->mouse_face_hidden = 0;
}
! static XrmDatabase
mac_make_rdb (xrm_option)
char *xrm_option;
{
! XrmDatabase database;
! database = xrm_get_preference_database (NULL);
! if (xrm_option)
! xrm_merge_string_database (database, xrm_option);
! return database;
}
struct mac_display_info *
***************
*** 9449,9462 ****
dpyinfo = &one_mac_display_info;
! dpyinfo->xrdb = xrm_option ? mac_make_rdb (xrm_option) : NULL;
/* Put this display on the chain. */
dpyinfo->next = x_display_list;
x_display_list = dpyinfo;
/* Put it on x_display_name_list. */
! x_display_name_list = Fcons (Fcons (display_name, Qnil),
x_display_name_list);
dpyinfo->name_list_element = XCAR (x_display_name_list);
--- 9411,9425 ----
dpyinfo = &one_mac_display_info;
! dpyinfo->xrdb = mac_make_rdb (xrm_option);
/* Put this display on the chain. */
dpyinfo->next = x_display_list;
x_display_list = dpyinfo;
/* Put it on x_display_name_list. */
! x_display_name_list = Fcons (Fcons (display_name,
! Fcons (Qnil, dpyinfo->xrdb)),
x_display_name_list);
dpyinfo->name_list_element = XCAR (x_display_name_list);