From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10127 invoked by alias); 7 Jan 2012 06:59:30 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 30098 Received: (qmail 14465 invoked from network); 7 Jan 2012 06:59:17 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-101.9 required=5.0 tests=BAYES_00,USER_IN_WHITELIST autolearn=unavailable version=3.3.2 Resent-From: Geoff Wing Resent-Date: Sat, 7 Jan 2012 17:59:17 +1100 Resent-Message-ID: <20120107065917.GA9503@primenet.com.au> Resent-To: Zsh Hackers Received-SPF: pass (ns1.primenet.com.au: SPF record at spf01.biglobe.ne.jp designates 133.205.19.70 as permitted sender) X-Biglobe-Sender: Content-Type: text/plain; charset=iso-2022-jp Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: PATCH: Restore `LC_ALL' when setting `LANG' From: "Jun T." In-Reply-To: <20120104173017.3b10a803@pws-pc.ntlworld.com> Date: Fri, 6 Jan 2012 15:03:54 +0900 Content-Transfer-Encoding: 7bit Message-Id: <1490C10C-33CA-4A1F-8579-066B77773A40@kba.biglobe.ne.jp> References: <20120102132718.GA12143@gatsby.mbjnet.dk> <87fwfyb2if.fsf@ft.bewatermyfriend.org> <20120102154714.GA20663@gatsby.mbjnet.dk> <87wr9a9ely.fsf@ft.bewatermyfriend.org> <20120103111049.GA5673@gatsby.mbjnet.dk> <87sjjw98yl.fsf@ft.bewatermyfriend.org> <87k458974e.fsf@ft.bewatermyfriend.org> <2012-01-03T15-59-18@devnull.michael-prokop.at> <87boqk95we.fsf@ft.bewatermyfriend.org> <87y5to7qob.fsf@ft.bewatermyfriend.org> <20120104021641.GD4513@xvii.vinc17.org> <20120104173017.3b10a803@pws-pc.ntlworld.com> To: zsh-workers@zsh.org X-Mailer: Apple Mail (2.1084) Instead of adding LC_ALL to lc_names[], I think it better not calling setlocale() at all if LC_ALL is non-empty. Index: Src/params.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/params.c,v retrieving revision 1.175 diff -u -r1.175 params.c --- Src/params.c 11 Aug 2011 19:32:50 -0000 1.175 +++ Src/params.c 6 Jan 2012 05:42:12 -0000 @@ -3788,6 +3788,10 @@ setlang(char *x) { struct localename *ln; + char *x2; + + if ((x2 = getsparam("LC_ALL")) && *x2) + return; /* * Set the global locale to the value passed, but override