aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1993-06-11 07:14:12 +0000
committerRichard M. Stallman1993-06-11 07:14:12 +0000
commita91073601176d732ed0104d9488da2b84bc82004 (patch)
tree1c924f6b7eaad2ce21b6167e4d37a77cc4da1b87 /src
parent0c94f6ee88cf57affcdb5e45b603bb39a1b7f7ff (diff)
downloademacs-a91073601176d732ed0104d9488da2b84bc82004.tar.gz
emacs-a91073601176d732ed0104d9488da2b84bc82004.zip
(Fx_list_fonts): If names is 0, just return nil.
Diffstat (limited to 'src')
-rw-r--r--src/xfns.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/xfns.c b/src/xfns.c
index e46053ba163..1ca40679e32 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -2227,22 +2227,24 @@ fonts), even if they match PATTERN and FACE.")
2227 &info); /* info_return */ 2227 &info); /* info_return */
2228 UNBLOCK_INPUT; 2228 UNBLOCK_INPUT;
2229 2229
2230 { 2230 list = Qnil;
2231 Lisp_Object *tail;
2232 int i;
2233 2231
2234 list = Qnil; 2232 if (names)
2235 tail = &list; 2233 {
2236 for (i = 0; i < num_fonts; i++) 2234 Lisp_Object *tail;
2237 if (! size_ref 2235 int i;
2238 || same_size_fonts (&info[i], size_ref))
2239 {
2240 *tail = Fcons (build_string (names[i]), Qnil);
2241 tail = &XCONS (*tail)->cdr;
2242 }
2243 2236
2244 XFreeFontInfo (names, info, num_fonts); 2237 tail = &list;
2245 } 2238 for (i = 0; i < num_fonts; i++)
2239 if (! size_ref
2240 || same_size_fonts (&info[i], size_ref))
2241 {
2242 *tail = Fcons (build_string (names[i]), Qnil);
2243 tail = &XCONS (*tail)->cdr;
2244 }
2245
2246 XFreeFontInfo (names, info, num_fonts);
2247 }
2246 2248
2247 return list; 2249 return list;
2248} 2250}