Mercurial > emacs
diff src/macterm.c @ 50701:cb5f0a5d5b36
* macterm.c (x_list_fonts): Return all fonts that match if maxnames = -1.
| author | Andrew Choi <akochoi@shaw.ca> |
|---|---|
| date | Fri, 25 Apr 2003 04:32:25 +0000 |
| parents | 12b66952af3a |
| children | 7ac9c3bea5ea |
line wrap: on
line diff
--- a/src/macterm.c Fri Apr 25 02:00:17 2003 +0000 +++ b/src/macterm.c Fri Apr 25 04:32:25 2003 +0000 @@ -5825,7 +5825,8 @@ /* Return a list of at most MAXNAMES font specs matching the one in PATTERN. Cache matching fonts for patterns in dpyinfo->name_list_element to avoid looking them up again by - calling mac_font_pattern_match (slow). */ + calling mac_font_pattern_match (slow). Return as many matching + fonts as possible if MAXNAMES = -1. */ Lisp_Object x_list_fonts (struct frame *f, @@ -5868,7 +5869,7 @@ newlist = Fcons (build_string (font_name_table[i]), newlist); n_fonts++; - if (n_fonts >= maxnames) + if (maxnames > 0 && n_fonts >= maxnames) break; } }
