emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r101167: Make obsolete --unibyte argu


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r101167: Make obsolete --unibyte argument do nothing (Bug#6886).
Date: Sun, 22 Aug 2010 17:15:20 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 101167
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sun 2010-08-22 17:15:20 -0400
message:
  Make obsolete --unibyte argument do nothing (Bug#6886).
  
  * src/emacs.c (main): Remove --unibyte handling (Bug#6886).
  
  * lisp/startup.el (command-line-1): Issue warning for ignored arguments
  --unibyte, etc (Bug#6886).
  
  * doc/lispref/nonascii.texi (Text Representations):
  * doc/lispref/loading.texi (Loading Non-ASCII):
  * doc/lispref/compile.texi (Byte Compilation): Don't mention obsolete
  --unibyte command-line argument.
modified:
  admin/unidata/Makefile.in
  admin/unidata/makefile.w32-in
  doc/lispref/ChangeLog
  doc/lispref/compile.texi
  doc/lispref/loading.texi
  doc/lispref/nonascii.texi
  etc/NEWS
  leim/Makefile.in
  leim/makefile.w32-in
  lisp/ChangeLog
  lisp/Makefile.in
  lisp/international/mule.el
  lisp/makefile.w32-in
  lisp/startup.el
  msdos/sedleim.inp
  src/ChangeLog
  src/doc.c
  src/emacs.c
=== modified file 'admin/unidata/Makefile.in'
--- a/admin/unidata/Makefile.in 2010-06-12 15:52:43 +0000
+++ b/admin/unidata/Makefile.in 2010-08-22 21:15:20 +0000
@@ -21,7 +21,7 @@
 
 EMACS = ../../src/emacs
 DSTDIR = ../../lisp/international
-RUNEMACS = ${EMACS} -Q --multibyte -batch
+RUNEMACS = ${EMACS} -Q -batch
 
 all: ${DSTDIR}/charprop.el ../../src/biditype.h ../../src/bidimirror.h
 

=== modified file 'admin/unidata/makefile.w32-in'
--- a/admin/unidata/makefile.w32-in     2010-06-12 15:52:43 +0000
+++ b/admin/unidata/makefile.w32-in     2010-08-22 21:15:20 +0000
@@ -27,7 +27,7 @@
 # lisp/subdirs.el is not generated yet when the commands below run.
 EMACSLOADPATH = $(lisp);$(lisp)/international;$(lisp)/emacs-lisp
 # Quote EMACS so it could be a file name with embedded whitespace
-RUNEMACS = "$(EMACS)" -Q --multibyte -batch
+RUNEMACS = "$(EMACS)" -Q -batch
 
 all: $(DSTDIR)/charprop.el ../../src/biditype.h ../../src/bidimirror.h
 

=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2010-08-22 20:02:16 +0000
+++ b/doc/lispref/ChangeLog     2010-08-22 21:15:20 +0000
@@ -1,5 +1,12 @@
 2010-08-22  Chong Yidong  <address@hidden>
 
+       * nonascii.texi (Text Representations):
+       * loading.texi (Loading Non-ASCII):
+       * compile.texi (Byte Compilation): Don't mention obsolete
+       --unibyte command-line argument.
+
+2010-08-22  Chong Yidong  <address@hidden>
+
        * modes.texi (Defining Minor Modes): Doc fix (Bug#6880).
 
 2010-08-22  Chong Yidong  <address@hidden>

=== modified file 'doc/lispref/compile.texi'
--- a/doc/lispref/compile.texi  2010-06-23 03:36:56 +0000
+++ b/doc/lispref/compile.texi  2010-08-22 21:15:20 +0000
@@ -22,12 +22,6 @@
 transportable from machine to machine without recompilation.  It is not,
 however, as fast as true compiled code.
 
-  Compiling a Lisp file with the Emacs byte compiler always reads the
-file as multibyte text, even if Emacs was started with @samp{--unibyte},
-unless the file specifies otherwise.  This is so that compilation gives
-results compatible with running the same file without compilation.
address@hidden Non-ASCII}.
-
   In general, any version of Emacs can run byte-compiled code produced
 by recent earlier versions of Emacs, but the reverse is not true.
 

=== modified file 'doc/lispref/loading.texi'
--- a/doc/lispref/loading.texi  2010-06-23 03:36:56 +0000
+++ b/doc/lispref/loading.texi  2010-08-22 21:15:20 +0000
@@ -367,13 +367,6 @@
 unibyte text, and its string constants will be unibyte strings.
 @xref{Coding Systems}.
 
-  To make the results more predictable, Emacs always performs decoding
-into the multibyte representation when loading Lisp files, even if it
-was started with the @samp{--unibyte} option.  This means that string
-constants with address@hidden characters translate into multibyte
-strings.  The only exception is when a particular file specifies no
-decoding.
-
   The reason Emacs is designed this way is so that Lisp programs give
 predictable results, regardless of how Emacs was started.  In addition,
 this enables programs that depend on using multibyte text to work even

=== modified file 'doc/lispref/nonascii.texi'
--- a/doc/lispref/nonascii.texi 2010-05-08 13:25:31 +0000
+++ b/doc/lispref/nonascii.texi 2010-08-22 21:15:20 +0000
@@ -102,9 +102,6 @@
 
 You cannot set this variable directly; instead, use the function
 @code{set-buffer-multibyte} to change a buffer's representation.
-
-The @samp{--unibyte} command line option does its job by setting the
-default value to @code{nil} early in startup.
 @end defvar
 
 @defun position-bytes position

=== modified file 'etc/NEWS'
--- a/etc/NEWS  2010-08-19 15:43:45 +0000
+++ b/etc/NEWS  2010-08-22 21:15:20 +0000
@@ -59,6 +59,10 @@
 
 * Startup Changes in Emacs 24.1
 
+** The --unibyte, --multibyte, --no-multibyte, and --no-unibyte
+command line arguments no longer have any effect.  (They were declared
+obsolete in Emacs 23.)
+
 
 * Changes in Emacs 24.1
 

=== modified file 'leim/Makefile.in'
--- a/leim/Makefile.in  2010-05-15 00:42:22 +0000
+++ b/leim/Makefile.in  2010-08-22 21:15:20 +0000
@@ -48,7 +48,7 @@
 
 # How to run Emacs.
 RUN-EMACS = EMACSLOADPATH=$(buildlisppath) LC_ALL=C \
-       ${BUILT-EMACS} -batch --no-init-file --no-site-file --multibyte
+       ${BUILT-EMACS} -batch --no-init-file --no-site-file
 
 # Subdirectories to be made if ${srcdir} is different from the current
 # directory.

=== modified file 'leim/makefile.w32-in'
--- a/leim/makefile.w32-in      2010-03-27 12:01:22 +0000
+++ b/leim/makefile.w32-in      2010-08-22 21:15:20 +0000
@@ -37,7 +37,7 @@
 buildlisppath=$(CURDIR)/$(dot)$(dot)/lisp
 
 # How to run Emacs.
-RUN_EMACS = "$(BUILT_EMACS)" -batch --no-init-file --no-site-file --multibyte
+RUN_EMACS = "$(BUILT_EMACS)" -batch --no-init-file --no-site-file
 
 # Set EMACSLOADPATH correctly (already defined in environment).
 EMACSLOADPATH=$(buildlisppath)

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-08-22 20:02:16 +0000
+++ b/lisp/ChangeLog    2010-08-22 21:15:20 +0000
@@ -1,5 +1,10 @@
 2010-08-22  Chong Yidong  <address@hidden>
 
+       * startup.el (command-line-1): Issue warning for ignored arguments
+       --unibyte, etc (Bug#6886).
+
+2010-08-22  Chong Yidong  <address@hidden>
+
        * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix (Bug#6880).
 
 2010-08-22  Leo  <address@hidden>

=== modified file 'lisp/Makefile.in'
--- a/lisp/Makefile.in  2010-05-15 00:42:22 +0000
+++ b/lisp/Makefile.in  2010-08-22 21:15:20 +0000
@@ -33,10 +33,9 @@
 # to use an absolute file name.
 EMACS = ${abs_top_builddir}/src/emacs
 
-# Command line flags for Emacs.  This must include --multibyte,
-# otherwise some files will not compile.
+# Command line flags for Emacs.
 
-EMACSOPT = -batch --no-site-file --multibyte
+EMACSOPT = -batch --no-site-file
 
 # Extra flags to pass to the byte compiler
 BYTE_COMPILE_EXTRA_FLAGS =

=== modified file 'lisp/international/mule.el'
--- a/lisp/international/mule.el        2010-08-08 21:12:29 +0000
+++ b/lisp/international/mule.el        2010-08-22 21:15:20 +0000
@@ -326,8 +326,7 @@
            (with-current-buffer buffer
               ;; So that we don't get completely screwed if the
               ;; file is encoded in some complicated character set,
-              ;; read it with real decoding, as a multibyte buffer,
-              ;; even if this is a --unibyte Emacs session.
+              ;; read it with real decoding, as a multibyte buffer.
               (set-buffer-multibyte t)
              ;; Don't let deactivate-mark remain set.
              (let (deactivate-mark)
@@ -346,12 +345,7 @@
            (eval-buffer buffer nil
                         ;; This is compatible with what `load' does.
                         (if purify-flag file fullname)
-                        ;; If this Emacs is running with --unibyte,
-                        ;; convert multibyte strings to unibyte
-                        ;; after reading them.
-;;                      (not (default-value 'enable-multibyte-characters))
-                        nil t
-                        ))
+                        nil t))
        (let (kill-buffer-hook kill-buffer-query-functions)
          (kill-buffer buffer)))
       (do-after-load-evaluation fullname)

=== modified file 'lisp/makefile.w32-in'
--- a/lisp/makefile.w32-in      2010-06-11 21:26:13 +0000
+++ b/lisp/makefile.w32-in      2010-08-22 21:15:20 +0000
@@ -32,10 +32,9 @@
 
 EMACS = $(THISDIR)/../bin/emacs.exe
 
-# Command line flags for Emacs.  This must include --multibyte,
-# otherwise some files will not compile.
+# Command line flags for Emacs.
 
-EMACSOPT = -batch --no-init-file --no-site-file --multibyte
+EMACSOPT = -batch --no-init-file --no-site-file
 
 # Extra flags to pass to the byte compiler
 BYTE_COMPILE_EXTRA_FLAGS =

=== modified file 'lisp/startup.el'
--- a/lisp/startup.el   2010-06-30 22:58:19 +0000
+++ b/lisp/startup.el   2010-08-22 21:15:20 +0000
@@ -785,15 +785,16 @@
                 argi (match-string 1 argi)))
        (when (string-match "\\`--." orig-argi)
          (let ((completion (try-completion argi longopts)))
-           (if (eq completion t)
-               (setq argi (substring argi 1))
-             (if (stringp completion)
-                 (let ((elt (assoc completion longopts)))
-                   (or elt
-                       (error "Option `%s' is ambiguous" argi))
-                   (setq argi (substring (car elt) 1)))
-               (setq argval nil
-                      argi orig-argi)))))
+           (cond ((eq completion t)
+                  (setq argi (substring argi 1)))
+                 ((stringp completion)
+                  (let ((elt (assoc completion longopts)))
+                    (unless elt
+                      (error "Option `%s' is ambiguous" argi))
+                    (setq argi (substring (car elt) 1))))
+                 (t
+                  (setq argval nil
+                        argi orig-argi)))))
        (cond
         ;; The --display arg is handled partly in C, partly in Lisp.
         ;; When it shows up here, we just put it back to be handled
@@ -2231,6 +2232,11 @@
                     (move-to-column (1- cl1-column)))
                   (setq cl1-column 0))
 
+                 ;; These command lines now have no effect.
+                 ((string-match "\\`--?\\(no-\\)?\\(uni\\|multi\\)byte$" argi)
+                  (display-warning 'initialization
+                                   (format "Ignoring obsolete arg %s" argi)))
+
                  ((equal argi "--")
                   (setq just-files t))
                  (t

=== modified file 'msdos/sedleim.inp'
--- a/msdos/sedleim.inp 2010-01-13 08:35:10 +0000
+++ b/msdos/sedleim.inp 2010-08-22 21:15:20 +0000
@@ -34,7 +34,7 @@
 
 /RUN-EMACS *=/,/^$/c\
 export EMACSLOADPATH=${buildlisppath}\
-RUN-EMACS = ${BUILT-EMACS} -batch --no-init-file --no-site-file --multibyte
+RUN-EMACS = ${BUILT-EMACS} -batch --no-init-file --no-site-file
 
 /^     cd ../c\
        ${MAKE} -C ../src ${MFLAGS} emacs

=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2010-08-22 20:02:16 +0000
+++ b/src/ChangeLog     2010-08-22 21:15:20 +0000
@@ -1,3 +1,7 @@
+2010-08-22  Chong Yidong  <address@hidden>
+
+       * emacs.c (main): Remove handling of --unibyte arg (Bug#6886).
+
 2010-08-22  Andreas Schwab  <address@hidden>
 
        * eval.c (Flet, Feval, Fapply, apply_lambda): Use SAFE_ALLOCA_LISP

=== modified file 'src/doc.c'
--- a/src/doc.c 2010-08-22 20:02:16 +0000
+++ b/src/doc.c 2010-08-22 21:15:20 +0000
@@ -285,8 +285,7 @@
                                to - (get_doc_string_buffer + offset));
   else
     {
-      /* Let the data determine whether the string is multibyte,
-        even if Emacs is running in --unibyte mode.  */
+      /* The data determines whether the string is multibyte.  */
       int nchars = multibyte_chars_in_text (get_doc_string_buffer + offset,
                                            to - (get_doc_string_buffer + 
offset));
       return make_string_from_bytes (get_doc_string_buffer + offset,

=== modified file 'src/emacs.c'
--- a/src/emacs.c       2010-08-22 15:14:37 +0000
+++ b/src/emacs.c       2010-08-22 21:15:20 +0000
@@ -1332,68 +1332,6 @@
   init_atimer ();
   running_asynch_code = 0;
 
-  /* Handle --unibyte and the EMACS_UNIBYTE envvar,
-     but not while dumping.  */
-  if (1)
-    {
-      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)
-         /* Ignore EMACS_UNIBYTE before dumping.  */
-         || (!initialized && noninteractive))
-       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.  */
-      /* Actually this shouldn't be needed as of 20.4 in a generally
-        unibyte environment.  As handa says, environment values
-        aren't now decoded; also existing buffers are now made
-        unibyte during startup if .emacs sets unibyte.  Tested with
-        8-bit data in environment variables and /etc/passwd, setting
-        unibyte and Latin-1 in .emacs. -- Dave Love  */
-      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_c_string ("enable-multibyte-characters");
-         Fset_default (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 = XCDR (tail))
-           {
-             Lisp_Object buffer;
-
-             buffer = Fcdr (XCAR (tail));
-             /* 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);
-               }
-           }
-         message ("Warning: unibyte sessions are obsolete and will disappear");
-       }
-    }
-
   no_loadup
     = argmatch (argv, argc, "-nl", "--no-loadup", 6, NULL, &skip_args);
 
@@ -1792,10 +1730,6 @@
   { "-script", "--script", 100, 1 },
   { "-daemon", "--daemon", 99, 0 },
   { "-help", "--help", 90, 0 },
-  { "-no-unibyte", "--no-unibyte", 83, 0 },
-  { "-multibyte", "--multibyte", 82, 0 },
-  { "-unibyte", "--unibyte", 81, 0 },
-  { "-no-multibyte", "--no-multibyte", 80, 0 },
   { "-nl", "--no-loadup", 70, 0 },
   /* -d must come last before the options handled in startup.el.  */
   { "-d", "--display", 60, 1 },


reply via email to

[Prev in Thread] Current Thread [Next in Thread]