aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2008-05-29 04:46:59 +0000
committerKenichi Handa2008-05-29 04:46:59 +0000
commit62057df6e6056ff949f374c469459a217f6ca31a (patch)
treee5a619b97274dbfeeb360a9bd70914d01a1aee8a /src
parentd5ab09cd20048772bed86d84153366ac745372e5 (diff)
downloademacs-62057df6e6056ff949f374c469459a217f6ca31a.tar.gz
emacs-62057df6e6056ff949f374c469459a217f6ca31a.zip
(Fx_family_fonts): Set frame correctly.
Diffstat (limited to 'src')
-rw-r--r--src/xfaces.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/xfaces.c b/src/xfaces.c
index 161008071c8..b5704ab6174 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -1754,15 +1754,18 @@ the face font sort order. */)
1754 (family, frame) 1754 (family, frame)
1755 Lisp_Object family, frame; 1755 Lisp_Object family, frame;
1756{ 1756{
1757 struct frame *f = check_x_frame (frame); 1757 Lisp_Object font_spec, vec;
1758 Lisp_Object font_spec = Qnil, vec;
1759 int i, nfonts; 1758 int i, nfonts;
1760 Lisp_Object result; 1759 Lisp_Object result;
1761 1760
1761 if (NILP (frame))
1762 frame = selected_frame;
1763 CHECK_LIVE_FRAME (frame);
1764
1765 font_spec = Ffont_spec (0, NULL);
1762 if (!NILP (family)) 1766 if (!NILP (family))
1763 { 1767 {
1764 CHECK_STRING (family); 1768 CHECK_STRING (family);
1765 font_spec = Ffont_spec (0, NULL);
1766 Ffont_put (font_spec, QCfamily, family); 1769 Ffont_put (font_spec, QCfamily, family);
1767 } 1770 }
1768 vec = font_list_entities (frame, font_spec); 1771 vec = font_list_entities (frame, font_spec);
@@ -1803,13 +1806,13 @@ the face font sort order. */)
1803 ASET (v, 0, AREF (font, FONT_FAMILY_INDEX)); 1806 ASET (v, 0, AREF (font, FONT_FAMILY_INDEX));
1804 ASET (v, 1, FONT_WIDTH_SYMBOLIC (font)); 1807 ASET (v, 1, FONT_WIDTH_SYMBOLIC (font));
1805 point = PIXEL_TO_POINT (XINT (AREF (font, FONT_SIZE_INDEX)) * 10, 1808 point = PIXEL_TO_POINT (XINT (AREF (font, FONT_SIZE_INDEX)) * 10,
1806 f->resy); 1809 XFRAME (frame)->resy);
1807 ASET (v, 2, make_number (point)); 1810 ASET (v, 2, make_number (point));
1808 ASET (v, 3, FONT_WEIGHT_SYMBOLIC (font)); 1811 ASET (v, 3, FONT_WEIGHT_SYMBOLIC (font));
1809 ASET (v, 4, FONT_SLANT_SYMBOLIC (font)); 1812 ASET (v, 4, FONT_SLANT_SYMBOLIC (font));
1810 spacing = Ffont_get (font, QCspacing); 1813 spacing = Ffont_get (font, QCspacing);
1811 ASET (v, 5, (NILP (spacing) || EQ (spacing, Qp)) ? Qnil : Qt); 1814 ASET (v, 5, (NILP (spacing) || EQ (spacing, Qp)) ? Qnil : Qt);
1812 ASET (v, 6, AREF (font, FONT_NAME_INDEX)); 1815 ASET (v, 6, Ffont_xlfd_name (font, Qnil));
1813 ASET (v, 7, AREF (font, FONT_REGISTRY_INDEX)); 1816 ASET (v, 7, AREF (font, FONT_REGISTRY_INDEX));
1814 1817
1815 result = Fcons (v, result); 1818 result = Fcons (v, result);