aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2010-08-22 17:15:20 -0400
committerChong Yidong2010-08-22 17:15:20 -0400
commit198a7a97ff99b96523f7c0736aa303d305595094 (patch)
tree956fc21f7bd577ca58c981dd67859409dfb0153e
parentb0126eac41487b9bca5af5cbb2212ff5b2c58b80 (diff)
downloademacs-198a7a97ff99b96523f7c0736aa303d305595094.tar.gz
emacs-198a7a97ff99b96523f7c0736aa303d305595094.zip
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.
-rw-r--r--admin/unidata/Makefile.in2
-rw-r--r--admin/unidata/makefile.w32-in2
-rw-r--r--doc/lispref/ChangeLog7
-rw-r--r--doc/lispref/compile.texi6
-rw-r--r--doc/lispref/loading.texi7
-rw-r--r--doc/lispref/nonascii.texi3
-rw-r--r--etc/NEWS4
-rw-r--r--leim/Makefile.in2
-rw-r--r--leim/makefile.w32-in2
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/Makefile.in5
-rw-r--r--lisp/international/mule.el10
-rw-r--r--lisp/makefile.w32-in5
-rw-r--r--lisp/startup.el24
-rw-r--r--msdos/sedleim.inp2
-rw-r--r--src/ChangeLog4
-rw-r--r--src/doc.c3
-rw-r--r--src/emacs.c66
18 files changed, 47 insertions, 112 deletions
diff --git a/admin/unidata/Makefile.in b/admin/unidata/Makefile.in
index 91a3640fff7..e7b0fbe4bf9 100644
--- a/admin/unidata/Makefile.in
+++ b/admin/unidata/Makefile.in
@@ -21,7 +21,7 @@
21 21
22EMACS = ../../src/emacs 22EMACS = ../../src/emacs
23DSTDIR = ../../lisp/international 23DSTDIR = ../../lisp/international
24RUNEMACS = ${EMACS} -Q --multibyte -batch 24RUNEMACS = ${EMACS} -Q -batch
25 25
26all: ${DSTDIR}/charprop.el ../../src/biditype.h ../../src/bidimirror.h 26all: ${DSTDIR}/charprop.el ../../src/biditype.h ../../src/bidimirror.h
27 27
diff --git a/admin/unidata/makefile.w32-in b/admin/unidata/makefile.w32-in
index 85dfb135df8..58cea29db8b 100644
--- a/admin/unidata/makefile.w32-in
+++ b/admin/unidata/makefile.w32-in
@@ -27,7 +27,7 @@ lisp = $(CURDIR)/../../lisp
27# lisp/subdirs.el is not generated yet when the commands below run. 27# lisp/subdirs.el is not generated yet when the commands below run.
28EMACSLOADPATH = $(lisp);$(lisp)/international;$(lisp)/emacs-lisp 28EMACSLOADPATH = $(lisp);$(lisp)/international;$(lisp)/emacs-lisp
29# Quote EMACS so it could be a file name with embedded whitespace 29# Quote EMACS so it could be a file name with embedded whitespace
30RUNEMACS = "$(EMACS)" -Q --multibyte -batch 30RUNEMACS = "$(EMACS)" -Q -batch
31 31
32all: $(DSTDIR)/charprop.el ../../src/biditype.h ../../src/bidimirror.h 32all: $(DSTDIR)/charprop.el ../../src/biditype.h ../../src/bidimirror.h
33 33
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 9c09410c849..70b82830b44 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,5 +1,12 @@
12010-08-22 Chong Yidong <cyd@stupidchicken.com> 12010-08-22 Chong Yidong <cyd@stupidchicken.com>
2 2
3 * nonascii.texi (Text Representations):
4 * loading.texi (Loading Non-ASCII):
5 * compile.texi (Byte Compilation): Don't mention obsolete
6 --unibyte command-line argument.
7
82010-08-22 Chong Yidong <cyd@stupidchicken.com>
9
3 * modes.texi (Defining Minor Modes): Doc fix (Bug#6880). 10 * modes.texi (Defining Minor Modes): Doc fix (Bug#6880).
4 11
52010-08-22 Chong Yidong <cyd@stupidchicken.com> 122010-08-22 Chong Yidong <cyd@stupidchicken.com>
diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi
index 1c28664e7c3..69b57f19ea7 100644
--- a/doc/lispref/compile.texi
+++ b/doc/lispref/compile.texi
@@ -22,12 +22,6 @@ hardware (as true compiled code is), byte-code is completely
22transportable from machine to machine without recompilation. It is not, 22transportable from machine to machine without recompilation. It is not,
23however, as fast as true compiled code. 23however, as fast as true compiled code.
24 24
25 Compiling a Lisp file with the Emacs byte compiler always reads the
26file as multibyte text, even if Emacs was started with @samp{--unibyte},
27unless the file specifies otherwise. This is so that compilation gives
28results compatible with running the same file without compilation.
29@xref{Loading Non-ASCII}.
30
31 In general, any version of Emacs can run byte-compiled code produced 25 In general, any version of Emacs can run byte-compiled code produced
32by recent earlier versions of Emacs, but the reverse is not true. 26by recent earlier versions of Emacs, but the reverse is not true.
33 27
diff --git a/doc/lispref/loading.texi b/doc/lispref/loading.texi
index bbdd67fc3a5..dee2a0252eb 100644
--- a/doc/lispref/loading.texi
+++ b/doc/lispref/loading.texi
@@ -367,13 +367,6 @@ example) is read without decoding, the text of the program will be
367unibyte text, and its string constants will be unibyte strings. 367unibyte text, and its string constants will be unibyte strings.
368@xref{Coding Systems}. 368@xref{Coding Systems}.
369 369
370 To make the results more predictable, Emacs always performs decoding
371into the multibyte representation when loading Lisp files, even if it
372was started with the @samp{--unibyte} option. This means that string
373constants with non-@acronym{ASCII} characters translate into multibyte
374strings. The only exception is when a particular file specifies no
375decoding.
376
377 The reason Emacs is designed this way is so that Lisp programs give 370 The reason Emacs is designed this way is so that Lisp programs give
378predictable results, regardless of how Emacs was started. In addition, 371predictable results, regardless of how Emacs was started. In addition,
379this enables programs that depend on using multibyte text to work even 372this enables programs that depend on using multibyte text to work even
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi
index 00a1dffed6a..40c78d97da7 100644
--- a/doc/lispref/nonascii.texi
+++ b/doc/lispref/nonascii.texi
@@ -102,9 +102,6 @@ it contains unibyte encoded text or binary non-text data.
102 102
103You cannot set this variable directly; instead, use the function 103You cannot set this variable directly; instead, use the function
104@code{set-buffer-multibyte} to change a buffer's representation. 104@code{set-buffer-multibyte} to change a buffer's representation.
105
106The @samp{--unibyte} command line option does its job by setting the
107default value to @code{nil} early in startup.
108@end defvar 105@end defvar
109 106
110@defun position-bytes position 107@defun position-bytes position
diff --git a/etc/NEWS b/etc/NEWS
index 0df0d20dbac..d46d5cc8279 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -59,6 +59,10 @@ automatically select it.
59 59
60* Startup Changes in Emacs 24.1 60* Startup Changes in Emacs 24.1
61 61
62** The --unibyte, --multibyte, --no-multibyte, and --no-unibyte
63command line arguments no longer have any effect. (They were declared
64obsolete in Emacs 23.)
65
62 66
63* Changes in Emacs 24.1 67* Changes in Emacs 24.1
64 68
diff --git a/leim/Makefile.in b/leim/Makefile.in
index 6eb18bc76d9..ba70319ca1e 100644
--- a/leim/Makefile.in
+++ b/leim/Makefile.in
@@ -48,7 +48,7 @@ buildlisppath=${srcdir}/../lisp
48 48
49# How to run Emacs. 49# How to run Emacs.
50RUN-EMACS = EMACSLOADPATH=$(buildlisppath) LC_ALL=C \ 50RUN-EMACS = EMACSLOADPATH=$(buildlisppath) LC_ALL=C \
51 ${BUILT-EMACS} -batch --no-init-file --no-site-file --multibyte 51 ${BUILT-EMACS} -batch --no-init-file --no-site-file
52 52
53# Subdirectories to be made if ${srcdir} is different from the current 53# Subdirectories to be made if ${srcdir} is different from the current
54# directory. 54# directory.
diff --git a/leim/makefile.w32-in b/leim/makefile.w32-in
index dbebc32602c..f55fbbf816c 100644
--- a/leim/makefile.w32-in
+++ b/leim/makefile.w32-in
@@ -37,7 +37,7 @@ BUILT_EMACS = $(THISDIR)/$(dot)$(dot)/src/$(BLD)/emacs.exe
37buildlisppath=$(CURDIR)/$(dot)$(dot)/lisp 37buildlisppath=$(CURDIR)/$(dot)$(dot)/lisp
38 38
39# How to run Emacs. 39# How to run Emacs.
40RUN_EMACS = "$(BUILT_EMACS)" -batch --no-init-file --no-site-file --multibyte 40RUN_EMACS = "$(BUILT_EMACS)" -batch --no-init-file --no-site-file
41 41
42# Set EMACSLOADPATH correctly (already defined in environment). 42# Set EMACSLOADPATH correctly (already defined in environment).
43EMACSLOADPATH=$(buildlisppath) 43EMACSLOADPATH=$(buildlisppath)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 12a2ffce5bd..9452ac294dd 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
12010-08-22 Chong Yidong <cyd@stupidchicken.com> 12010-08-22 Chong Yidong <cyd@stupidchicken.com>
2 2
3 * startup.el (command-line-1): Issue warning for ignored arguments
4 --unibyte, etc (Bug#6886).
5
62010-08-22 Chong Yidong <cyd@stupidchicken.com>
7
3 * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix (Bug#6880). 8 * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix (Bug#6880).
4 9
52010-08-22 Leo <sdl.web@gmail.com> 102010-08-22 Leo <sdl.web@gmail.com>
diff --git a/lisp/Makefile.in b/lisp/Makefile.in
index 4effdddff6a..8d681b4f673 100644
--- a/lisp/Makefile.in
+++ b/lisp/Makefile.in
@@ -33,10 +33,9 @@ VPATH = $(srcdir)
33# to use an absolute file name. 33# to use an absolute file name.
34EMACS = ${abs_top_builddir}/src/emacs 34EMACS = ${abs_top_builddir}/src/emacs
35 35
36# Command line flags for Emacs. This must include --multibyte, 36# Command line flags for Emacs.
37# otherwise some files will not compile.
38 37
39EMACSOPT = -batch --no-site-file --multibyte 38EMACSOPT = -batch --no-site-file
40 39
41# Extra flags to pass to the byte compiler 40# Extra flags to pass to the byte compiler
42BYTE_COMPILE_EXTRA_FLAGS = 41BYTE_COMPILE_EXTRA_FLAGS =
diff --git a/lisp/international/mule.el b/lisp/international/mule.el
index 59d6ff42c97..84b8db3e9ca 100644
--- a/lisp/international/mule.el
+++ b/lisp/international/mule.el
@@ -326,8 +326,7 @@ Return t if file exists."
326 (with-current-buffer buffer 326 (with-current-buffer buffer
327 ;; So that we don't get completely screwed if the 327 ;; So that we don't get completely screwed if the
328 ;; file is encoded in some complicated character set, 328 ;; file is encoded in some complicated character set,
329 ;; read it with real decoding, as a multibyte buffer, 329 ;; read it with real decoding, as a multibyte buffer.
330 ;; even if this is a --unibyte Emacs session.
331 (set-buffer-multibyte t) 330 (set-buffer-multibyte t)
332 ;; Don't let deactivate-mark remain set. 331 ;; Don't let deactivate-mark remain set.
333 (let (deactivate-mark) 332 (let (deactivate-mark)
@@ -346,12 +345,7 @@ Return t if file exists."
346 (eval-buffer buffer nil 345 (eval-buffer buffer nil
347 ;; This is compatible with what `load' does. 346 ;; This is compatible with what `load' does.
348 (if purify-flag file fullname) 347 (if purify-flag file fullname)
349 ;; If this Emacs is running with --unibyte, 348 nil t))
350 ;; convert multibyte strings to unibyte
351 ;; after reading them.
352;; (not (default-value 'enable-multibyte-characters))
353 nil t
354 ))
355 (let (kill-buffer-hook kill-buffer-query-functions) 349 (let (kill-buffer-hook kill-buffer-query-functions)
356 (kill-buffer buffer))) 350 (kill-buffer buffer)))
357 (do-after-load-evaluation fullname) 351 (do-after-load-evaluation fullname)
diff --git a/lisp/makefile.w32-in b/lisp/makefile.w32-in
index 871b690f007..df997b76585 100644
--- a/lisp/makefile.w32-in
+++ b/lisp/makefile.w32-in
@@ -32,10 +32,9 @@ srcdir = $(CURDIR)/..
32 32
33EMACS = $(THISDIR)/../bin/emacs.exe 33EMACS = $(THISDIR)/../bin/emacs.exe
34 34
35# Command line flags for Emacs. This must include --multibyte, 35# Command line flags for Emacs.
36# otherwise some files will not compile.
37 36
38EMACSOPT = -batch --no-init-file --no-site-file --multibyte 37EMACSOPT = -batch --no-init-file --no-site-file
39 38
40# Extra flags to pass to the byte compiler 39# Extra flags to pass to the byte compiler
41BYTE_COMPILE_EXTRA_FLAGS = 40BYTE_COMPILE_EXTRA_FLAGS =
diff --git a/lisp/startup.el b/lisp/startup.el
index 76e11491c0c..72169799acf 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -785,15 +785,16 @@ opening the first frame (e.g. open a connection to an X server).")
785 argi (match-string 1 argi))) 785 argi (match-string 1 argi)))
786 (when (string-match "\\`--." orig-argi) 786 (when (string-match "\\`--." orig-argi)
787 (let ((completion (try-completion argi longopts))) 787 (let ((completion (try-completion argi longopts)))
788 (if (eq completion t) 788 (cond ((eq completion t)
789 (setq argi (substring argi 1)) 789 (setq argi (substring argi 1)))
790 (if (stringp completion) 790 ((stringp completion)
791 (let ((elt (assoc completion longopts))) 791 (let ((elt (assoc completion longopts)))
792 (or elt 792 (unless elt
793 (error "Option `%s' is ambiguous" argi)) 793 (error "Option `%s' is ambiguous" argi))
794 (setq argi (substring (car elt) 1))) 794 (setq argi (substring (car elt) 1))))
795 (setq argval nil 795 (t
796 argi orig-argi))))) 796 (setq argval nil
797 argi orig-argi)))))
797 (cond 798 (cond
798 ;; The --display arg is handled partly in C, partly in Lisp. 799 ;; The --display arg is handled partly in C, partly in Lisp.
799 ;; When it shows up here, we just put it back to be handled 800 ;; When it shows up here, we just put it back to be handled
@@ -2231,6 +2232,11 @@ A fancy display is used on graphic displays, normal otherwise."
2231 (move-to-column (1- cl1-column))) 2232 (move-to-column (1- cl1-column)))
2232 (setq cl1-column 0)) 2233 (setq cl1-column 0))
2233 2234
2235 ;; These command lines now have no effect.
2236 ((string-match "\\`--?\\(no-\\)?\\(uni\\|multi\\)byte$" argi)
2237 (display-warning 'initialization
2238 (format "Ignoring obsolete arg %s" argi)))
2239
2234 ((equal argi "--") 2240 ((equal argi "--")
2235 (setq just-files t)) 2241 (setq just-files t))
2236 (t 2242 (t
diff --git a/msdos/sedleim.inp b/msdos/sedleim.inp
index 20da3e64ae5..b5193e665a7 100644
--- a/msdos/sedleim.inp
+++ b/msdos/sedleim.inp
@@ -34,7 +34,7 @@ s|\([ ]\)echo|\1djecho|g
34 34
35/RUN-EMACS *=/,/^$/c\ 35/RUN-EMACS *=/,/^$/c\
36export EMACSLOADPATH=${buildlisppath}\ 36export EMACSLOADPATH=${buildlisppath}\
37RUN-EMACS = ${BUILT-EMACS} -batch --no-init-file --no-site-file --multibyte 37RUN-EMACS = ${BUILT-EMACS} -batch --no-init-file --no-site-file
38 38
39/^ cd ../c\ 39/^ cd ../c\
40 ${MAKE} -C ../src ${MFLAGS} emacs 40 ${MAKE} -C ../src ${MFLAGS} emacs
diff --git a/src/ChangeLog b/src/ChangeLog
index 485099c7bf1..a1e67df99e2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12010-08-22 Chong Yidong <cyd@stupidchicken.com>
2
3 * emacs.c (main): Remove handling of --unibyte arg (Bug#6886).
4
12010-08-22 Andreas Schwab <schwab@linux-m68k.org> 52010-08-22 Andreas Schwab <schwab@linux-m68k.org>
2 6
3 * eval.c (Flet, Feval, Fapply, apply_lambda): Use SAFE_ALLOCA_LISP 7 * eval.c (Flet, Feval, Fapply, apply_lambda): Use SAFE_ALLOCA_LISP
diff --git a/src/doc.c b/src/doc.c
index a8601d930d0..f8ab9d081b9 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -285,8 +285,7 @@ get_doc_string (Lisp_Object filepos, int unibyte, int definition)
285 to - (get_doc_string_buffer + offset)); 285 to - (get_doc_string_buffer + offset));
286 else 286 else
287 { 287 {
288 /* Let the data determine whether the string is multibyte, 288 /* The data determines whether the string is multibyte. */
289 even if Emacs is running in --unibyte mode. */
290 int nchars = multibyte_chars_in_text (get_doc_string_buffer + offset, 289 int nchars = multibyte_chars_in_text (get_doc_string_buffer + offset,
291 to - (get_doc_string_buffer + offset)); 290 to - (get_doc_string_buffer + offset));
292 return make_string_from_bytes (get_doc_string_buffer + offset, 291 return make_string_from_bytes (get_doc_string_buffer + offset,
diff --git a/src/emacs.c b/src/emacs.c
index dc1453a34ac..397d3d9ad27 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1332,68 +1332,6 @@ main (int argc, char **argv)
1332 init_atimer (); 1332 init_atimer ();
1333 running_asynch_code = 0; 1333 running_asynch_code = 0;
1334 1334
1335 /* Handle --unibyte and the EMACS_UNIBYTE envvar,
1336 but not while dumping. */
1337 if (1)
1338 {
1339 int inhibit_unibyte = 0;
1340
1341 /* --multibyte overrides EMACS_UNIBYTE. */
1342 if (argmatch (argv, argc, "-no-unibyte", "--no-unibyte", 4, NULL, &skip_args)
1343 || argmatch (argv, argc, "-multibyte", "--multibyte", 4, NULL, &skip_args)
1344 /* Ignore EMACS_UNIBYTE before dumping. */
1345 || (!initialized && noninteractive))
1346 inhibit_unibyte = 1;
1347
1348 /* --unibyte requests that we set up to do everything with single-byte
1349 buffers and strings. We need to handle this before calling
1350 init_lread, init_editfns and other places that generate Lisp strings
1351 from text in the environment. */
1352 /* Actually this shouldn't be needed as of 20.4 in a generally
1353 unibyte environment. As handa says, environment values
1354 aren't now decoded; also existing buffers are now made
1355 unibyte during startup if .emacs sets unibyte. Tested with
1356 8-bit data in environment variables and /etc/passwd, setting
1357 unibyte and Latin-1 in .emacs. -- Dave Love */
1358 if (argmatch (argv, argc, "-unibyte", "--unibyte", 4, NULL, &skip_args)
1359 || argmatch (argv, argc, "-no-multibyte", "--no-multibyte", 4, NULL, &skip_args)
1360 || (getenv ("EMACS_UNIBYTE") && !inhibit_unibyte))
1361 {
1362 Lisp_Object old_log_max;
1363 Lisp_Object symbol, tail;
1364
1365 symbol = intern_c_string ("enable-multibyte-characters");
1366 Fset_default (symbol, Qnil);
1367
1368 if (initialized)
1369 {
1370 /* Erase pre-dump messages in *Messages* now so no abort. */
1371 old_log_max = Vmessage_log_max;
1372 XSETFASTINT (Vmessage_log_max, 0);
1373 message_dolog ("", 0, 1, 0);
1374 Vmessage_log_max = old_log_max;
1375 }
1376
1377 for (tail = Vbuffer_alist; CONSP (tail);
1378 tail = XCDR (tail))
1379 {
1380 Lisp_Object buffer;
1381
1382 buffer = Fcdr (XCAR (tail));
1383 /* Make a multibyte buffer unibyte. */
1384 if (BUF_Z_BYTE (XBUFFER (buffer)) > BUF_Z (XBUFFER (buffer)))
1385 {
1386 struct buffer *current = current_buffer;
1387
1388 set_buffer_temp (XBUFFER (buffer));
1389 Fset_buffer_multibyte (Qnil);
1390 set_buffer_temp (current);
1391 }
1392 }
1393 message ("Warning: unibyte sessions are obsolete and will disappear");
1394 }
1395 }
1396
1397 no_loadup 1335 no_loadup
1398 = argmatch (argv, argc, "-nl", "--no-loadup", 6, NULL, &skip_args); 1336 = argmatch (argv, argc, "-nl", "--no-loadup", 6, NULL, &skip_args);
1399 1337
@@ -1792,10 +1730,6 @@ const struct standard_args standard_args[] =
1792 { "-script", "--script", 100, 1 }, 1730 { "-script", "--script", 100, 1 },
1793 { "-daemon", "--daemon", 99, 0 }, 1731 { "-daemon", "--daemon", 99, 0 },
1794 { "-help", "--help", 90, 0 }, 1732 { "-help", "--help", 90, 0 },
1795 { "-no-unibyte", "--no-unibyte", 83, 0 },
1796 { "-multibyte", "--multibyte", 82, 0 },
1797 { "-unibyte", "--unibyte", 81, 0 },
1798 { "-no-multibyte", "--no-multibyte", 80, 0 },
1799 { "-nl", "--no-loadup", 70, 0 }, 1733 { "-nl", "--no-loadup", 70, 0 },
1800 /* -d must come last before the options handled in startup.el. */ 1734 /* -d must come last before the options handled in startup.el. */
1801 { "-d", "--display", 60, 1 }, 1735 { "-d", "--display", 60, 1 },