XEmacs 21.2.28 "Hermes".
[chise/xemacs-chise.git.1] / src / minibuf.c
index 6e6c5bc..1af7b81 100644 (file)
@@ -289,14 +289,14 @@ ignore_completion_p (Lisp_Object completion_string,
 }
 
 
-/* #### Maybe we should allow ALIST to be a hashtable.  It is wrong
+/* #### Maybe we should allow ALIST to be a hash table.  It is wrong
    for the use of obarrays to be better-rewarded than the use of
-   hashtables.  By better-rewarded I mean that you can pass an obarray
+   hash tables.  By better-rewarded I mean that you can pass an obarray
    to all of the completion functions, whereas you can't do anything
-   like that with a hashtable.
+   like that with a hash table.
 
    To do so, there should probably be a
-   map_obarray_or_alist_or_hashtable function which would be used by
+   map_obarray_or_alist_or_hash_table function which would be used by
    both Ftry_completion and Fall_completions.  But would the
    additional funcalls slow things down?  */
 
@@ -387,7 +387,7 @@ The argument given to PREDICATE is the alist element or the symbol from the obar
        {
          if (!ZEROP (bucket))
            {
-              struct Lisp_Symbol *next;
+              Lisp_Symbol *next;
              if (!SYMBOLP (bucket))
                {
                  signal_simple_error ("Bad obarray passed to try-completions",
@@ -590,7 +590,7 @@ the symbol from the obarray.
        {
          if (!ZEROP (bucket))
            {
-              struct Lisp_Symbol *next = symbol_next (XSYMBOL (bucket));
+              Lisp_Symbol *next = symbol_next (XSYMBOL (bucket));
              elt = bucket;
              eltstring = Fsymbol_name (elt);
               if (next)
@@ -682,7 +682,7 @@ clear_echo_area_internal (struct frame *f, Lisp_Object label, int from_print,
   else
     {
       write_string_to_stdio_stream (stderr, 0, (CONST Bufbyte *) "\n", 0, 1,
-                                   FORMAT_TERMINAL);
+                                   Qterminal);
       return Qnil;
     }
 }
@@ -711,6 +711,12 @@ echo_area_append (struct frame *f, CONST Bufbyte *nonreloc, Lisp_Object reloc,
   struct gcpro gcpro1;
   Lisp_Object frame;
 
+  /* There is an inlining bug in egcs-20000131 c++ that can be worked
+     around as follows:  */
+#if defined (__GNUC__) && defined (__cplusplus)
+  alloca (4);
+#endif
+
   /* some callers pass in a null string as a way of clearing the echo area.
      check for length == 0 now; if this case, neither nonreloc nor reloc
      may be valid.  */
@@ -745,7 +751,7 @@ echo_area_append (struct frame *f, CONST Bufbyte *nonreloc, Lisp_Object reloc,
       if (STRINGP (reloc))
        nonreloc = XSTRING_DATA (reloc);
       write_string_to_stdio_stream (stderr, 0, nonreloc, offset, length,
-                                   FORMAT_TERMINAL);
+                                   Qterminal);
     }
 }
 
@@ -936,9 +942,15 @@ syms_of_minibuf (void)
 }
 
 void
-vars_of_minibuf (void)
+reinit_vars_of_minibuf (void)
 {
   minibuf_level = 0;
+}
+
+void
+vars_of_minibuf (void)
+{
+  reinit_vars_of_minibuf ();
 
   staticpro (&Vminibuf_prompt);
   Vminibuf_prompt = Qnil;
@@ -965,7 +977,7 @@ Each completion has to match all regexps in this list.
 }
 
 void
-complex_vars_of_minibuf (void)
+reinit_complex_vars_of_minibuf (void)
 {
   /* This function can GC */
 #ifdef I18N3
@@ -974,8 +986,14 @@ complex_vars_of_minibuf (void)
 #endif
   Vminibuffer_zero
     = Fget_buffer_create
-      (Fpurecopy (build_string (DEFER_GETTEXT (" *Minibuf-0*"))));
+      (build_string (DEFER_GETTEXT (" *Minibuf-0*")));
   Vecho_area_buffer
     = Fget_buffer_create
-      (Fpurecopy (build_string (DEFER_GETTEXT (" *Echo Area*"))));
+      (build_string (DEFER_GETTEXT (" *Echo Area*")));
+}
+
+void
+complex_vars_of_minibuf (void)
+{
+  reinit_complex_vars_of_minibuf ();
 }