Commit cf4bb06d authored by Dmitry Antipov's avatar Dmitry Antipov
Browse files

* print.c (syms_of_print): Initialize debugging output not here...

(init_print_once): ...but in a new function here.
* lisp.h (init_print_once): Add prototype.
* emacs.c (main): Add call to init_print_once.  Adjust comments.
parent 0e6008c5
...@@ -4,6 +4,10 @@ ...@@ -4,6 +4,10 @@
Signal error if window is not internal. Adjust docstring. Signal error if window is not internal. Adjust docstring.
(delete_all_child_windows): Use combination_limit to save the buffer. (delete_all_child_windows): Use combination_limit to save the buffer.
(Fset_window_configuration): Adjust accordingly. (Fset_window_configuration): Adjust accordingly.
* print.c (syms_of_print): Initialize debugging output not here...
(init_print_once): ...but in a new function here.
* lisp.h (init_print_once): Add prototype.
* emacs.c (main): Add call to init_print_once. Adjust comments.
   
2013-03-18 Dmitry Antipov <dmantipov@yandex.ru> 2013-03-18 Dmitry Antipov <dmantipov@yandex.ru>
   
......
...@@ -1080,7 +1080,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem ...@@ -1080,7 +1080,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
noninteractive1 = noninteractive; noninteractive1 = noninteractive;
/* Perform basic initializations (not merely interning symbols). */ /* Perform basic initializations (not merely interning symbols). */
if (!initialized) if (!initialized)
{ {
...@@ -1091,8 +1091,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem ...@@ -1091,8 +1091,7 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
init_coding_once (); init_coding_once ();
init_syntax_once (); /* Create standard syntax table. */ init_syntax_once (); /* Create standard syntax table. */
init_category_once (); /* Create standard category table. */ init_category_once (); /* Create standard category table. */
/* Must be done before init_buffer. */ init_casetab_once (); /* Must be done before init_buffer_once. */
init_casetab_once ();
init_buffer_once (); /* Create buffer table and some buffers. */ init_buffer_once (); /* Create buffer table and some buffers. */
init_minibuf_once (); /* Create list of minibuffers. */ init_minibuf_once (); /* Create list of minibuffers. */
/* Must precede init_window_once. */ /* Must precede init_window_once. */
...@@ -1117,6 +1116,8 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem ...@@ -1117,6 +1116,8 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
syms_of_fileio (); syms_of_fileio ();
/* Before syms_of_coding to initialize Vgc_cons_threshold. */ /* Before syms_of_coding to initialize Vgc_cons_threshold. */
syms_of_alloc (); syms_of_alloc ();
/* May call Ffuncall and so GC, thus the latter should be initialized. */
init_print_once ();
/* Before syms_of_coding because it initializes Qcharsetp. */ /* Before syms_of_coding because it initializes Qcharsetp. */
syms_of_charset (); syms_of_charset ();
/* Before init_window_once, because it sets up the /* Before init_window_once, because it sets up the
......
...@@ -3163,6 +3163,7 @@ extern Lisp_Object internal_with_output_to_temp_buffer ...@@ -3163,6 +3163,7 @@ extern Lisp_Object internal_with_output_to_temp_buffer
(const char *, Lisp_Object (*) (Lisp_Object), Lisp_Object); (const char *, Lisp_Object (*) (Lisp_Object), Lisp_Object);
enum FLOAT_TO_STRING_BUFSIZE { FLOAT_TO_STRING_BUFSIZE = 350 }; enum FLOAT_TO_STRING_BUFSIZE { FLOAT_TO_STRING_BUFSIZE = 350 };
extern int float_to_string (char *, double); extern int float_to_string (char *, double);
extern void init_print_once (void);
extern void syms_of_print (void); extern void syms_of_print (void);
/* Defined in doprnt.c. */ /* Defined in doprnt.c. */
......
...@@ -2165,7 +2165,16 @@ print_interval (INTERVAL interval, Lisp_Object printcharfun) ...@@ -2165,7 +2165,16 @@ print_interval (INTERVAL interval, Lisp_Object printcharfun)
print_object (interval->plist, printcharfun, 1); print_object (interval->plist, printcharfun, 1);
} }
/* Initialize debug_print stuff early to have it working from the very
beginning. */
void
init_print_once (void)
{
DEFSYM (Qexternal_debugging_output, "external-debugging-output");
defsubr (&Sexternal_debugging_output);
}
void void
syms_of_print (void) syms_of_print (void)
{ {
...@@ -2297,12 +2306,10 @@ priorities. */); ...@@ -2297,12 +2306,10 @@ priorities. */);
defsubr (&Sprint); defsubr (&Sprint);
defsubr (&Sterpri); defsubr (&Sterpri);
defsubr (&Swrite_char); defsubr (&Swrite_char);
defsubr (&Sexternal_debugging_output);
#ifdef WITH_REDIRECT_DEBUGGING_OUTPUT #ifdef WITH_REDIRECT_DEBUGGING_OUTPUT
defsubr (&Sredirect_debugging_output); defsubr (&Sredirect_debugging_output);
#endif #endif
DEFSYM (Qexternal_debugging_output, "external-debugging-output");
DEFSYM (Qprint_escape_newlines, "print-escape-newlines"); DEFSYM (Qprint_escape_newlines, "print-escape-newlines");
DEFSYM (Qprint_escape_multibyte, "print-escape-multibyte"); DEFSYM (Qprint_escape_multibyte, "print-escape-multibyte");
DEFSYM (Qprint_escape_nonascii, "print-escape-nonascii"); DEFSYM (Qprint_escape_nonascii, "print-escape-nonascii");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment