]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix the MS-Windows build broken by recent changes
authorEli Zaretskii <eliz@gnu.org>
Fri, 20 Dec 2024 07:38:50 +0000 (09:38 +0200)
committerEshel Yaron <me@eshelyaron.com>
Mon, 23 Dec 2024 15:17:37 +0000 (16:17 +0100)
* src/w32font.c (memq_no_quit):
* src/w32uniscribe.c (memq_no_quit): Remove; use the function from
fns.c instead.  All callers changed.

(cherry picked from commit 926a9c864adc29f056644f5e23cf59fb90e2613c)

src/w32font.c
src/w32uniscribe.c

index 2e6f8bed3e7ef6f00dcb99b3ef3bd96ed961dab4..d0e837520c991d5f761599f447734e2b89fafb26 100644 (file)
@@ -229,14 +229,6 @@ get_char_width_32_w (HDC hdc, UINT uFirstChar, UINT uLastChar, LPINT lpBuffer)
 
 #endif /* Cygwin */
 
-static int
-memq_no_quit (Lisp_Object elt, Lisp_Object list)
-{
-  while (CONSP (list) && ! EQ (XCAR (list), elt))
-    list = XCDR (list);
-  return (CONSP (list));
-}
-
 Lisp_Object
 intern_font_name (char * string)
 {
@@ -398,7 +390,7 @@ w32font_has_char (Lisp_Object entity, int c)
      certain until we open it.  Also if the font claims support for the script
      the character is from, it may only have partial coverage, so we still
      can't be certain until we open the font.  */
-  if (NILP (script) || memq_no_quit (script, supported_scripts))
+  if (NILP (script) || !NILP (memq_no_quit (script, supported_scripts)))
     return -1;
 
   /* Font reports what scripts it supports, and none of them are the script
@@ -1192,7 +1184,7 @@ add_font_name_to_list (ENUMLOGFONTEX *logical_font,
     return 1;
 
   family = intern_font_name (logical_font->elfLogFont.lfFaceName);
-  if (! memq_no_quit (family, *list))
+  if (NILP (memq_no_quit (family, *list)))
     *list = Fcons (family, *list);
 
   return 1;
@@ -1416,7 +1408,7 @@ font_matches_spec (DWORD type, NEWTEXTMETRICEX *font,
                 {
                   Lisp_Object support
                     = font_supported_scripts (&font->ntmFontSig);
-                  if (! memq_no_quit (val, support))
+                  if (NILP (memq_no_quit (val, support)))
                     return 0;
 
                  /* Avoid using non-Japanese fonts for Japanese, even
@@ -1681,9 +1673,9 @@ add_font_entity_to_list (ENUMLOGFONTEX *logical_font,
                              match_data->orig_font_spec, backend,
                              &logical_font->elfLogFont)
           || (!NILP (match_data->known_fonts)
-              && memq_no_quit
-                   (intern_font_name (logical_font->elfLogFont.lfFaceName),
-                    match_data->known_fonts)))
+              && !NILP (memq_no_quit
+                          (intern_font_name (logical_font->elfLogFont.lfFaceName),
+                           match_data->known_fonts))))
       || !w32font_coverage_ok (&physical_font->ntmFontSig,
                               match_data->pattern.lfCharSet))
     return 1;
index 66d27b81b9e034e6a1ac5d59f201fea847dd5082..d8feeef277e5ec354646161fc836e1eb3e12c3a6 100644 (file)
@@ -88,14 +88,6 @@ DEF_DLL_FN (void, hb_ot_font_set_funcs, (hb_font_t *));
 /* Used by uniscribe_otf_capability.  */
 static Lisp_Object otf_features (HDC context, const char *table);
 
-static int
-memq_no_quit (Lisp_Object elt, Lisp_Object list)
-{
-  while (CONSP (list) && ! EQ (XCAR (list), elt))
-    list = XCDR (list);
-  return (CONSP (list));
-}
-
 \f
 /* Uniscribe function pointers.  */
 static HRESULT (WINAPI * pfnScriptItemize) (const WCHAR *,
@@ -766,7 +758,7 @@ add_opentype_font_name_to_list (ENUMLOGFONTEX *logical_font,
     return 1;
 
   family = intern_font_name (logical_font->elfLogFont.lfFaceName);
-  if (! memq_no_quit (family, *list))
+  if (NILP (memq_no_quit (family, *list)))
     *list = Fcons (family, *list);
 
   return 1;