diff options
| author | Chong Yidong | 2010-08-22 17:15:20 -0400 |
|---|---|---|
| committer | Chong Yidong | 2010-08-22 17:15:20 -0400 |
| commit | 198a7a97ff99b96523f7c0736aa303d305595094 (patch) | |
| tree | 956fc21f7bd577ca58c981dd67859409dfb0153e /src | |
| parent | b0126eac41487b9bca5af5cbb2212ff5b2c58b80 (diff) | |
| download | emacs-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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/doc.c | 3 | ||||
| -rw-r--r-- | src/emacs.c | 66 |
3 files changed, 5 insertions, 68 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 485099c7bf1..a1e67df99e2 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2010-08-22 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * emacs.c (main): Remove handling of --unibyte arg (Bug#6886). | ||
| 4 | |||
| 1 | 2010-08-22 Andreas Schwab <schwab@linux-m68k.org> | 5 | 2010-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 |
| @@ -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 }, |