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: David Kastrup
Subject: Re: Better language detection for tutorial
Date: Sun, 22 Jul 2007 17:44:24 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux)

Andreas Schwab <address@hidden> writes:

> 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.

pop is a Lisp macro in `subr.el'.
(pop LISTNAME)

Return the first element of LISTNAME's value, and remove it from the list.
LISTNAME must be a symbol whose value is a list.
If the value is nil, `pop' returns nil but does not actually
change the list.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum




reply via email to

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