#include "lisp.h"
#include "commands.h"
#include "intervals.h"
+#include "buffer.h"
#include "systty.h"
#include "blockinput.h"
so that GDB can return from a breakpoint here.
MSDOS has its own definition on msdos.c */
-#ifndef DOS_NT
+#if ! defined (DOS_NT) && ! defined (NO_ABORT)
void
abort ()
{
kill (getpid (), SIGABRT);
+ /* This shouldn't be executed, but it prevents a warning. */
+ exit (1);
}
#endif
inhibit_window_system = 0;
- {
- int inhibit_unibyte = 0;
-
- /* --multibyte overrides EMACS_UNIBYTE. */
- if (argmatch (argv, argc, "-no-unibyte", "--no-unibyte", 4, NULL, &skip_args)
- || argmatch (argv, argc, "-multibyte", "--multibyte", 4, NULL, &skip_args))
- inhibit_unibyte = 1;
-
- /* --unibyte requests that we set up to do everything with single-byte
- buffers and strings. We need to handle this before calling
- init_lread, init_editfns and other places that generate Lisp strings
- from text in the environment. */
- if (argmatch (argv, argc, "-unibyte", "--unibyte", 4, NULL, &skip_args)
- || argmatch (argv, argc, "-no-multibyte", "--no-multibyte", 4, NULL, &skip_args)
- || (getenv ("EMACS_UNIBYTE") && !inhibit_unibyte))
- {
- Lisp_Object symbol;
- symbol = intern ("default-enable-multibyte-characters");
- Fset (symbol, Qnil);
- Fset_default (symbol, Qnil);
- }
- }
-
/* Handle the -t switch, which specifies filename to use as terminal */
{
char *term;
printf ("\
Usage: %s [-t term] [--terminal term] [-nw] [--no-windows] [--batch]\n\
[-q] [--no-init-file] [-u user] [--user user] [--debug-init]\n\
- [--version] [--no-site-file]\n\
+ [--unibyte] [--multibyte] [--version] [--no-site-file]\n\
[-f func] [--funcall func] [-l file] [--load file] [--insert file]\n\
[+linenum] file-to-visit [--kill]\n\
-Report bugs to bug-gnu-emacs@prep.ai.mit.edu. First, please see\n\
+Report bugs to bug-gnu-emacs@gnu.org. First, please see\n\
the Bugs section of the Emacs manual or the file BUGS.\n", argv[0]);
exit (0);
}
init_data ();
running_asynch_code = 0;
+ /* Handle --unibyte and the EMACS_UNIBYTE envvar,
+ but not while dumping. */
+ if (
+#ifndef CANNOT_DUMP
+ ! noninteractive || initialized
+#else
+ 1
+#endif
+ )
+ {
+ int inhibit_unibyte = 0;
+
+ /* --multibyte overrides EMACS_UNIBYTE. */
+ if (argmatch (argv, argc, "-no-unibyte", "--no-unibyte", 4, NULL, &skip_args)
+ || argmatch (argv, argc, "-multibyte", "--multibyte", 4, NULL, &skip_args))
+ inhibit_unibyte = 1;
+
+ /* --unibyte requests that we set up to do everything with single-byte
+ buffers and strings. We need to handle this before calling
+ init_lread, init_editfns and other places that generate Lisp strings
+ from text in the environment. */
+ if (argmatch (argv, argc, "-unibyte", "--unibyte", 4, NULL, &skip_args)
+ || argmatch (argv, argc, "-no-multibyte", "--no-multibyte", 4, NULL, &skip_args)
+ || (getenv ("EMACS_UNIBYTE") && !inhibit_unibyte))
+ {
+ Lisp_Object old_log_max;
+ Lisp_Object symbol, tail;
+
+ symbol = intern ("default-enable-multibyte-characters");
+ Fset (symbol, Qnil);
+
+ if (initialized)
+ {
+ /* Erase pre-dump messages in *Messages* now so no abort. */
+ old_log_max = Vmessage_log_max;
+ XSETFASTINT (Vmessage_log_max, 0);
+ message_dolog ("", 0, 1, 0);
+ Vmessage_log_max = old_log_max;
+ }
+
+ for (tail = Vbuffer_alist; CONSP (tail);
+ tail = XCONS (tail)->cdr)
+ {
+ Lisp_Object buffer;
+
+ buffer = Fcdr (XCONS (tail)->car);
+ /* 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;
+ }
+ }
+ }
+
#ifdef MSDOS
/* Call early 'cause init_environment needs it. */
init_dosfns ();
init_callproc (); /* Must follow init_cmdargs but not init_sys_modes. */
init_lread ();
- if (!noninteractive)
- {
-#ifdef VMS
- init_vms_input ();/* init_display calls get_frame_size, that needs this */
-#endif /* VMS */
- init_display (); /* Determine terminal type. init_sys_modes uses results */
- }
- init_keyboard (); /* This too must precede init_sys_modes */
-#ifdef VMS
- init_vmsproc (); /* And this too. */
-#endif /* VMS */
- init_sys_modes (); /* Init system terminal modes (RAW or CBREAK, etc.) */
- init_xdisp ();
- init_macros ();
- init_editfns ();
-#ifdef LISP_FLOAT_TYPE
- init_floatfns ();
-#endif
-#ifdef VMS
- init_vmsfns ();
-#endif /* VMS */
- init_process ();
-
-/* Intern the names of all standard functions and variables; define standard keys */
+ /* Intern the names of all standard functions and variables;
+ define standard keys. */
if (!initialized)
{
keys_of_frame ();
}
+ if (!noninteractive)
+ {
+#ifdef VMS
+ init_vms_input ();/* init_display calls get_frame_size, that needs this */
+#endif /* VMS */
+ init_display (); /* Determine terminal type. init_sys_modes uses results */
+ }
+ init_keyboard (); /* This too must precede init_sys_modes */
+#ifdef VMS
+ init_vmsproc (); /* And this too. */
+#endif /* VMS */
+ init_sys_modes (); /* Init system terminal modes (RAW or CBREAK, etc.) */
+ init_xdisp ();
+ init_macros ();
+ init_editfns ();
+#ifdef LISP_FLOAT_TYPE
+ init_floatfns ();
+#endif
+#ifdef VMS
+ init_vmsfns ();
+#endif /* VMS */
+ init_process ();
+
if (!initialized)
{
char *file;
#ifdef VMS
{ "-map", "--map-data", 100, 0 },
#endif
- { "-no-unibyte", "--no-unibyte", 96, 0 },
- { "-multibyte", "--multibyte", 96, 0 },
- { "-unibyte", "--unibyte", 95, 0 },
- { "-no-multibyte", "--no-multibyte", 95, 0 },
{ "-t", "--terminal", 90, 1 },
{ "-d", "--display", 80, 1 },
{ "-display", 0, 80, 1 },
{ "-nw", "--no-windows", 70, 0 },
+ { "-no-unibyte", "--no-unibyte", 66, 0 },
+ { "-multibyte", "--multibyte", 66, 0 },
+ { "-unibyte", "--unibyte", 65, 0 },
+ { "-no-multibyte", "--no-multibyte", 65, 0 },
{ "-batch", "--batch", 60, 0 },
{ "-q", "--no-init-file", 50, 0 },
{ "-no-init-file", 0, 50, 0 },
#ifdef SIGUSR1
DEFVAR_LISP ("signal-USR1-hook", &Vsignal_USR1_hook,
- "Hook to be run whenever emacs recieves a USR1 signal");
+ "Hook to be run whenever emacs receives a USR1 signal");
Vsignal_USR1_hook = Qnil;
#ifdef SIGUSR2
DEFVAR_LISP ("signal-USR2-hook", &Vsignal_USR2_hook,
- "Hook to be run whenever emacs recieves a USR2 signal");
+ "Hook to be run whenever emacs receives a USR2 signal");
Vsignal_USR2_hook = Qnil;
#endif
#endif
and only if the Emacs executable is installed with setuid to permit\n\
it to change priority. (Emacs sets its uid back to the real uid.)\n\
Currently, you need to define SET_EMACS_PRIORITY in `config.h'\n\
+before you compile Emacs, to enable the code for this feature.");
+ emacs_priority = 0;
DEFVAR_LISP ("path-separator", &Vpath_separator,
"The directory separator in search paths, as a string.");
char c = SEPCHAR;
Vpath_separator = make_string (&c, 1);
}
-before you compile Emacs, to enable the code for this feature.");
- emacs_priority = 0;
DEFVAR_LISP ("invocation-name", &Vinvocation_name,
"The program name that was used to run Emacs.\n\