emacs-devel
[Top][All Lists]
Advanced

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

Re: Better language detection for tutorial


From: Eli Zaretskii
Subject: Re: Better language detection for tutorial
Date: Mon, 23 Jul 2007 22:29:12 +0300

> Cc: address@hidden, address@hidden, address@hidden
> From: Sascha Wilde <address@hidden>
> Date: Mon, 23 Jul 2007 11:25:56 +0200
> 
> Eli Zaretskii <address@hidden> wrote:
> >> From: Sascha Wilde <address@hidden>
> >> 
> >> !                    (or (tutorial-get-language)
> >> !                 (if (get-language-info current-language-environment 
> >> 'tutorial)
> >> !                     current-language-environment
> >> !                   "English"))))
> >
> > I think this is in wrong order: the `tutorial' property of the
> > language environment should have higher priority than what the new
> > function `tutorial-get-language' returns.
> 
> I highly doubt that, for all my tests (more complex locale setups,
> that is) the tutorial property of the language environment yields
> an unexpected (IMO wrong) language.

Please tell the details, then.  It's hard to argue with unspecified
results of unnamed tests.  Perhaps some of the values of the tutorial
property are simply wrong and need to be fixed.

In general, the tutorial property of the language environment should
be more accurate, since it is specific to Emacs, and specific to the
situation (i.e., reading the tutorial).  By contrast, the locale
environment variables are general and not limited to Emacs, so they
might be wrong for Emacs where general needs conflict with Emacs
tutorial needs.

> I haven't checked where and how it is set, but it seems to
> ignore/misinterpret the LC environment, too.

If by ``it'' you mean the tutorial property, then it does not depend
on any environment variables, it is set explicitly in the language
data base used by Emacs.  Here's an example:

    (set-language-info-alist
     "Brazilian Portuguese" '((tutorial . "TUTORIAL.pt_BR")
                (charset ascii latin-iso8859-1)
                (coding-system iso-latin-1 iso-latin-9)
                (coding-priority iso-latin-1)
                (nonascii-translation . latin-iso8859-1)
                (unibyte-syntax . "latin-1")
                (unibyte-display . iso-latin-1)
                (input-method . "latin-1-prefix")
                (sample-text . "Oi")
                (documentation . "Support for Brazilian Portuguese."))
     '("European"))

See lisp/language/*.el for more examples.




reply via email to

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