From 82e98df4df1251dde645eb4878cc1225d067606a Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sat, 29 Aug 2009 02:25:29 +0000 Subject: [PATCH] * NEWS: Declare unibyte sessions obsolete. * emacs.c (USAGE1): Remove --(no-)multibyte, --(no-)unibyte. (main): Use enable-multibyte-characters rather than default-enable-multibyte-characters. Output a warning message when running a unibyte session. * mule.texi (Enabling Multibyte): * cmdargs.texi (General Variables): Remove EMACS_UNIBYTE. (Initial Options): Remove --(no-)multibyte, --(no-)unibyte. --- doc/emacs/ChangeLog | 6 ++++++ doc/emacs/cmdargs.texi | 27 --------------------------- doc/emacs/mule.texi | 18 ++++-------------- etc/ChangeLog | 4 ++++ etc/NEWS | 6 ++++++ lisp/disp-table.el | 18 +++++++----------- src/ChangeLog | 7 +++++++ src/emacs.c | 7 +++---- 8 files changed, 37 insertions(+), 56 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index aa6d942d8c7..ce6f6c5ff12 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,9 @@ +2009-08-29 Stefan Monnier + + * mule.texi (Enabling Multibyte): + * cmdargs.texi (General Variables): Remove EMACS_UNIBYTE. + (Initial Options): Remove --(no-)multibyte, --(no-)unibyte. + 2009-08-20 Glenn Morris * cal-xtra.texi (Non-Gregorian Diary): Mention ``Adar I'' special case. diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi index 1438c19c123..ca153a7e57c 100644 --- a/doc/emacs/cmdargs.texi +++ b/doc/emacs/cmdargs.texi @@ -333,27 +333,6 @@ Enable the Emacs Lisp debugger for errors in the init file. @xref{Error Debugging,, Entering the Debugger on an Error, elisp, The GNU Emacs Lisp Reference Manual}. -@item --unibyte -@opindex --unibyte -@itemx --no-multibyte -@opindex --no-multibyte -@cindex unibyte operation, command-line argument -Do almost everything with single-byte buffers and strings. -All buffers and strings are unibyte unless you (or a Lisp program) -explicitly ask for a multibyte buffer or string. (Note that Emacs -always loads Lisp files in multibyte mode, even if @samp{--unibyte} is -specified; see @ref{Enabling Multibyte}.) Setting the environment -variable @env{EMACS_UNIBYTE} has the same effect -(@pxref{General Variables}). - -@item --multibyte -@opindex --multibyte -@itemx --no-unibyte -@opindex --no-unibyte -Inhibit the effect of @env{EMACS_UNIBYTE}, so that Emacs -uses multibyte characters by default, as usual. -@end table - @node Command Example @appendixsec Command Argument Example @@ -479,12 +458,6 @@ variables to be set, but it uses their values if they are set. @item CDPATH Used by the @code{cd} command to search for the directory you specify, when you specify a relative directory name. -@item EMACS_UNIBYTE -@cindex unibyte operation, environment variable -Defining this environment variable with a nonempty value directs Emacs -to do almost everything with single-byte buffers and strings. It is -equivalent to using the @samp{--unibyte} command-line option on each -invocation. @xref{Initial Options}. @item EMACSDATA Directory for the architecture-independent files that come with Emacs. This is used to initialize the Lisp variable @code{data-directory}. diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index 663011d6f32..c630ba48e63 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi @@ -249,8 +249,8 @@ limitations. @cindex turn multibyte support on or off Under very special circumstances, you may want to disable multibyte -character support, either for Emacs as a whole, or for a single -buffer. When multibyte characters are disabled in a buffer, we call +character support, for a specific buffer. +When multibyte characters are disabled in a buffer, we call that @dfn{unibyte mode}. In unibyte mode, each character in the buffer has a character code ranging from 0 through 255 (0377 octal); 0 through 127 (0177 octal) represent @acronym{ASCII} characters, and 128 @@ -268,22 +268,12 @@ Coding}. Unlike @code{find-file-literally}, finding a file as @samp{raw-text} doesn't disable format conversion, uncompression, or auto mode selection. -@vindex enable-multibyte-characters -@cindex environment variables, and non-@acronym{ASCII} characters - To turn off multibyte character support by default, start Emacs with -the @samp{--unibyte} option (@pxref{Initial Options}), or set the -environment variable @env{EMACS_UNIBYTE}. -With @samp{--unibyte}, multibyte strings are not created during -initialization from the values of environment variables, -@file{/etc/passwd} entries etc., even if those contain -non-@acronym{ASCII} characters. - @cindex Lisp files, and multibyte operation @cindex multibyte operation, and Lisp files @cindex unibyte operation, and Lisp files @cindex init file, and non-@acronym{ASCII} characters - Emacs normally loads Lisp files as multibyte, regardless of whether -you used @samp{--unibyte}. This includes the Emacs initialization + Emacs normally loads Lisp files as multibyte. +This includes the Emacs initialization file, @file{.emacs}, and the initialization files of Emacs packages such as Gnus. However, you can specify unibyte loading for a particular Lisp file, by putting @w{@samp{-*-unibyte: t;-*-}} in a diff --git a/etc/ChangeLog b/etc/ChangeLog index cf76ac758bd..d1519949ff0 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog @@ -1,3 +1,7 @@ +2009-08-29 Stefan Monnier + + * NEWS: Declare unibyte sessions obsolete. + 2009-08-28 Michael Albinus * NEWS: Mention Tramp connection method "rsyncc" and variable diff --git a/etc/NEWS b/etc/NEWS index 7344e711482..042694fae70 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -34,6 +34,12 @@ This might not work on all platforms. * Changes in Emacs 23.2 +** Unibyte sessions are declared obsolete. +I.e. the use of the environment variable EMACS_UNIBYTE, or command line +arguments --unibyte, --multibyte, --no-multibyte, and --no-unibyte +is deprecated. Similarly for custom-izing enable-multibyte-characters, or +setting default-enable-multibyte-characters. + ** The default value of `trash-directory' has changed to nil, which means that `move-file-to-trash' trashes files according to freedesktop.org specifications, the same method used by the Gnome, diff --git a/lisp/disp-table.el b/lisp/disp-table.el index 78a2e6b7755..91dc4a7fd34 100644 --- a/lisp/disp-table.el +++ b/lisp/disp-table.el @@ -216,14 +216,11 @@ X frame." (defun standard-display-european (arg) "Semi-obsolete way to toggle display of ISO 8859 European characters. -This function is semi-obsolete; if you want to do your editing with -unibyte characters, it is better to `set-language-environment' coupled -with either the `--unibyte' option or the EMACS_UNIBYTE environment -variable, or else customize `enable-multibyte-characters'. +This function is semi-obsolete; you probably don't need it, or else you +probably should use `set-language-environment' or `set-locale-environment'. -With prefix argument, this command enables European character display -if ARG is positive, disables it otherwise. Otherwise, it toggles -European character display. +This function enables European character display if ARG is positive, +disables it if negative. Otherwise, it toggles European character display. When this mode is enabled, characters in the range of 160 to 255 display not as octal escapes, but as accented characters. Codes 146 @@ -231,10 +228,9 @@ and 160 display as apostrophe and space, even though they are not the ASCII codes for apostrophe and space. Enabling European character display with this command noninteractively -from Lisp code also selects Latin-1 as the language environment, and -selects unibyte mode for all Emacs buffers \(both existing buffers and -those created subsequently). This provides increased compatibility -for users who call this function in `.emacs'." +from Lisp code also selects Latin-1 as the language environment. +This provides increased compatibility for users who call this function +in `.emacs'." (if (or (<= (prefix-numeric-value arg) 0) (and (null arg) diff --git a/src/ChangeLog b/src/ChangeLog index 64aebb22725..a5c20814b3f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2009-08-29 Stefan Monnier + + * emacs.c (USAGE1): Remove --(no-)multibyte, --(no-)unibyte. + (main): Use enable-multibyte-characters rather than + default-enable-multibyte-characters. Output a warning message when + running a unibyte session. + 2009-08-28 YAMAMOTO Mitsuharu * unexmacosx.c (print_load_command_name) [LC_DYLD_INFO]: Add cases diff --git a/src/emacs.c b/src/emacs.c index 494fb209459..2c14be5208e 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -271,7 +271,6 @@ Initialization options:\n\ --daemon start a server in the background\n\ --debug-init enable Emacs Lisp debugger for init file\n\ --display, -d DISPLAY use X server DISPLAY\n\ ---multibyte, --no-unibyte inhibit the effect of EMACS_UNIBYTE\n\ --no-desktop do not load a saved desktop\n\ --no-init-file, -q load neither ~/.emacs nor default.el\n\ --no-shared-memory, -nl do not use shared memory\n\ @@ -281,7 +280,6 @@ Initialization options:\n\ --quick, -Q equivalent to -q --no-site-file --no-splash\n\ --script FILE run FILE as an Emacs Lisp script\n\ --terminal, -t DEVICE use DEVICE for terminal I/O\n\ ---unibyte, --no-multibyte run Emacs in unibyte mode\n\ --user, -u USER load ~USER/.emacs instead of your own\n\ \n%s" @@ -1439,8 +1437,8 @@ main (int argc, char **argv) Lisp_Object old_log_max; Lisp_Object symbol, tail; - symbol = intern ("default-enable-multibyte-characters"); - Fset (symbol, Qnil); + symbol = intern ("enable-multibyte-characters"); + Fset_default (symbol, Qnil); if (initialized) { @@ -1467,6 +1465,7 @@ main (int argc, char **argv) set_buffer_temp (current); } } + message ("Warning: unibyte sessions are obsolete and will disappear"); } } -- 2.39.2