This file is part of GNU Emacs.
-GNU Emacs is free software; you can redistribute it and/or modify
+GNU Emacs is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 3, or (at your option)
-any later version.
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
GNU Emacs is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
-along with GNU Emacs; see the file COPYING. If not, write to
-the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-Boston, MA 02110-1301, USA. */
+along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <config.h>
#else
int gdb_use_lsb = 0;
#endif
-#ifdef NO_UNION_TYPE
+#ifndef USE_LISP_UNION_TYPE
int gdb_use_union = 0;
#else
int gdb_use_union = 1;
--title, -T TITLE title for initial Emacs frame\n\
--vertical-scroll-bars, -vb enable vertical scroll bars\n\
--xrm XRESOURCES set additional X resources\n\
+--parent-id XID set parent window\n\
--help display this help and exit\n\
--version output version information and exit\n\
\n"
void (*fatal_error_signal_hook) P_ ((void));
-#ifdef HAVE_GTK_AND_PTHREAD
-/* When compiled with GTK and running under Gnome, multiple threads may be
- created. Keep track of our main thread to make sure signals are delivered
- to it (see syssignal.h). */
+#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD
+/* When compiled with GTK and running under Gnome, or Carbon under Mac
+ OS X, multiple threads may be created. Keep track of our main
+ thread to make sure signals are delivered to it (see syssignal.h). */
pthread_t main_thread;
#endif
#if ! defined (DOS_NT) && ! defined (NO_ABORT)
-#ifndef ABORT_RETURN_TYPE
-#define ABORT_RETURN_TYPE void
-#endif
-
-ABORT_RETURN_TYPE
+void
abort ()
{
kill (getpid (), SIGABRT);
}
#endif
-#ifdef NeXT
- {
- extern int malloc_cookie;
- /* This helps out unexnext.c. */
- if (initialized)
- if (malloc_jumpstart (malloc_cookie) != 0)
- printf ("malloc jumpstart failed!\n");
- }
-#endif /* NeXT */
-
#ifdef MAC_OSX
/* Skip process serial number passed in the form -psn_x_y as
command-line argument. The WindowServer adds this option when
# endif /* not SYNC_INPUT */
#endif /* not SYSTEM_MALLOC */
-#ifdef HAVE_GTK_AND_PTHREAD
+#ifdef FORWARD_SIGNAL_TO_MAIN_THREAD
main_thread = pthread_self ();
-#endif /* HAVE_GTK_AND_PTHREAD */
+#endif /* FORWARD_SIGNAL_TO_MAIN_THREAD */
#if defined (MSDOS) || defined (WINDOWSNT)
/* We do all file input/output as binary files. When we need to translate
if (do_initial_setlocale)
setlocale (LC_ALL, "");
-#ifdef EXTRA_INITIALIZE
- EXTRA_INITIALIZE;
-#endif
-
inhibit_window_system = 0;
/* Handle the -t switch, which specifies filename to use as terminal. */
if (argmatch (argv, argc, "-script", "--script", 3, &junk, &skip_args))
{
noninteractive = 1; /* Set batch mode. */
- /* Convert --script to --scriptload, un-skip it, and sort again
+ /* Convert --script to -scriptload, un-skip it, and sort again
so that it will be handled in proper sequence. */
+ /* FIXME broken for --script=FILE - is that supposed to work? */
argv[skip_args - 1] = "-scriptload";
skip_args -= 2;
sort_args (argc, argv);
init_alloc_once ();
init_obarray ();
init_eval_once ();
+ init_character_once ();
init_charset_once ();
init_coding_once ();
init_syntax_once (); /* Create standard syntax table. */
CANNOT_DUMP is defined. */
syms_of_keyboard ();
+#ifdef MAC_OS8
+ /* init_window_once calls make_terminal_frame which on Mac OS
+ creates a full-fledge output_mac type frame. This does not
+ work correctly before syms_of_textprop, syms_of_macfns,
+ syms_of_ccl, syms_of_fontset, syms_of_xterm, syms_of_search,
+ syms_of_frame, mac_term_init, and init_keyboard have already
+ been called. */
+ syms_of_textprop ();
+ syms_of_macfns ();
+ syms_of_ccl ();
+ syms_of_fontset ();
+ syms_of_macterm ();
+ syms_of_macmenu ();
+ syms_of_macselect ();
+ syms_of_search ();
+ syms_of_frame ();
+
+ init_atimer ();
+ mac_term_init (build_string ("Mac"), NULL, NULL);
+ init_keyboard ();
+#endif
+ /* Called before syms_of_fileio, because it sets up Qerror_condition. */
+ syms_of_data ();
+ syms_of_fileio ();
+ /* Before syms_of_coding to initialize Vgc_cons_threshold. */
+ syms_of_alloc ();
+ /* Before syms_of_coding because it initializes Qcharsetp. */
+ syms_of_charset ();
+ /* Before init_window_once, because it sets up the
+ Vcoding_system_hash_table. */
+ syms_of_coding (); /* This should be after syms_of_fileio. */
+
init_window_once (); /* Init the window system. */
init_fileio_once (); /* Must precede any path manipulation. */
#ifdef HAVE_WINDOW_SYSTEM
Lisp_Object buffer;
buffer = Fcdr (XCAR (tail));
- /* Verify that all buffers are empty now, as they
- ought to be. */
- if (BUF_Z (XBUFFER (buffer)) > BUF_BEG (XBUFFER (buffer)))
- abort ();
- /* It is safe to do this crudely in an empty buffer. */
- XBUFFER (buffer)->enable_multibyte_characters = Qnil;
+ /* Make a multibyte buffer unibyte. */
+ if (BUF_Z_BYTE (XBUFFER (buffer)) > BUF_Z (XBUFFER (buffer)))
+ {
+ struct buffer *current = current_buffer;
+
+ set_buffer_temp (XBUFFER (buffer));
+ Fset_buffer_multibyte (Qnil);
+ set_buffer_temp (current);
+ }
}
}
}
no_loadup
= argmatch (argv, argc, "-nl", "--no-loadup", 6, NULL, &skip_args);
-
#ifdef HAVE_X_WINDOWS
/* Stupid kludge to catch command-line display spec. We can't
handle this argument entirely in window system dependent code
if this is not done. Do it after set_global_environment so that we
don't pollute Vglobal_environment. */
/* Setting LANG here will defeat the startup locale processing... */
-#ifdef AIX3_2
+#ifdef AIX
putenv ("LANG=C");
#endif
for the sake of symbols like error-message. */
/* Called before init_window_once for Mac OS Classic. */
syms_of_data ();
- syms_of_alloc ();
+ syms_of_chartab ();
syms_of_lread ();
syms_of_print ();
syms_of_eval ();
syms_of_callproc ();
syms_of_category ();
syms_of_ccl ();
- syms_of_charset ();
+ syms_of_character ();
syms_of_cmds ();
#ifndef NO_DIR_LIBRARY
syms_of_dired ();
syms_of_doc ();
syms_of_editfns ();
syms_of_emacs ();
- syms_of_fileio ();
- syms_of_coding (); /* This should be after syms_of_fileio. */
#ifdef CLASH_DETECTION
syms_of_filelock ();
#endif /* CLASH_DETECTION */
#endif /* WINDOWSNT */
syms_of_window ();
syms_of_xdisp ();
+ syms_of_font ();
#ifdef HAVE_WINDOW_SYSTEM
syms_of_fringe ();
syms_of_image ();
#endif
#endif /* HAVE_X_WINDOWS */
+ syms_of_menu ();
+
#ifndef HAVE_NTGUI
#ifndef MAC_OS
/* Called before init_window_once for Mac OS Classic. */
keys_of_buffer ();
keys_of_keyboard ();
keys_of_keymap ();
- keys_of_minibuf ();
keys_of_window ();
}
else
#endif /* HAVE_NTGUI */
}
+ init_charset ();
+
init_editfns (); /* init_process uses Voperating_system_release. */
init_process (); /* init_display uses add_keyboard_wait_descriptor. */
init_keyboard (); /* This too must precede init_sys_modes. */
{ "-title", 0, 10, 1 },
{ "-name", "--name", 10, 1 },
{ "-xrm", "--xrm", 10, 1 },
+ { "-parent-id", "--parent-id", 10, 1 },
{ "-r", "--reverse-video", 5, 0 },
{ "-rv", 0, 5, 0 },
{ "-reverse", 0, 5, 0 },
{ "-directory", 0, 0, 1 },
{ "-l", "--load", 0, 1 },
{ "-load", 0, 0, 1 },
- { "-scriptload", "--scriptload", 0, 1 },
+ /* This has no longname, because using --scriptload confuses sort_args,
+ because then the --script long option seems to match twice; ie
+ you can't have a long option which is a prefix of another long
+ option. In any case, this is entirely an internal option. */
+ { "-scriptload", NULL, 0, 1 },
{ "-f", "--funcall", 0, 1 },
{ "-funcall", 0, 0, 1 },
{ "-eval", "--eval", 0, 1 },
fatal ("Option `%s' requires an argument\n", argv[from]);
from += options[from];
}
+ /* FIXME When match < 0, shouldn't there be some error,
+ or at least indication to the user that there was a
+ problem? */
}
done: ;
}