changeset 21585:139e449079a7

(standard_args): Add --no-unibyte. (main): Recognize --no-unibyte to inhibit EMACS_UNIBYTE. (main): Fix typo, add --multibyte and --no-multibyte. (standard_args): Add --multibyte and --no-multibyte.
author Richard M. Stallman <rms@gnu.org>
date Thu, 16 Apr 1998 21:24:37 +0000
parents 18ee24ba7921
children f6a01ea8441e
files src/emacs.c
diffstat 1 files changed, 25 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/emacs.c	Thu Apr 16 18:49:41 1998 +0000
+++ b/src/emacs.c	Thu Apr 16 21:24:37 1998 +0000
@@ -738,18 +738,28 @@
 
   inhibit_window_system = 0;
 
-  /* --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)) 
-      || getenv ("EMACS_UNIBYTE"))
-    {
-      Lisp_Object symbol;
-      symbol = intern ("default-enable-multibyte-characters");
-      Fset (symbol, Qnil);
-      Fset_default (symbol, Qnil);
-    }
+  {
+    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 */
   {
@@ -1252,7 +1262,10 @@
 #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 },