diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2013-10-18 16:57:44 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2013-10-18 16:57:44 +0400 |
commit | d141d7011296265b0c2a6432bed9317614abf019 (patch) | |
tree | effac9c22d9391c5527e5d9990b1fdbe4647e556 /src/xfns.c | |
parent | f0ff1cd5762b2485add7b2e5a1da52eab733a873 (diff) |
Remove port-specific display name lists to avoid extra
complexity and data duplication with display info lists.
* xterm.h (x_display_name_list): Remove declaration.
* xterm.c (x_display_name_list): Remove.
(x_term_init, x_delete_display, syms_of_xterm): Adjust users.
* xfns.c (x_display_info_for_name, Fx_display_list):
Likewise. Use x_display_list where appropriate.
* w32term.h (w32_display_name_list): Remove declaration.
* w32term.c (w32_display_name_list): Remove.
(w32_initialize_display_info, x_delete_display, syms_of_w32term):
Adjust users.
* w32fns.c (x_display_info_for_name, Fx_display_list):
Likewise. Use x_display_list where appropriate.
* nsterm.h (ns_display_name_list): Remove declaration.
* nsterm.m (ns_display_name_list): Remove.
(ns_term_init, syms_of_nsterm): Adjust users.
* nsfns.m (ns_display_info_for_name, Fx_display_list):
Likewise. Use x_display_list where appropriate.
* termhooks.h (TERMINAL_FONT_CACHE): New macro.
* alloc.c (toplevel) [HAVE_WINDOW_SYSTEM]: Include TERM_HEADER.
(mark_terminals): Mark per-terminal font cache.
Diffstat (limited to 'src/xfns.c')
-rw-r--r-- | src/xfns.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/xfns.c b/src/xfns.c index 2b89564294..9cd7d3e662 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -4242,20 +4242,13 @@ select_visual (struct x_display_info *dpyinfo) static struct x_display_info * x_display_info_for_name (Lisp_Object name) { - Lisp_Object names; struct x_display_info *dpyinfo; CHECK_STRING (name); - for (dpyinfo = x_display_list, names = x_display_name_list; - dpyinfo; - dpyinfo = dpyinfo->next, names = XCDR (names)) - { - Lisp_Object tem; - tem = Fstring_equal (XCAR (XCAR (names)), name); - if (!NILP (tem)) - return dpyinfo; - } + for (dpyinfo = x_display_list; dpyinfo; dpyinfo = dpyinfo->next) + if (!NILP (Fstring_equal (XCAR (dpyinfo->name_list_element), name))) + return dpyinfo; /* Use this general default value to start with. */ Vx_resource_name = Vinvocation_name; @@ -4338,11 +4331,11 @@ DEFUN ("x-display-list", Fx_display_list, Sx_display_list, 0, 0, 0, doc: /* Return the list of display names that Emacs has connections to. */) (void) { - Lisp_Object tail, result; + Lisp_Object result = Qnil; + struct x_display_info *xdi; - result = Qnil; - for (tail = x_display_name_list; CONSP (tail); tail = XCDR (tail)) - result = Fcons (XCAR (XCAR (tail)), result); + for (xdi = x_display_list; xdi; xdi = xdi->next) + result = Fcons (XCAR (xdi->name_list_element), result); return result; } |