aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/emacs.c37
1 files changed, 25 insertions, 12 deletions
diff --git a/src/emacs.c b/src/emacs.c
index 5f57f10c393..8d402f0fb75 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -738,18 +738,28 @@ main (argc, argv, envp)
738 738
739 inhibit_window_system = 0; 739 inhibit_window_system = 0;
740 740
741 /* --unibyte requests that we set up to do everything with single-byte 741 {
742 buffers and strings. We need to handle this before calling 742 int inhibit_unibyte = 0;
743 init_lread, init_editfns and other places that generate Lisp strings 743
744 from text in the environment. */ 744 /* --multibyte overrides EMACS_UNIBYTE. */
745 if ((argmatch (argv, argc, "-unibyte", "--unibyte", 4, NULL, &skip_args)) 745 if (argmatch (argv, argc, "-no-unibyte", "--no-unibyte", 4, NULL, &skip_args)
746 || getenv ("EMACS_UNIBYTE")) 746 || argmatch (argv, argc, "-multibyte", "--multibyte", 4, NULL, &skip_args))
747 { 747 inhibit_unibyte = 1;
748 Lisp_Object symbol; 748
749 symbol = intern ("default-enable-multibyte-characters"); 749 /* --unibyte requests that we set up to do everything with single-byte
750 Fset (symbol, Qnil); 750 buffers and strings. We need to handle this before calling
751 Fset_default (symbol, Qnil); 751 init_lread, init_editfns and other places that generate Lisp strings
752 } 752 from text in the environment. */
753 if (argmatch (argv, argc, "-unibyte", "--unibyte", 4, NULL, &skip_args)
754 || argmatch (argv, argc, "-no-multibyte", "--no-multibyte", 4, NULL, &skip_args)
755 || (getenv ("EMACS_UNIBYTE") && !inhibit_unibyte))
756 {
757 Lisp_Object symbol;
758 symbol = intern ("default-enable-multibyte-characters");
759 Fset (symbol, Qnil);
760 Fset_default (symbol, Qnil);
761 }
762 }
753 763
754 /* Handle the -t switch, which specifies filename to use as terminal */ 764 /* Handle the -t switch, which specifies filename to use as terminal */
755 { 765 {
@@ -1252,7 +1262,10 @@ struct standard_args standard_args[] =
1252#ifdef VMS 1262#ifdef VMS
1253 { "-map", "--map-data", 100, 0 }, 1263 { "-map", "--map-data", 100, 0 },
1254#endif 1264#endif
1265 { "-no-unibyte", "--no-unibyte", 96, 0 },
1266 { "-multibyte", "--multibyte", 96, 0 },
1255 { "-unibyte", "--unibyte", 95, 0 }, 1267 { "-unibyte", "--unibyte", 95, 0 },
1268 { "-no-multibyte", "--no-multibyte", 95, 0 },
1256 { "-t", "--terminal", 90, 1 }, 1269 { "-t", "--terminal", 90, 1 },
1257 { "-d", "--display", 80, 1 }, 1270 { "-d", "--display", 80, 1 },
1258 { "-display", 0, 80, 1 }, 1271 { "-display", 0, 80, 1 },