(U+6215): Apply new conventions for glyph granularity.
[chise/xemacs-chise.git.1] / src / console.c
index ab147bc..0840f8a 100644 (file)
@@ -196,7 +196,7 @@ valid_console_type_p (Lisp_Object type)
 }
 
 DEFUN ("valid-console-type-p", Fvalid_console_type_p, 1, 1, 0, /*
-Given a CONSOLE-TYPE, return t if it is valid.
+Return t if CONSOLE-TYPE is a valid console type.
 Valid types are 'x, 'tty, and 'stream.
 */
        (console_type))
@@ -216,9 +216,9 @@ DEFUN ("cdfw-console", Fcdfw_console, 1, 1, 0, /*
 Given a console, device, frame, or window, return the associated console.
 Return nil otherwise.
 */
-       (obj))
+       (object))
 {
-  return CDFW_CONSOLE (obj);
+  return CDFW_CONSOLE (object);
 }
 
 \f
@@ -244,6 +244,11 @@ select_console_1 (Lisp_Object console)
     Vwindow_system = Qx;
   else
 #endif
+#ifdef HAVE_GTK
+  if (CONSOLE_GTK_P (XCONSOLE (console)))
+    Vwindow_system = Qgtk;
+  else
+#endif
 #ifdef HAVE_MS_WINDOWS
   if (CONSOLE_MSWINDOWS_P (XCONSOLE (console)))
     Vwindow_system = Qmswindows;
@@ -307,7 +312,7 @@ Return non-nil if OBJECT is a console that has not been deleted.
 }
 
 DEFUN ("console-type", Fconsole_type, 0, 1, 0, /*
-Return the type of the specified console (e.g. `x' or `tty').
+Return the console type (e.g. `x' or `tty') of CONSOLE.
 Value is `tty' for a tty console (a character-only terminal),
 `x' for a console that is an X display,
 `mswindows' for a console that is a Windows NT/95/97 connection,
@@ -327,7 +332,7 @@ Value is `tty' for a tty console (a character-only terminal),
 }
 
 DEFUN ("console-name", Fconsole_name, 0, 1, 0, /*
-Return the name of the specified console.
+Return the name of CONSOLE.
 */
        (console))
 {
@@ -750,7 +755,7 @@ Return a list of all consoles.
 
 DEFUN ("console-device-list", Fconsole_device_list, 0, 1, 0, /*
 Return a list of all devices on CONSOLE.
-If CONSOLE is nil, the selected console will be used.
+If CONSOLE is nil, the selected console is used.
 */
        (console))
 {
@@ -780,7 +785,8 @@ Disable input on console CONSOLE.
 }
 
 DEFUN ("console-on-window-system-p", Fconsole_on_window_system_p, 0, 1, 0, /*
-Return non-nil if this console is on a window system.
+Return t if CONSOLE is on a window system.
+If CONSOLE is nil, the selected console is used.
 This generally means that there is support for the mouse, the menubar,
 the toolbar, glyphs, etc.
 */
@@ -876,7 +882,7 @@ void
 stuff_buffered_input (Lisp_Object stuffstring)
 {
 /* stuff_char works only in BSD, versions 4.2 and up.  */
-#if defined (BSD)
+#if defined (BSD) && defined(HAVE_TTY)
   if (!CONSOLEP (Vcontrolling_terminal) ||
       !CONSOLE_LIVE_P (XCONSOLE (Vcontrolling_terminal)))
     return;
@@ -902,7 +908,7 @@ stuff_buffered_input (Lisp_Object stuffstring)
       stuff_char (XCONSOLE (Vcontrolling_terminal), *kbd_fetch_ptr++);
     }
 # endif
-#endif /* BSD */
+#endif /* BSD && HAVE_TTY */
 }
 
 DEFUN ("suspend-console", Fsuspend_console, 0, 1, "", /*
@@ -1023,6 +1029,7 @@ See also `current-input-mode'.
       TTY_FLAGS (con).flow_control = !NILP (flow);
       TTY_FLAGS (con).meta_key = meta_key;
       init_one_console (con);
+      MARK_FRAME_CHANGED (XFRAME (CONSOLE_SELECTED_FRAME (con)));
     }
 #endif
 
@@ -1148,7 +1155,7 @@ void
 console_type_create (void)
 {
   the_console_type_entry_dynarr = Dynarr_new (console_type_entry);
-  dumpstruct(&the_console_type_entry_dynarr, &cted_description);
+  dump_add_root_struct_ptr (&the_console_type_entry_dynarr, &cted_description);
 
   Vconsole_type_list = Qnil;
   staticpro (&Vconsole_type_list);
@@ -1366,8 +1373,8 @@ complex_vars_of_console (void)
   syms = XCONSOLE (Vconsole_local_symbols);
   console_defaults_saved_slots      = &defs->CONSOLE_SLOTS_FIRST_NAME;
   console_local_symbols_saved_slots = &syms->CONSOLE_SLOTS_FIRST_NAME;
-  dumpstruct (&console_defaults_saved_slots,      &console_slots_description);
-  dumpstruct (&console_local_symbols_saved_slots, &console_slots_description);
+  dump_add_root_struct_ptr (&console_defaults_saved_slots,      &console_slots_description);
+  dump_add_root_struct_ptr (&console_local_symbols_saved_slots, &console_slots_description);
 
   DEFVAR_CONSOLE_DEFAULTS ("default-function-key-map", function_key_map /*
 Default value of `function-key-map' for consoles that don't override it.
@@ -1384,7 +1391,7 @@ The `read-key-sequence' function replaces any subsequence bound by
 keymaps have no binding for the current key sequence but
 `function-key-map' binds a suffix of the sequence to a vector or string,
 `read-key-sequence' replaces the matching suffix with its binding, and
-continues with the new sequence.
+continues with the new sequence.  See `key-binding'.
 
 The events that come from bindings in `function-key-map' are not
 themselves looked up in `function-key-map'.
@@ -1458,7 +1465,7 @@ buffer's local map, and the minor mode keymaps and text property keymaps.
   if ((XINT (console_local_flags.slot) != -2 &&                        \
          XINT (console_local_flags.slot) != -3)                        \
       != !(NILP (XCONSOLE (Vconsole_local_symbols)->slot)))    \
-  abort ()
+  ABORT ()
 #include "conslots.h"
 #undef MARKED_SLOT
 }