emacs-diffs
[Top][All Lists]
Advanced

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

master d2ac7447db 3/3: Merge branch 'master' of git.savannah.gnu.org:/sr


From: Eli Zaretskii
Subject: master d2ac7447db 3/3: Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Date: Sat, 19 Mar 2022 16:21:02 -0400 (EDT)

branch: master
commit d2ac7447db52f492f9cbb52566de2e452c8bc65d
Merge: 6887bf555f ccf4a4fa48
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
---
 src/alloc.c      |  25 +++--------
 src/bytecode.c   |   2 +-
 src/comp.c       |  48 ++++++++++-----------
 src/comp.h       |   4 ++
 src/decompress.c |  10 +++--
 src/dynlib.c     |   4 ++
 src/emacs.c      |   4 ++
 src/eval.c       |  84 -------------------------------------
 src/fileio.c     |   4 ++
 src/fns.c        |  38 +++--------------
 src/frame.c      |   2 +-
 src/frame.h      |   2 -
 src/gnutls.c     |   2 +-
 src/gnutls.h     |   1 -
 src/lisp.h       |   6 ---
 src/minibuf.c    |   2 +-
 src/syntax.c     |   2 +-
 src/syntax.h     |   4 --
 src/systime.h    |   1 -
 src/thread.h     |   6 +++
 src/timefns.c    |   2 +-
 src/window.c     |   9 ----
 src/window.h     |   1 -
 src/xterm.c      | 124 ++++++++++++++++++++++++++++---------------------------
 src/xterm.h      |   4 --
 25 files changed, 129 insertions(+), 262 deletions(-)

diff --git a/src/alloc.c b/src/alloc.c
index b0fbc91fe5..b06dd943ba 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -445,26 +445,11 @@ static void compact_small_strings (void);
 static void free_large_strings (void);
 extern Lisp_Object which_symbols (Lisp_Object, EMACS_INT) EXTERNALLY_VISIBLE;
 
-/* Forward declare mark accessor functions: they're used all over the
-   place.  */
-
-inline static bool vector_marked_p (const struct Lisp_Vector *v);
-inline static void set_vector_marked (struct Lisp_Vector *v);
-
-inline static bool vectorlike_marked_p (const union vectorlike_header *v);
-inline static void set_vectorlike_marked (union vectorlike_header *v);
-
-inline static bool cons_marked_p (const struct Lisp_Cons *c);
-inline static void set_cons_marked (struct Lisp_Cons *c);
-
-inline static bool string_marked_p (const struct Lisp_String *s);
-inline static void set_string_marked (struct Lisp_String *s);
-
-inline static bool symbol_marked_p (const struct Lisp_Symbol *s);
-inline static void set_symbol_marked (struct Lisp_Symbol *s);
-
-inline static bool interval_marked_p (INTERVAL i);
-inline static void set_interval_marked (INTERVAL i);
+static bool vector_marked_p (struct Lisp_Vector const *);
+static bool vectorlike_marked_p (union vectorlike_header const *);
+static void set_vectorlike_marked (union vectorlike_header *);
+static bool interval_marked_p (INTERVAL);
+static void set_interval_marked (INTERVAL);
 
 /* When scanning the C stack for live Lisp objects, Emacs keeps track of
    what memory allocated via lisp_malloc and lisp_align_malloc is intended
diff --git a/src/bytecode.c b/src/bytecode.c
index ed1f6ca4a8..6246498616 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -452,7 +452,7 @@ DEFUN ("internal-stack-stats", Finternal_stack_stats, 
Sinternal_stack_stats,
 }
 
 /* Whether a stack pointer is valid in the current frame.  */
-INLINE bool
+static bool
 valid_sp (struct bc_thread_state *bc, Lisp_Object *sp)
 {
   struct bc_frame *fp = bc->fp;
diff --git a/src/comp.c b/src/comp.c
index 499eee7e70..50f92fe2cf 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -516,8 +516,6 @@ typedef struct {
   ptrdiff_t size;
 } f_reloc_t;
 
-sigset_t saved_sigset;
-
 static f_reloc_t freloc;
 
 #define NUM_CAST_TYPES 15
@@ -648,7 +646,7 @@ typedef struct {
 
 static comp_t comp;
 
-FILE *logfile = NULL;
+static FILE *logfile;
 
 /* This is used for serialized objects by the reload mechanism.  */
 typedef struct {
@@ -666,16 +664,16 @@ typedef struct {
    Helper functions called by the run-time.
 */
 
-void helper_unwind_protect (Lisp_Object handler);
-Lisp_Object helper_temp_output_buffer_setup (Lisp_Object x);
-Lisp_Object helper_unbind_n (Lisp_Object n);
-void helper_save_restriction (void);
-bool helper_PSEUDOVECTOR_TYPEP_XUNTAG (Lisp_Object a, enum pvec_type code);
-struct Lisp_Symbol_With_Pos *helper_GET_SYMBOL_WITH_POSITION (Lisp_Object a);
+static void helper_unwind_protect (Lisp_Object);
+static Lisp_Object helper_unbind_n (Lisp_Object);
+static void helper_save_restriction (void);
+static bool helper_PSEUDOVECTOR_TYPEP_XUNTAG (Lisp_Object, enum pvec_type);
+static struct Lisp_Symbol_With_Pos *
+helper_GET_SYMBOL_WITH_POSITION (Lisp_Object);
 
 /* Note: helper_link_table must match the list created by
    `declare_runtime_imported_funcs'.  */
-void *helper_link_table[] =
+static void *helper_link_table[] =
   { wrong_type_argument,
     helper_PSEUDOVECTOR_TYPEP_XUNTAG,
     pure_write_error,
@@ -4976,7 +4974,7 @@ unknown (before GCC version 10).  */)
 /* for laziness. Change this if a performance impact is measured.             
*/
 
/******************************************************************************/
 
-void
+static void
 helper_unwind_protect (Lisp_Object handler)
 {
   /* Support for a function here is new in 24.4.  */
@@ -4984,28 +4982,20 @@ helper_unwind_protect (Lisp_Object handler)
                         handler);
 }
 
-Lisp_Object
-helper_temp_output_buffer_setup (Lisp_Object x)
-{
-  CHECK_STRING (x);
-  temp_output_buffer_setup (SSDATA (x));
-  return Vstandard_output;
-}
-
-Lisp_Object
+static Lisp_Object
 helper_unbind_n (Lisp_Object n)
 {
   return unbind_to (specpdl_ref_add (SPECPDL_INDEX (), -XFIXNUM (n)), Qnil);
 }
 
-void
+static void
 helper_save_restriction (void)
 {
   record_unwind_protect (save_restriction_restore,
                         save_restriction_save ());
 }
 
-bool
+static bool
 helper_PSEUDOVECTOR_TYPEP_XUNTAG (Lisp_Object a, enum pvec_type code)
 {
   return PSEUDOVECTOR_TYPEP (XUNTAG (a, Lisp_Vectorlike,
@@ -5013,7 +5003,7 @@ helper_PSEUDOVECTOR_TYPEP_XUNTAG (Lisp_Object a, enum 
pvec_type code)
                             code);
 }
 
-struct Lisp_Symbol_With_Pos *
+static struct Lisp_Symbol_With_Pos *
 helper_GET_SYMBOL_WITH_POSITION (Lisp_Object a)
 {
   if (!SYMBOL_WITH_POS_P (a))
@@ -5032,6 +5022,12 @@ return_nil (Lisp_Object arg)
 {
   return Qnil;
 }
+
+static Lisp_Object
+directory_files_matching (Lisp_Object name, Lisp_Object match)
+{
+  return Fdirectory_files (name, Qt, match, Qnil, Qnil);
+}
 #endif
 
 /* Windows does not let us delete a .eln file that is currently loaded
@@ -5049,11 +5045,11 @@ eln_load_path_final_clean_up (void)
   FOR_EACH_TAIL (dir_tail)
     {
       Lisp_Object files_in_dir =
-       internal_condition_case_5 (Fdirectory_files,
+       internal_condition_case_2 (directory_files_matching,
                                   Fexpand_file_name (Vcomp_native_version_dir,
                                                      XCAR (dir_tail)),
-                                  Qt, build_string ("\\.eln\\.old\\'"), Qnil,
-                                  Qnil, Qt, return_nil);
+                                  build_string ("\\.eln\\.old\\'"),
+                                  Qt, return_nil);
       FOR_EACH_TAIL (files_in_dir)
        internal_delete_file (XCAR (files_in_dir));
     }
diff --git a/src/comp.h b/src/comp.h
index 40f1e9b979..da53f32971 100644
--- a/src/comp.h
+++ b/src/comp.h
@@ -53,6 +53,8 @@ struct Lisp_Native_Comp_Unit
 
 #ifdef HAVE_NATIVE_COMP
 
+INLINE_HEADER_BEGIN
+
 INLINE bool
 NATIVE_COMP_UNITP (Lisp_Object a)
 {
@@ -99,6 +101,8 @@ void unload_comp_unit (struct Lisp_Native_Comp_Unit *cu)
 
 extern void syms_of_comp (void);
 
+INLINE_HEADER_END
+
 #endif /* #ifdef HAVE_NATIVE_COMP */
 
 #endif /* #ifndef COMP_H */
diff --git a/src/decompress.c b/src/decompress.c
index ddd8abbf27..dbdc9104a3 100644
--- a/src/decompress.c
+++ b/src/decompress.c
@@ -67,8 +67,9 @@ init_zlib_functions (void)
 #endif /* WINDOWSNT */
 
 
+#ifdef HAVE_NATIVE_COMP
 
-#define MD5_BLOCKSIZE 32768 /* From md5.c  */
+# define MD5_BLOCKSIZE 32768 /* From md5.c  */
 
 static char acc_buff[2 * MD5_BLOCKSIZE];
 static size_t acc_size;
@@ -106,7 +107,7 @@ md5_gz_stream (FILE *source, void *resblock)
   unsigned char in[MD5_BLOCKSIZE];
   unsigned char out[MD5_BLOCKSIZE];
 
-#ifdef WINDOWSNT
+# ifdef WINDOWSNT
   if (!zlib_initialized)
     zlib_initialized = init_zlib_functions ();
   if (!zlib_initialized)
@@ -114,7 +115,7 @@ md5_gz_stream (FILE *source, void *resblock)
       message1 ("zlib library not found");
       return -1;
     }
-#endif
+# endif
 
   eassert (!acc_size);
 
@@ -164,7 +165,8 @@ md5_gz_stream (FILE *source, void *resblock)
 
   return 0;
 }
-#undef MD5_BLOCKSIZE
+# undef MD5_BLOCKSIZE
+#endif
 
 
 
diff --git a/src/dynlib.c b/src/dynlib.c
index 8cb9a23374..e2c71f1448 100644
--- a/src/dynlib.c
+++ b/src/dynlib.c
@@ -279,11 +279,13 @@ dynlib_open (const char *path)
   return dlopen (path, RTLD_LAZY | RTLD_GLOBAL);
 }
 
+# ifdef HAVE_NATIVE_COMP
 dynlib_handle_ptr
 dynlib_open_for_eln (const char *path)
 {
   return dlopen (path, RTLD_LAZY);
 }
+# endif
 
 void *
 dynlib_sym (dynlib_handle_ptr h, const char *sym)
@@ -313,11 +315,13 @@ dynlib_error (void)
   return dlerror ();
 }
 
+# ifdef HAVE_NATIVE_COMP
 int
 dynlib_close (dynlib_handle_ptr h)
 {
   return dlclose (h) == 0;
 }
+# endif
 
 #else
 
diff --git a/src/emacs.c b/src/emacs.c
index d1060bca0b..0ff916b18b 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -140,6 +140,10 @@ extern char etext;
 #include "fingerprint.h"
 #include "epaths.h"
 
+/* Include these only because of INLINE.  */
+#include "comp.h"
+#include "thread.h"
+
 static const char emacs_version[] = PACKAGE_VERSION;
 static const char emacs_copyright[] = COPYRIGHT;
 static const char emacs_bugreport[] = PACKAGE_BUGREPORT;
diff --git a/src/eval.c b/src/eval.c
index c46b74ac40..39c328ea1f 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1501,90 +1501,6 @@ internal_condition_case_2 (Lisp_Object (*bfun) 
(Lisp_Object, Lisp_Object),
     }
 }
 
-/* Like internal_condition_case_1 but call BFUN with ARG1, ARG2, ARG3 as
-   its arguments.  */
-
-Lisp_Object
-internal_condition_case_3 (Lisp_Object (*bfun) (Lisp_Object, Lisp_Object,
-                                                Lisp_Object),
-                           Lisp_Object arg1, Lisp_Object arg2, Lisp_Object 
arg3,
-                           Lisp_Object handlers,
-                           Lisp_Object (*hfun) (Lisp_Object))
-{
-  struct handler *c = push_handler (handlers, CONDITION_CASE);
-  if (sys_setjmp (c->jmp))
-    {
-      Lisp_Object val = handlerlist->val;
-      clobbered_eassert (handlerlist == c);
-      handlerlist = handlerlist->next;
-      return hfun (val);
-    }
-  else
-    {
-      Lisp_Object val = bfun (arg1, arg2, arg3);
-      eassert (handlerlist == c);
-      handlerlist = c->next;
-      return val;
-    }
-}
-
-/* Like internal_condition_case_1 but call BFUN with ARG1, ARG2, ARG3, ARG4 as
-   its arguments.  */
-
-Lisp_Object
-internal_condition_case_4 (Lisp_Object (*bfun) (Lisp_Object, Lisp_Object,
-                                                Lisp_Object, Lisp_Object),
-                           Lisp_Object arg1, Lisp_Object arg2,
-                           Lisp_Object arg3, Lisp_Object arg4,
-                           Lisp_Object handlers,
-                           Lisp_Object (*hfun) (Lisp_Object))
-{
-  struct handler *c = push_handler (handlers, CONDITION_CASE);
-  if (sys_setjmp (c->jmp))
-    {
-      Lisp_Object val = handlerlist->val;
-      clobbered_eassert (handlerlist == c);
-      handlerlist = handlerlist->next;
-      return hfun (val);
-    }
-  else
-    {
-      Lisp_Object val = bfun (arg1, arg2, arg3, arg4);
-      eassert (handlerlist == c);
-      handlerlist = c->next;
-      return val;
-    }
-}
-
-/* Like internal_condition_case_1 but call BFUN with ARG1, ARG2, ARG3,
-   ARG4, ARG5 as its arguments.  */
-
-Lisp_Object
-internal_condition_case_5 (Lisp_Object (*bfun) (Lisp_Object, Lisp_Object,
-                                                Lisp_Object, Lisp_Object,
-                                               Lisp_Object),
-                           Lisp_Object arg1, Lisp_Object arg2,
-                           Lisp_Object arg3, Lisp_Object arg4,
-                          Lisp_Object arg5, Lisp_Object handlers,
-                           Lisp_Object (*hfun) (Lisp_Object))
-{
-  struct handler *c = push_handler (handlers, CONDITION_CASE);
-  if (sys_setjmp (c->jmp))
-    {
-      Lisp_Object val = handlerlist->val;
-      clobbered_eassert (handlerlist == c);
-      handlerlist = handlerlist->next;
-      return hfun (val);
-    }
-  else
-    {
-      Lisp_Object val = bfun (arg1, arg2, arg3, arg4, arg5);
-      eassert (handlerlist == c);
-      handlerlist = c->next;
-      return val;
-    }
-}
-
 /* Like internal_condition_case but call BFUN with NARGS as first,
    and ARGS as second argument.  */
 
diff --git a/src/fileio.c b/src/fileio.c
index a0282204de..5d66a93ac6 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2505,6 +2505,8 @@ With a prefix argument, TRASH is nil.  */)
   return Qnil;
 }
 
+#if defined HAVE_NATIVE_COMP && defined WINDOWSNT
+
 static Lisp_Object
 internal_delete_file_1 (Lisp_Object ignore)
 {
@@ -2523,6 +2525,8 @@ internal_delete_file (Lisp_Object filename)
                                   Qt, internal_delete_file_1);
   return NILP (tem);
 }
+
+#endif
 
 /* Return -1 if FILE is a case-insensitive file name, 0 if not,
    and a positive errno value if the result cannot be determined.  */
diff --git a/src/fns.c b/src/fns.c
index 6e89fe3ca5..0cc0c0a53d 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -485,37 +485,9 @@ Symbols are also allowed; their print names are used 
instead.  */)
     string2 = SYMBOL_NAME (string2);
   CHECK_STRING (string1);
   CHECK_STRING (string2);
-  return string_version_cmp (string1, string2) < 0 ? Qt : Qnil;
-}
-
-/* Return negative, 0, positive if STRING1 is <, =, > STRING2 as per
-   string-version-lessp.  */
-int
-string_version_cmp (Lisp_Object string1, Lisp_Object string2)
-{
-  char *p1 = SSDATA (string1);
-  char *p2 = SSDATA (string2);
-  char *lim1 = p1 + SBYTES (string1);
-  char *lim2 = p2 + SBYTES (string2);
-  int cmp;
-
-  while ((cmp = filevercmp (p1, p2)) == 0)
-    {
-      /* If the strings are identical through their first null bytes,
-        skip past identical prefixes and try again.  */
-      ptrdiff_t size = strlen (p1) + 1;
-      eassert (size == strlen (p2) + 1);
-      p1 += size;
-      p2 += size;
-      bool more1 = p1 <= lim1;
-      bool more2 = p2 <= lim2;
-      if (!more1)
-       return more2;
-      if (!more2)
-       return -1;
-    }
-
-  return cmp;
+  int cmp = filenvercmp (SSDATA (string1), SBYTES (string1),
+                        SSDATA (string2), SBYTES (string2));
+  return cmp < 0 ? Qt : Qnil;
 }
 
 DEFUN ("string-collate-lessp", Fstring_collate_lessp, Sstring_collate_lessp, 
2, 4, 0,
@@ -4242,7 +4214,7 @@ hashfn_eq (Lisp_Object key, struct Lisp_Hash_Table *h)
 /* Ignore HT and return a hash code for KEY which uses 'equal' to compare keys.
    The hash code is at most INTMASK.  */
 
-Lisp_Object
+static Lisp_Object
 hashfn_equal (Lisp_Object key, struct Lisp_Hash_Table *h)
 {
   return make_ufixnum (sxhash (key));
@@ -4251,7 +4223,7 @@ hashfn_equal (Lisp_Object key, struct Lisp_Hash_Table *h)
 /* Ignore HT and return a hash code for KEY which uses 'eql' to compare keys.
    The hash code is at most INTMASK.  */
 
-Lisp_Object
+static Lisp_Object
 hashfn_eql (Lisp_Object key, struct Lisp_Hash_Table *h)
 {
   return (FLOATP (key) || BIGNUMP (key) ? hashfn_equal : hashfn_eq) (key, h);
diff --git a/src/frame.c b/src/frame.c
index 0ec7057db2..8f8df8f8e0 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -335,7 +335,7 @@ DEFUN ("frame-windows-min-size", Fframe_windows_min_size,
  * additionally limit the minimum frame height to a value large enough
  * to support menu bar, tab bar, mode line and echo area.
  */
-int
+static int
 frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal,
                        Lisp_Object ignore, Lisp_Object pixelwise)
 {
diff --git a/src/frame.h b/src/frame.h
index 5d5f2122fb..61df57e966 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -1338,8 +1338,6 @@ extern bool frame_inhibit_resize (struct frame *, bool, 
Lisp_Object);
 extern void adjust_frame_size (struct frame *, int, int, int, bool,
                               Lisp_Object);
 extern Lisp_Object mouse_position (bool);
-extern int frame_windows_min_size (Lisp_Object, Lisp_Object, Lisp_Object,
-                                  Lisp_Object);
 extern void frame_size_history_plain (struct frame *, Lisp_Object);
 extern void frame_size_history_extra (struct frame *, Lisp_Object,
                                      int, int, int, int, int, int);
diff --git a/src/gnutls.c b/src/gnutls.c
index 09590ca005..0e1e63e157 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -1521,7 +1521,7 @@ returned as the :certificate entry.  */)
 /* Initialize global GnuTLS state to defaults.
    Call 'gnutls-global-deinit' when GnuTLS usage is no longer needed.
    Return zero on success.  */
-Lisp_Object
+static Lisp_Object
 emacs_gnutls_global_init (void)
 {
   int ret = GNUTLS_E_SUCCESS;
diff --git a/src/gnutls.h b/src/gnutls.h
index 791e5340c2..19d3d3f5bc 100644
--- a/src/gnutls.h
+++ b/src/gnutls.h
@@ -90,7 +90,6 @@ extern void emacs_gnutls_transport_set_errno 
(gnutls_session_t state, int err);
 extern int w32_gnutls_rnd (gnutls_rnd_level_t, void *, size_t);
 #endif
 extern Lisp_Object emacs_gnutls_deinit (Lisp_Object);
-extern Lisp_Object emacs_gnutls_global_init (void);
 extern int gnutls_try_handshake (struct Lisp_Process *p);
 extern Lisp_Object gnutls_verify_boot (Lisp_Object proc, Lisp_Object proplist);
 
diff --git a/src/lisp.h b/src/lisp.h
index b558d311a8..9599934c1f 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -3910,8 +3910,6 @@ extern void hexbuf_digest (char *, void const *, int);
 extern char *extract_data_from_object (Lisp_Object, ptrdiff_t *, ptrdiff_t *);
 EMACS_UINT hash_string (char const *, ptrdiff_t);
 EMACS_UINT sxhash (Lisp_Object);
-Lisp_Object hashfn_eql (Lisp_Object, struct Lisp_Hash_Table *);
-Lisp_Object hashfn_equal (Lisp_Object, struct Lisp_Hash_Table *);
 Lisp_Object hashfn_user_defined (Lisp_Object, struct Lisp_Hash_Table *);
 Lisp_Object make_hash_table (struct hash_table_test, EMACS_INT, float, float,
                              Lisp_Object, bool);
@@ -3927,7 +3925,6 @@ extern Lisp_Object substring_both (Lisp_Object, 
ptrdiff_t, ptrdiff_t,
 extern Lisp_Object merge (Lisp_Object, Lisp_Object, Lisp_Object);
 extern Lisp_Object merge_c (Lisp_Object, Lisp_Object, bool (*) (Lisp_Object, 
Lisp_Object));
 extern Lisp_Object do_yes_or_no_p (Lisp_Object);
-extern int string_version_cmp (Lisp_Object, Lisp_Object);
 extern Lisp_Object concat2 (Lisp_Object, Lisp_Object);
 extern Lisp_Object concat3 (Lisp_Object, Lisp_Object, Lisp_Object);
 extern bool equal_no_quit (Lisp_Object, Lisp_Object);
@@ -4466,9 +4463,6 @@ extern Lisp_Object internal_lisp_condition_case 
(Lisp_Object, Lisp_Object, Lisp_
 extern Lisp_Object internal_condition_case (Lisp_Object (*) (void), 
Lisp_Object, Lisp_Object (*) (Lisp_Object));
 extern Lisp_Object internal_condition_case_1 (Lisp_Object (*) (Lisp_Object), 
Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object));
 extern Lisp_Object internal_condition_case_2 (Lisp_Object (*) (Lisp_Object, 
Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object (*) 
(Lisp_Object));
-extern Lisp_Object internal_condition_case_3 (Lisp_Object (*) (Lisp_Object, 
Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, 
Lisp_Object (*) (Lisp_Object));
-extern Lisp_Object internal_condition_case_4 (Lisp_Object (*) (Lisp_Object, 
Lisp_Object, Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, Lisp_Object, 
Lisp_Object, Lisp_Object, Lisp_Object (*) (Lisp_Object));
-extern Lisp_Object internal_condition_case_5 (Lisp_Object (*) (Lisp_Object, 
Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object), Lisp_Object, Lisp_Object, 
Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object (*) 
(Lisp_Object));
 extern Lisp_Object internal_condition_case_n
     (Lisp_Object (*) (ptrdiff_t, Lisp_Object *), ptrdiff_t, Lisp_Object *,
      Lisp_Object, Lisp_Object (*) (Lisp_Object, ptrdiff_t, Lisp_Object *));
diff --git a/src/minibuf.c b/src/minibuf.c
index 49a474dd49..97a6ec6901 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -41,7 +41,7 @@ along with GNU Emacs.  If not, see 
<https://www.gnu.org/licenses/>.  */
    minibuffer recursions are encountered.  */
 
 Lisp_Object Vminibuffer_list;
-Lisp_Object Vcommand_loop_level_list;
+static Lisp_Object Vcommand_loop_level_list;
 
 /* Data to remember during recursive minibuffer invocations.  */
 
diff --git a/src/syntax.c b/src/syntax.c
index 13c36fdf3c..f9022d18d2 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -1074,7 +1074,7 @@ unsigned char const syntax_spec_code[0400] =
 
 /* Indexed by syntax code, give the letter that describes it.  */
 
-char const syntax_code_spec[16] =
+static char const syntax_code_spec[16] =
   {
     ' ', '.', 'w', '_', '(', ')', '\'', '\"', '$', '\\', '/', '<', '>', '@',
     '!', '|'
diff --git a/src/syntax.h b/src/syntax.h
index c1bb9274d0..5949a95a73 100644
--- a/src/syntax.h
+++ b/src/syntax.h
@@ -147,10 +147,6 @@ extern bool syntax_prefix_flag_p (int c);
 
 extern unsigned char const syntax_spec_code[0400];
 
-/* Indexed by syntax code, give the letter that describes it.  */
-
-extern char const syntax_code_spec[16];
-
 /* Convert the byte offset BYTEPOS into a character position,
    for the object recorded in gl_state with SETUP_SYNTAX_TABLE_FOR_OBJECT.
 
diff --git a/src/systime.h b/src/systime.h
index 41d728f1c2..75088bd4a6 100644
--- a/src/systime.h
+++ b/src/systime.h
@@ -91,7 +91,6 @@ extern Lisp_Object timespec_to_lisp (struct timespec);
 extern bool list4_to_timespec (Lisp_Object, Lisp_Object, Lisp_Object,
                               Lisp_Object, struct timespec *);
 extern struct timespec lisp_time_argument (Lisp_Object);
-extern AVOID time_overflow (void);
 extern double float_time (Lisp_Object);
 extern void init_timefns (void);
 extern void syms_of_timefns (void);
diff --git a/src/thread.h b/src/thread.h
index ddba1a2d99..b34ca3d57c 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -33,6 +33,8 @@ along with GNU Emacs.  If not, see 
<https://www.gnu.org/licenses/>.  */
 #include "sysselect.h"         /* FIXME */
 #include "systhread.h"
 
+INLINE_HEADER_BEGIN
+
 /* Byte-code interpreter thread state.  */
 struct bc_thread_state {
   struct bc_frame *fp;   /* current frame pointer */
@@ -194,6 +196,8 @@ struct thread_state
   struct bc_thread_state bc;
 } GCALIGNED_STRUCT;
 
+INLINE_HEADER_BEGIN
+
 INLINE bool
 THREADP (Lisp_Object a)
 {
@@ -315,4 +319,6 @@ int thread_select  (select_func *func, int max_fds, fd_set 
*rfds,
 
 bool thread_check_current_buffer (struct buffer *);
 
+INLINE_HEADER_END
+
 #endif /* THREAD_H */
diff --git a/src/timefns.c b/src/timefns.c
index 9b5b090ba7..9e8592d35a 100644
--- a/src/timefns.c
+++ b/src/timefns.c
@@ -342,7 +342,7 @@ init_timefns (void)
 }
 
 /* Report that a time value is out of range for Emacs.  */
-void
+static AVOID
 time_overflow (void)
 {
   error ("Specified time is not representable");
diff --git a/src/window.c b/src/window.c
index 59e21f11cb..8f92b46afd 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3181,14 +3181,6 @@ resize_root_window (Lisp_Object window, Lisp_Object 
delta,
                horizontal, ignore, pixelwise);
 }
 
-void
-sanitize_window_sizes (Lisp_Object horizontal)
-{
-  /* Don't burp in temacs -nw before window.el is loaded.  */
-  if (!NILP (Fsymbol_function (Qwindow__sanitize_window_sizes)))
-    call1 (Qwindow__sanitize_window_sizes, horizontal);
-}
-
 
 static Lisp_Object
 window_pixel_to_total (Lisp_Object frame, Lisp_Object horizontal)
@@ -8232,7 +8224,6 @@ syms_of_window (void)
   DEFSYM (Qwindow__resize_root_window_vertically,
          "window--resize-root-window-vertically");
   DEFSYM (Qwindow__resize_mini_frame, "window--resize-mini-frame");
-  DEFSYM (Qwindow__sanitize_window_sizes, "window--sanitize-window-sizes");
   DEFSYM (Qwindow__pixel_to_total, "window--pixel-to-total");
   DEFSYM (Qsafe, "safe");
   DEFSYM (Qdisplay_buffer, "display-buffer");
diff --git a/src/window.h b/src/window.h
index 141c29e810..94c9b7124f 100644
--- a/src/window.h
+++ b/src/window.h
@@ -1188,7 +1188,6 @@ extern int window_scroll_margin (struct window *, enum 
margin_unit);
 extern void temp_output_buffer_show (Lisp_Object);
 extern void replace_buffer_in_windows (Lisp_Object);
 extern void replace_buffer_in_windows_safely (Lisp_Object);
-extern void sanitize_window_sizes (Lisp_Object horizontal);
 /* This looks like a setter, but it is a bit special.  */
 extern void wset_buffer (struct window *, Lisp_Object);
 extern bool window_outdated (struct window *);
diff --git a/src/xterm.c b/src/xterm.c
index fb0fc66ae5..4f8accbda3 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -2339,6 +2339,68 @@ x_reset_clip_rectangles (struct frame *f, GC gc)
 #endif
 }
 
+#ifdef HAVE_XRENDER
+# if !defined USE_CAIRO && (RENDER_MAJOR > 0 || RENDER_MINOR >= 2)
+static void
+x_xrender_color_from_gc_foreground (struct frame *f, GC gc, XRenderColor 
*color,
+                                   bool apply_alpha_background)
+{
+  XGCValues xgcv;
+  XColor xc;
+
+  XGetGCValues (FRAME_X_DISPLAY (f), gc, GCForeground, &xgcv);
+  xc.pixel = xgcv.foreground;
+  x_query_colors (f, &xc, 1);
+
+  color->alpha = (apply_alpha_background
+                 ? 65535 * f->alpha_background
+                 : 65535);
+
+  if (color->alpha == 65535)
+    {
+      color->red = xc.red;
+      color->blue = xc.blue;
+      color->green = xc.green;
+    }
+  else
+    {
+      color->red = (xc.red * color->alpha) / 65535;
+      color->blue = (xc.blue * color->alpha) / 65535;
+      color->green = (xc.green * color->alpha) / 65535;
+    }
+}
+# endif
+
+void
+x_xrender_color_from_gc_background (struct frame *f, GC gc, XRenderColor 
*color,
+                                   bool apply_alpha_background)
+{
+  XGCValues xgcv;
+  XColor xc;
+
+  XGetGCValues (FRAME_X_DISPLAY (f), gc, GCBackground, &xgcv);
+  xc.pixel = xgcv.background;
+  x_query_colors (f, &xc, 1);
+
+  color->alpha = (apply_alpha_background
+                 ? 65535 * f->alpha_background
+                 : 65535);
+
+  if (color->alpha == 65535)
+    {
+      color->red = xc.red;
+      color->blue = xc.blue;
+      color->green = xc.green;
+    }
+  else
+    {
+      color->red = (xc.red * color->alpha) / 65535;
+      color->blue = (xc.blue * color->alpha) / 65535;
+      color->green = (xc.green * color->alpha) / 65535;
+    }
+}
+#endif
+
 static void
 x_fill_rectangle (struct frame *f, GC gc, int x, int y, int width, int height,
                  bool respect_alpha_background)
@@ -3299,7 +3361,7 @@ static void x_scroll_bar_clear (struct frame *);
 static void x_check_font (struct frame *, struct font *);
 #endif
 
-void
+static void
 x_display_set_last_user_time (struct x_display_info *dpyinfo, Time time)
 {
 #ifndef USE_GTK
@@ -19311,66 +19373,6 @@ init_xterm (void)
 }
 #endif
 
-#ifdef HAVE_XRENDER
-void
-x_xrender_color_from_gc_foreground (struct frame *f, GC gc, XRenderColor 
*color,
-                                   bool apply_alpha_background)
-{
-  XGCValues xgcv;
-  XColor xc;
-
-  XGetGCValues (FRAME_X_DISPLAY (f), gc, GCForeground, &xgcv);
-  xc.pixel = xgcv.foreground;
-  x_query_colors (f, &xc, 1);
-
-  color->alpha = (apply_alpha_background
-                 ? 65535 * f->alpha_background
-                 : 65535);
-
-  if (color->alpha == 65535)
-    {
-      color->red = xc.red;
-      color->blue = xc.blue;
-      color->green = xc.green;
-    }
-  else
-    {
-      color->red = (xc.red * color->alpha) / 65535;
-      color->blue = (xc.blue * color->alpha) / 65535;
-      color->green = (xc.green * color->alpha) / 65535;
-    }
-}
-
-void
-x_xrender_color_from_gc_background (struct frame *f, GC gc, XRenderColor 
*color,
-                                   bool apply_alpha_background)
-{
-  XGCValues xgcv;
-  XColor xc;
-
-  XGetGCValues (FRAME_X_DISPLAY (f), gc, GCBackground, &xgcv);
-  xc.pixel = xgcv.background;
-  x_query_colors (f, &xc, 1);
-
-  color->alpha = (apply_alpha_background
-                 ? 65535 * f->alpha_background
-                 : 65535);
-
-  if (color->alpha == 65535)
-    {
-      color->red = xc.red;
-      color->blue = xc.blue;
-      color->green = xc.green;
-    }
-  else
-    {
-      color->red = (xc.red * color->alpha) / 65535;
-      color->blue = (xc.blue * color->alpha) / 65535;
-      color->green = (xc.green * color->alpha) / 65535;
-    }
-}
-#endif
-
 void
 syms_of_xterm (void)
 {
diff --git a/src/xterm.h b/src/xterm.h
index 05d5e08dc0..ed612c3c1e 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -1361,8 +1361,6 @@ extern Lisp_Object x_cr_export_frames (Lisp_Object, 
cairo_surface_type_t);
 #endif
 
 #ifdef HAVE_XRENDER
-extern void x_xrender_color_from_gc_foreground (struct frame *, GC,
-                                               XRenderColor *, bool);
 extern void x_xrender_color_from_gc_background (struct frame *, GC,
                                                XRenderColor *, bool);
 extern void x_xr_ensure_picture (struct frame *f);
@@ -1374,8 +1372,6 @@ extern void x_xr_reset_ext_clip (struct frame *f);
 extern void x_scroll_bar_configure (GdkEvent *);
 #endif
 
-extern void x_display_set_last_user_time (struct x_display_info *, Time);
-
 extern Lisp_Object x_dnd_begin_drag_and_drop (struct frame *, Time, Atom,
                                              bool);
 extern void x_set_dnd_targets (Atom *, int);



reply via email to

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