#include "w32term.h"
#endif /* HAVE_NTGUI */
-#ifdef MAC_OS
-#include "macterm.h"
-#endif /* MAC_OS */
+#ifdef HAVE_NS
+#include "nsterm.h"
+#endif
/* Include systime.h after xterm.h to avoid double inclusion of time.h. */
update_begin (f);
#ifdef MSDOS
if (FRAME_MSDOS_P (f))
- set_terminal_modes (FRAME_TERMINAL (f));
+ FRAME_TERMINAL (f)->set_terminal_modes_hook (FRAME_TERMINAL (f));
#endif
clear_frame (f);
clear_current_matrices (f);
|| g == '\t'
|| g == '\n'
|| g == '\r'
+ || (g == ' ' && !NILP (current_buffer->word_wrap))
/* Give up if unable to display the cursor in the window. */
|| w->cursor.vpos < 0
/* Give up if we are showing a message or just cleared the message
if (! inhibit_window_system && ! display_arg)
{
char *display;
-#ifdef VMS
- display = getenv ("DECW$DISPLAY");
-#else
display = getenv ("DISPLAY");
-#endif
-
display_arg = (display != 0 && *display != 0);
if (display_arg && !x_display_ok (display))
Vinitial_window_system = intern ("x");
#ifdef HAVE_X11
Vwindow_system_version = make_number (11);
-#else
- Vwindow_system_version = make_number (10);
#endif
#if defined (GNU_LINUX) && defined (HAVE_LIBNCURSES)
/* In some versions of ncurses,
}
#endif /* HAVE_NTGUI */
-#ifdef MAC_OS
- if (!inhibit_window_system)
+#ifdef HAVE_NS
+ if (!inhibit_window_system
+#ifndef CANNOT_DUMP
+ && initialized
+#endif
+ )
{
- Vinitial_window_system = intern ("mac");
- Vwindow_system_version = make_number (1);
+ Vinitial_window_system = intern("ns");
+ Vwindow_system_version = make_number(10);
adjust_frame_glyphs_initially ();
return;
}
-#endif /* MAC_OS */
+#endif
/* If no window system has been specified, try to use the terminal. */
if (! isatty (0))
#endif
if (!terminal_type)
{
-#ifdef VMS
- fprintf (stderr, "Please specify your terminal type.\n\
-For types defined in VMS, use set term /device=TYPE.\n\
-For types not defined in VMS, use define emacs_term \"TYPE\".\n\
-\(The quotation marks are necessary since terminal types are lower case.)\n");
-#else /* not VMS */
-
#ifdef HAVE_WINDOW_SYSTEM
if (! inhibit_window_system)
fprintf (stderr, "Please set the environment variable DISPLAY or TERM (see `tset').\n");
else
#endif /* HAVE_WINDOW_SYSTEM */
fprintf (stderr, "Please set the environment variable TERM; see `tset'.\n");
-#endif /* not VMS */
exit (1);
}
-#ifdef VMS
- /* VMS DCL tends to up-case things, so down-case term type.
- Hardly any uppercase letters in terminal types; should be none. */
- {
- char *new = (char *) xmalloc (strlen (terminal_type) + 1);
- char *p;
-
- strcpy (new, terminal_type);
-
- for (p = new; *p; p++)
- if (isupper (*p))
- *p = tolower (*p);
-
- terminal_type = new;
- }
-#endif /* VMS */
-
{
struct terminal *t;
struct frame *f = XFRAME (selected_frame);
/* Set up faces of the initial terminal frame of a dumped Emacs. */
if (initialized
&& !noninteractive
-#ifdef MSDOS
- /* The MSDOS terminal turns on its ``window system'' relatively
- late into the startup, so we cannot do the frame faces'
- initialization just yet. It will be done later by pc-win.el
- and internal_terminal_init. */
- && (strcmp (terminal_type, "internal") != 0 || inhibit_window_system)
-#endif
&& NILP (Vinitial_window_system))
{
/* For the initial frame, we don't have any way of knowing what
return w->cursor_off_p ? Qnil : Qt;
}
+DEFUN ("last-nonminibuffer-frame", Flast_nonminibuf_frame,
+ Slast_nonminibuf_frame, 0, 0, 0,
+ doc: /* Value is last nonminibuffer frame. */)
+ ()
+{
+ Lisp_Object frame = Qnil;
+
+ if (last_nonminibuf_frame)
+ XSETFRAME (frame, last_nonminibuf_frame);
+
+ return frame;
+}
\f
/***********************************************************************
Initialization
defsubr (&Ssend_string_to_terminal);
defsubr (&Sinternal_show_cursor);
defsubr (&Sinternal_show_cursor_p);
+ defsubr (&Slast_nonminibuf_frame);
#if GLYPH_DEBUG
defsubr (&Sdump_redisplay_history);