]> git.eshelyaron.com Git - emacs.git/commitdiff
Make faces work with keywords not having : in symbol names
authorGerd Möllmann <gerd@gnu.org>
Tue, 18 Oct 2022 13:09:26 +0000 (15:09 +0200)
committerGerd Möllmann <gerd@gnu.org>
Tue, 18 Oct 2022 13:09:26 +0000 (15:09 +0200)
* src/xfaces.c (set_lface_from_font): Use LISP_SYMBOL_NAME.
(merge_face_vectors): Use LISP_SYMBOL_NAME.
(merge_face_ref): Use SYMBOL_KEYWORD_P instead of checking ':'.
(gui_supports_face_attributes_p): Use LISP_SYMBOL_NAME.

src/xfaces.c

index 5e3a47d7f8bbf54ad3a26e24d5883d05699ee387..161dc3ea66964364186800033f86ceb14b9c285f 100644 (file)
@@ -2124,14 +2124,14 @@ set_lface_from_font (struct frame *f, Lisp_Object lface,
     {
       Lisp_Object family = AREF (font_object, FONT_FAMILY_INDEX);
 
-      ASET (lface, LFACE_FAMILY_INDEX, SYMBOL_NAME (family));
+      ASET (lface, LFACE_FAMILY_INDEX, LISP_SYMBOL_NAME (family));
     }
 
   if (force_p || UNSPECIFIEDP (LFACE_FOUNDRY (lface)))
     {
       Lisp_Object foundry = AREF (font_object, FONT_FOUNDRY_INDEX);
 
-      ASET (lface, LFACE_FOUNDRY_INDEX, SYMBOL_NAME (foundry));
+      ASET (lface, LFACE_FOUNDRY_INDEX, LISP_SYMBOL_NAME (foundry));
     }
 
   if (force_p || UNSPECIFIEDP (LFACE_HEIGHT (lface)))
@@ -2272,9 +2272,9 @@ merge_face_vectors (struct window *w,
   if (!NILP (font))
     {
       if (! NILP (AREF (font, FONT_FOUNDRY_INDEX)))
-       to[LFACE_FOUNDRY_INDEX] = SYMBOL_NAME (AREF (font, FONT_FOUNDRY_INDEX));
+       to[LFACE_FOUNDRY_INDEX] = LISP_SYMBOL_NAME (AREF (font, FONT_FOUNDRY_INDEX));
       if (! NILP (AREF (font, FONT_FAMILY_INDEX)))
-       to[LFACE_FAMILY_INDEX] = SYMBOL_NAME (AREF (font, FONT_FAMILY_INDEX));
+       to[LFACE_FAMILY_INDEX] = LISP_SYMBOL_NAME (AREF (font, FONT_FAMILY_INDEX));
       if (! NILP (AREF (font, FONT_WEIGHT_INDEX)))
        to[LFACE_WEIGHT_INDEX] = FONT_WEIGHT_FOR_FACE (font);
       if (! NILP (AREF (font, FONT_SLANT_INDEX)))
@@ -2589,8 +2589,7 @@ merge_face_ref (struct window *w,
              ok = false;
            }
        }
-      else if (SYMBOLP (first)
-              && *SDATA (SYMBOL_NAME (first)) == ':')
+      else if (SYMBOLP (first) && SYMBOL_KEYWORD_P (first))
        {
          /* Assume this is the property list form.  */
          if (attr_filter > 0)
@@ -5273,8 +5272,8 @@ gui_supports_face_attributes_p (struct frame *f,
            if (i < FONT_FOUNDRY_INDEX || i > FONT_REGISTRY_INDEX
                || face->font->driver->case_sensitive)
              return true;
-           s1 = SYMBOL_NAME (face->font->props[i]);
-           s2 = SYMBOL_NAME (def_face->font->props[i]);
+           s1 = LISP_SYMBOL_NAME (face->font->props[i]);
+           s2 = LISP_SYMBOL_NAME (def_face->font->props[i]);
            if (! BASE_EQ (Fcompare_strings (s1, make_fixnum (0), Qnil,
                                             s2, make_fixnum (0), Qnil, Qt),
                           Qt))