* font.c (font_list_entities): Redo for clarity,
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 4 Apr 2011 06:29:11 +0000 (23:29 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 4 Apr 2011 06:29:11 +0000 (23:29 -0700)
so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.

src/ChangeLog
src/font.c

index 49ba5ef..ebe2e08 100644 (file)
@@ -1,3 +1,8 @@
+2011-04-04  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * font.c (font_list_entities): Redo for clarity,
+       so that reader need not know FONT_DPI_INDEX + 1 == FONT_SPACING_INDEX.
+
 2011-04-03  Paul Eggert  <eggert@cs.ucla.edu>
 
        * font.c (font_find_for_lface, Ffont_get_glyphs): Remove unused vars.
index 5d67c00..e01f67a 100644 (file)
@@ -2697,14 +2697,12 @@ font_list_entities (Lisp_Object frame, Lisp_Object spec)
   for (i = FONT_FOUNDRY_INDEX; i <= FONT_REGISTRY_INDEX; i++)
     ASET (scratch_font_spec, i, AREF (spec, i));
   for (i = FONT_WEIGHT_INDEX; i < FONT_EXTRA_INDEX; i++)
-    {
-      ASET (scratch_font_spec, i, Qnil);
-      if (! NILP (AREF (spec, i)))
-       need_filtering = 1;
-      if (i == FONT_DPI_INDEX)
-       /* Skip FONT_SPACING_INDEX  */
-       i++;
-    }
+    if (i != FONT_SPACING_INDEX)
+      {
+       ASET (scratch_font_spec, i, Qnil);
+       if (! NILP (AREF (spec, i)))
+         need_filtering = 1;
+      }
   ASET (scratch_font_spec, FONT_SPACING_INDEX, AREF (spec, FONT_SPACING_INDEX));
   ASET (scratch_font_spec, FONT_EXTRA_INDEX, AREF (spec, FONT_EXTRA_INDEX));