guile-elisp bootstrap (lisp)
[bpt/emacs.git] / src / term.c
index d4bb7e1..e2c7781 100644 (file)
@@ -3615,9 +3615,7 @@ tty_menu_show (struct frame *f, int x, int y, int menuflags,
       return Qnil;
     }
 
-  /* Don't GC while we prepare and show the menu, because we give the
-     menu functions pointers to the contents of strings.  */
-  specpdl_count = inhibit_garbage_collection ();
+  dynwind_begin ();
 
   /* Avoid crashes if, e.g., another client will connect while we
      are in a menu.  */
@@ -3851,7 +3849,7 @@ tty_menu_show (struct frame *f, int x, int y, int menuflags,
 
  tty_menu_end:
 
-  unbind_to (specpdl_count, Qnil);
+  dynwind_end ();
   return entry;
 }
 
@@ -4543,6 +4541,8 @@ delete_tty (struct terminal *terminal)
 void
 syms_of_term (void)
 {
+#include "term.x"
+
   DEFVAR_BOOL ("system-uses-terminfo", system_uses_terminfo,
     doc: /* Non-nil means the system uses terminfo rather than termcap.
 This variable can be used by terminal emulator packages.  */);
@@ -4572,19 +4572,6 @@ What means \"very visible\" is up to your terminal.  It may make the cursor
 bigger, or it may make it blink, or it may do nothing at all.  */);
   visible_cursor = 1;
 
-  defsubr (&Stty_display_color_p);
-  defsubr (&Stty_display_color_cells);
-  defsubr (&Stty_no_underline);
-  defsubr (&Stty_type);
-  defsubr (&Scontrolling_tty_p);
-  defsubr (&Stty_top_frame);
-  defsubr (&Ssuspend_tty);
-  defsubr (&Sresume_tty);
-#ifdef HAVE_GPM
-  defsubr (&Sgpm_mouse_start);
-  defsubr (&Sgpm_mouse_stop);
-#endif /* HAVE_GPM */
-
 #ifndef DOS_NT
   default_orig_pair = NULL;
   default_set_foreground = NULL;