emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/font.c,v


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/src/font.c,v
Date: Mon, 16 Jun 2008 14:35:25 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      08/06/16 14:35:25

Index: font.c
===================================================================
RCS file: /sources/emacs/emacs/src/font.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -b -r1.61 -r1.62
--- font.c      16 Jun 2008 13:44:18 -0000      1.61
+++ font.c      16 Jun 2008 14:35:24 -0000      1.62
@@ -1407,9 +1407,9 @@
          /* Now parse ":KEY=VAL" patterns.  Store known keys and values in
             extra, copy unknown ones to COPY.  It is stored in extra slot by
             the key QCfc_unknown_spec.  */
-         char *copy;
+         char *copy_start, *copy;
 
-         name = copy = alloca (name + len - props_beg);
+         copy_start = copy = alloca (name + len - props_beg);
          if (! copy)
            return -1;
 
@@ -1467,10 +1467,11 @@
                      key = font_intern_prop (p, q - p, 1);
                      prop = get_font_prop_index (key);
                    }
+
                  p = q + 1;
                  for (q = p; *q && *q != ':'; q++);
-
                  val = font_intern_prop (p, q - p, 0);
+
                  if (! NILP (val))
                    {
                      if (prop >= FONT_FOUNDRY_INDEX
@@ -1480,15 +1481,19 @@
                      else if (prop >= 0)
                        Ffont_put (font, key, val);
                      else
+                       {
+                         if (copy_start != copy)
+                           *copy++ = ':';
                        bcopy (keyhead, copy, q - keyhead);
                      copy += q - keyhead;
                    }
                }
+               }
              p = *q ? q + 1 : q;
            }
-         if (name != copy)
+         if (copy_start != copy)
            font_put_extra (font, QCfc_unknown_spec,
-                           make_unibyte_string (name, copy - name));
+                           make_unibyte_string (copy_start, copy - 
copy_start));
        }
     }
   else




reply via email to

[Prev in Thread] Current Thread [Next in Thread]