From: Kenichi Handa Date: Wed, 11 Nov 1998 03:36:15 +0000 (+0000) Subject: (x_list_fonts): Don't change the value of maxnames. X-Git-Tag: emacs-20.4~1265 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=861bf815f33fa593283aecb9eda31cdecfa9207a;p=emacs.git (x_list_fonts): Don't change the value of maxnames. --- diff --git a/src/xterm.c b/src/xterm.c index 8145689d416..a63fdafb836 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -6469,12 +6469,6 @@ x_list_fonts (f, pattern, size, maxnames) if (maxnames == 1 && !size) /* We can return any single font matching PATTERN. */ try_XLoadQueryFont = 1; - else - { - /* We try at least 10 fonts because XListFonts will return - auto-scaled fonts at the head. */ - if (maxnames < 10) maxnames = 10; - } for (; CONSP (patterns); patterns = XCONS (patterns)->cdr) { @@ -6535,7 +6529,9 @@ x_list_fonts (f, pattern, size, maxnames) } if (!try_XLoadQueryFont) - names = XListFonts (dpy, XSTRING (pattern)->data, maxnames, + /* We try at least 10 fonts because XListFonts will return + auto-scaled fonts at the head. */ + names = XListFonts (dpy, XSTRING (pattern)->data, max (maxnames, 10), &num_fonts); UNBLOCK_INPUT;