emacs-devel
[Top][All Lists]
Advanced

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

Re: per-buffer language environments


From: Eli Zaretskii
Subject: Re: per-buffer language environments
Date: Mon, 13 Dec 2010 13:47:31 +0200

> From: Kenichi Handa <address@hidden>
> Cc: address@hidden, address@hidden
> Date: Mon, 13 Dec 2010 16:56:08 +0900
> 
> In article <address@hidden>, Werner LEMBERG <address@hidden> writes:
> > > But font selection is just one part of the language environment.  Are
> > > there any other aspects of the language environment that would make
> > > sense to have on per-buffer basis?
> 
> > For CJK language environments, I'm not aware of other aspects, but
> > probably Ken'ichi-san knows more.
> 
> * Which input method to turn on by C-\.
> 
> * Which coding system to use on writing when the current
>   buffer contains a character that can't be encoded by
>   buffer-file-coding-system.
> 
> * Which coding systems have higher priority when inserting a
>   file in the current buffer.

I could understand how the font selection and the default input method
are related to the language, but what do encodings have to do with
that?  The preferred encoding is generally an attribute of a locale,
not of a language.  The fact that we mix them is because Emacs had
language environments before it had locale environments.

It's high time to make the distinction, IMO.  The language environment
should be derived from the language(s) of the text we are editing, and
is internal to Emacs, in the sense that it is defined by internal
Emacs logic for its purposes.  The locale environment is derived from
the environment outside Emacs, and expresses the preferences of the
outside world.

> * The locale of the program invoked by shell-command-on-region.

This is _definitely_ not related to the language.  It may be the case
that to force an external program DTRT for a certain language, you
need to set some LC_* variable in the environment of that program, but
that's an implementation detail, IMO.




reply via email to

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