[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Better language detection for tutorial (was: set-locale-environement
From: |
Andreas Schwab |
Subject: |
Re: Better language detection for tutorial (was: set-locale-environement: strange default detection) |
Date: |
Sun, 22 Jul 2007 17:41:31 +0200 |
User-agent: |
Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (gnu/linux) |
Sascha Wilde <address@hidden> writes:
> + (defun tutorial-get-language ()
> + "Use LC_ALL, LC_MESSAGES, LANG in turn to determine language to use.
> + This is more reliable then current-language-environment, which is not
than `...'
> + intended to chose the language used for messages and documentation."
choose
> + (let (locale (vars '("LC_ALL" "LC_MESSAGES" "LANG")))
> + (while (and vars
> + (= 0 (length locale))) ; nil or empty string
zerop or (= (length locale) 0)
> + (setq locale (getenv (pop vars))))
pop is a macro in cl.
> + (if (< 0 (length locale))
(> (length locale) 0)
Andreas.
--
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
- Re: set-locale-environement: strange default detection, (continued)
- Re: set-locale-environement: strange default detection, Reiner Steib, 2007/07/18
- Re: set-locale-environement: strange default detection, David Kastrup, 2007/07/18
- Re: set-locale-environement: strange default detection, Sascha Wilde, 2007/07/19
- Re: set-locale-environement: strange default detection, David Kastrup, 2007/07/19
- Better language detection for tutorial (was: set-locale-environement: strange default detection), Sascha Wilde, 2007/07/22
- Re: Better language detection for tutorial (was: set-locale-environement: strange default detection),
Andreas Schwab <=
- Re: Better language detection for tutorial, David Kastrup, 2007/07/22
- Re: Better language detection for tutorial, Andreas Schwab, 2007/07/22
- Re: Better language detection for tutorial, Sascha Wilde, 2007/07/22
- Re: Better language detection for tutorial, Eli Zaretskii, 2007/07/22
- Re: Better language detection for tutorial, Sascha Wilde, 2007/07/23
- Re: Better language detection for tutorial, Eli Zaretskii, 2007/07/23
- Re: Better language detection for tutorial, Sascha Wilde, 2007/07/23
- Re: Better language detection for tutorial, David Kastrup, 2007/07/23
- Re: Better language detection for tutorial, Eli Zaretskii, 2007/07/24
- Re: Better language detection for tutorial, Kenichi Handa, 2007/07/24