comparison src/emacs.c @ 44101:d2a818b7c9ca

(main): Handle --unibyte, --multibyte, and --no-loadup in temacs even if !CANNOT_DUMP. (standard_args): Keep --no-loadup even if !CANNOT_DUMP.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Fri, 22 Mar 2002 22:54:19 +0000
parents 6e6b0dac43c6
children 2b5d4943e959
comparison
equal deleted inserted replaced
44100:57e965380c39 44101:d2a818b7c9ca
1217 init_atimer (); 1217 init_atimer ();
1218 running_asynch_code = 0; 1218 running_asynch_code = 0;
1219 1219
1220 /* Handle --unibyte and the EMACS_UNIBYTE envvar, 1220 /* Handle --unibyte and the EMACS_UNIBYTE envvar,
1221 but not while dumping. */ 1221 but not while dumping. */
1222 if ( 1222 if (1)
1223 #ifndef CANNOT_DUMP
1224 ! noninteractive || initialized
1225 #else
1226 1
1227 #endif
1228 )
1229 { 1223 {
1230 int inhibit_unibyte = 0; 1224 int inhibit_unibyte = 0;
1231 1225
1232 /* --multibyte overrides EMACS_UNIBYTE. */ 1226 /* --multibyte overrides EMACS_UNIBYTE. */
1233 if (argmatch (argv, argc, "-no-unibyte", "--no-unibyte", 4, NULL, &skip_args) 1227 if (argmatch (argv, argc, "-no-unibyte", "--no-unibyte", 4, NULL, &skip_args)
1234 || argmatch (argv, argc, "-multibyte", "--multibyte", 4, NULL, &skip_args)) 1228 || argmatch (argv, argc, "-multibyte", "--multibyte", 4, NULL, &skip_args)
1229 /* Ignore EMACS_UNIBYTE before dumping. */
1230 || (!initialized && noninteractive))
1235 inhibit_unibyte = 1; 1231 inhibit_unibyte = 1;
1236 1232
1237 /* --unibyte requests that we set up to do everything with single-byte 1233 /* --unibyte requests that we set up to do everything with single-byte
1238 buffers and strings. We need to handle this before calling 1234 buffers and strings. We need to handle this before calling
1239 init_lread, init_editfns and other places that generate Lisp strings 1235 init_lread, init_editfns and other places that generate Lisp strings
1540 char *file; 1536 char *file;
1541 /* Handle -l loadup, args passed by Makefile. */ 1537 /* Handle -l loadup, args passed by Makefile. */
1542 if (argmatch (argv, argc, "-l", "--load", 3, &file, &skip_args)) 1538 if (argmatch (argv, argc, "-l", "--load", 3, &file, &skip_args))
1543 Vtop_level = Fcons (intern ("load"), 1539 Vtop_level = Fcons (intern ("load"),
1544 Fcons (build_string (file), Qnil)); 1540 Fcons (build_string (file), Qnil));
1545 #ifdef CANNOT_DUMP
1546 /* Unless next switch is -nl, load "loadup.el" first thing. */ 1541 /* Unless next switch is -nl, load "loadup.el" first thing. */
1547 if (! no_loadup) 1542 if (! no_loadup)
1548 Vtop_level = Fcons (intern ("load"), 1543 Vtop_level = Fcons (intern ("load"),
1549 Fcons (build_string ("loadup.el"), Qnil)); 1544 Fcons (build_string ("loadup.el"), Qnil));
1550 #endif /* CANNOT_DUMP */
1551 } 1545 }
1552 1546
1553 if (initialized) 1547 if (initialized)
1554 { 1548 {
1555 #ifdef HAVE_TZSET 1549 #ifdef HAVE_TZSET
1641 { "-help", "--help", 90, 0 }, 1635 { "-help", "--help", 90, 0 },
1642 { "-no-unibyte", "--no-unibyte", 83, 0 }, 1636 { "-no-unibyte", "--no-unibyte", 83, 0 },
1643 { "-multibyte", "--multibyte", 82, 0 }, 1637 { "-multibyte", "--multibyte", 82, 0 },
1644 { "-unibyte", "--unibyte", 81, 0 }, 1638 { "-unibyte", "--unibyte", 81, 0 },
1645 { "-no-multibyte", "--no-multibyte", 80, 0 }, 1639 { "-no-multibyte", "--no-multibyte", 80, 0 },
1646 #ifdef CANNOT_DUMP
1647 { "-nl", "--no-loadup", 70, 0 }, 1640 { "-nl", "--no-loadup", 70, 0 },
1648 #endif
1649 /* -d must come last before the options handled in startup.el. */ 1641 /* -d must come last before the options handled in startup.el. */
1650 { "-d", "--display", 60, 1 }, 1642 { "-d", "--display", 60, 1 },
1651 { "-display", 0, 60, 1 }, 1643 { "-display", 0, 60, 1 },
1652 /* Now for the options handled in startup.el. */ 1644 /* Now for the options handled in startup.el. */
1653 { "-q", "--no-init-file", 50, 0 }, 1645 { "-q", "--no-init-file", 50, 0 },