]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't publish debugger-only interfaces to other modules.
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 14 Apr 2011 06:48:41 +0000 (23:48 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 14 Apr 2011 06:48:41 +0000 (23:48 -0700)
* lisp.h (safe_debug_print, debug_output_compilation_hack):
(verify_bytepos, count_markers): Move decls to the only modules
that need them.
* region-cache.h (pp_cache): Likewise.
* window.h (check_all_windows): Likewise.
* marker.c, print.c, region-cache.c, window.c: Decls moved here.

src/ChangeLog
src/lisp.h
src/marker.c
src/print.c
src/region-cache.c
src/region-cache.h
src/window.c
src/window.h

index 70b976e2558d92d9fa01c419eae7763fdea35446..8b566b0d95e4728b36b7054a15c5ca545e3f0084 100644 (file)
@@ -1,5 +1,13 @@
 2011-04-14  Paul Eggert  <eggert@cs.ucla.edu>
 
+       Don't publish debugger-only interfaces to other modules.
+       * lisp.h (safe_debug_print, debug_output_compilation_hack):
+       (verify_bytepos, count_markers): Move decls to the only modules
+       that need them.
+       * region-cache.h (pp_cache): Likewise.
+       * window.h (check_all_windows): Likewise.
+       * marker.c, print.c, region-cache.c, window.c: Decls moved here.
+
        * sysdep.c (croak): Now static, if
        defined TIOCNOTTY || defined USG5 || defined CYGWIN.
        * syssignal.h (croak): Declare only if not static.
index 4c7c5b50c89fd302b267bbe918fade55ff10312b..d629c40198a1bbd3bf5ceb5616fa0116368febfa 100644 (file)
@@ -2743,7 +2743,6 @@ extern void syms_of_chartab (void);
 /* Defined in print.c */
 extern Lisp_Object Vprin1_to_string_buffer;
 extern void debug_print (Lisp_Object) EXTERNALLY_VISIBLE;
-extern void safe_debug_print (Lisp_Object) EXTERNALLY_VISIBLE;
 EXFUN (Fprin1, 2);
 EXFUN (Fprin1_to_string, 2);
 EXFUN (Fterpri, 1);
@@ -2751,7 +2750,6 @@ EXFUN (Fprint, 2);
 EXFUN (Ferror_message_string, 1);
 extern Lisp_Object Qstandard_output;
 extern Lisp_Object Qexternal_debugging_output;
-extern void debug_output_compilation_hack (int) EXTERNALLY_VISIBLE;
 extern void temp_output_buffer_setup (const char *);
 extern int print_level;
 extern Lisp_Object Qprint_escape_newlines;
@@ -2967,14 +2965,12 @@ extern EMACS_INT marker_byte_position (Lisp_Object);
 extern void clear_charpos_cache (struct buffer *);
 extern EMACS_INT charpos_to_bytepos (EMACS_INT);
 extern EMACS_INT buf_charpos_to_bytepos (struct buffer *, EMACS_INT);
-extern EMACS_INT verify_bytepos (EMACS_INT charpos) EXTERNALLY_VISIBLE;
 extern EMACS_INT buf_bytepos_to_charpos (struct buffer *, EMACS_INT);
 extern void unchain_marker (struct Lisp_Marker *marker);
 extern Lisp_Object set_marker_restricted (Lisp_Object, Lisp_Object, Lisp_Object);
 extern Lisp_Object set_marker_both (Lisp_Object, Lisp_Object, EMACS_INT, EMACS_INT);
 extern Lisp_Object set_marker_restricted_both (Lisp_Object, Lisp_Object,
                                                EMACS_INT, EMACS_INT);
-extern int count_markers (struct buffer *) EXTERNALLY_VISIBLE;
 extern void syms_of_marker (void);
 
 /* Defined in fileio.c */
index 7d46109914007acbe2e80b88851d499192a26d3f..675bbc5ad7364f577c585f9ec9c2770b5db9738f 100644 (file)
@@ -242,6 +242,7 @@ buf_charpos_to_bytepos (struct buffer *b, EMACS_INT charpos)
 /* Used for debugging: recompute the bytepos corresponding to CHARPOS
    in the simplest, most reliable way.  */
 
+extern EMACS_INT verify_bytepos (EMACS_INT charpos) EXTERNALLY_VISIBLE;
 EMACS_INT
 verify_bytepos (EMACS_INT charpos)
 {
@@ -864,6 +865,7 @@ DEFUN ("buffer-has-markers-at", Fbuffer_has_markers_at, Sbuffer_has_markers_at,
 
 /* For debugging -- count the markers in buffer BUF.  */
 
+extern int count_markers (struct buffer *) EXTERNALLY_VISIBLE;
 int
 count_markers (struct buffer *buf)
 {
index 42c5df86783831556546314fd9e95fb9dd4ff887..617ee662e798f8db15f42304bef8e7c59f3a39e8 100644 (file)
@@ -738,6 +738,7 @@ to make it write to the debugging output.  */)
 /* This function is never called.  Its purpose is to prevent
    print_output_debug_flag from being optimized away.  */
 
+exterr void debug_output_compilation_hack (int) EXTERNALLY_VISIBLE;
 void
 debug_output_compilation_hack (int x)
 {
@@ -798,6 +799,7 @@ debug_print (Lisp_Object arg)
   fprintf (stderr, "\r\n");
 }
 
+void safe_debug_print (Lisp_Object) EXTERNALLY_VISIBLE;
 void
 safe_debug_print (Lisp_Object arg)
 {
index 53ce0e9d80206ceeee8cb47d88cb3a9292c497b9..a0b85039e7467a9574278c8a13ee0b66cd9c4b39 100644 (file)
@@ -781,6 +781,7 @@ int region_cache_backward (struct buffer *buf, struct region_cache *c,
 \f
 /* Debugging: pretty-print a cache to the standard error output.  */
 
+void pp_cache (struct region_cache *) EXTERNALLY_VISIBLE;
 void
 pp_cache (struct region_cache *c)
 {
index 255b517f17aa74f1a3fde9487e61a76d43059d48..ea767ed0dc35ff48c1f93175753b370c3b900acb 100644 (file)
@@ -110,6 +110,3 @@ extern int region_cache_backward (struct buffer *BUF,
                                   struct region_cache *CACHE,
                                   EMACS_INT POS,
                                   EMACS_INT *NEXT);
-
-/* For debugging.  */
-void pp_cache (struct region_cache *) EXTERNALLY_VISIBLE;
index eef783268ee8edacd4330751a65b738e595b6ca3..9ee35025d323d2eab33a4fd03f613bd8571abbc2 100644 (file)
@@ -2338,6 +2338,7 @@ window_loop (enum window_loop type, Lisp_Object obj, int mini, Lisp_Object frame
 
 /* Used for debugging.  Abort if any window has a dead buffer.  */
 
+extern void check_all_windows (void) EXTERNALLY_VISIBLE;
 void
 check_all_windows (void)
 {
index 4b32edd2149ddcff48a52ff0d1b49c55d0103925..65d554a55014d485e0f552deb262da44cdbbed21 100644 (file)
@@ -776,7 +776,6 @@ extern void freeze_window_starts (struct frame *, int);
 extern void grow_mini_window (struct window *, int);
 extern void shrink_mini_window (struct window *);
 extern int window_relative_x_coord (struct window *, enum window_part, int);
-extern void check_all_windows (void) EXTERNALLY_VISIBLE;
 
 void run_window_configuration_change_hook (struct frame *f);