From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reuben Thomas Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#2910: 23.0.60; Shell-script coloring bug Date: Mon, 6 Apr 2009 22:46:30 +0100 (BST) Message-ID: Reply-To: Reuben Thomas , 2910@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1239055662 2639 80.91.229.12 (6 Apr 2009 22:07:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 6 Apr 2009 22:07:42 +0000 (UTC) To: emacs-pretest-bug@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 07 00:09:00 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LqwwY-00076s-5n for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Apr 2009 00:05:46 +0200 Original-Received: from localhost ([127.0.0.1]:58758 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LqwvA-0005HY-0k for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Apr 2009 18:04:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lqwv5-0005Dr-OD for bug-gnu-emacs@gnu.org; Mon, 06 Apr 2009 18:03:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lqwv1-0005C1-6O for bug-gnu-emacs@gnu.org; Mon, 06 Apr 2009 18:03:55 -0400 Original-Received: from [199.232.76.173] (port=35562 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lqwv0-0005Bv-V6 for bug-gnu-emacs@gnu.org; Mon, 06 Apr 2009 18:03:50 -0400 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:39284) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Lqwv0-00082v-8C for bug-gnu-emacs@gnu.org; Mon, 06 Apr 2009 18:03:50 -0400 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n36M3mXW025769; Mon, 6 Apr 2009 15:03:48 -0700 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n36M02f0024498; Mon, 6 Apr 2009 15:00:02 -0700 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Reuben Thomas Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs Resent-Date: Mon, 06 Apr 2009 22:00:02 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 2910 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123905475122991 (code B ref -1); Mon, 06 Apr 2009 22:00:02 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 6 Apr 2009 21:52:31 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n36LqRKX022985 for ; Mon, 6 Apr 2009 14:52:28 -0700 Original-Received: from mail.gnu.org ([199.232.76.166]:32854 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1Lqwjy-0001Ss-QY for emacs-pretest-bug@gnu.org; Mon, 06 Apr 2009 17:52:26 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1Lqwjw-0006er-8e for emacs-pretest-bug@gnu.org; Mon, 06 Apr 2009 17:52:26 -0400 Original-Received: from exprod7og111.obsmtp.com ([64.18.2.175]:37611) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1Lqwjv-0006eh-SZ for emacs-pretest-bug@gnu.org; Mon, 06 Apr 2009 17:52:24 -0400 Original-Received: from source ([209.85.219.161]) by exprod7ob111.postini.com ([64.18.6.12]) with SMTP ID DSNKSdp5lmrWsnEUoEyRhUfoTsH/ouzS38Jc@postini.com; Mon, 06 Apr 2009 14:52:23 PDT Original-Received: by ewy5 with SMTP id 5so1946394ewy.15 for ; Mon, 06 Apr 2009 14:52:21 -0700 (PDT) Original-Received: by 10.216.7.212 with SMTP id 62mr1324377wep.92.1239054392589; Mon, 06 Apr 2009 14:46:32 -0700 (PDT) Original-Received: from mord.local (78-105-4-25.zone3.bethere.co.uk [78.105.4.25]) by mx.google.com with ESMTPS id u14sm13037667gvf.19.2009.04.06.14.46.31 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 06 Apr 2009 14:46:32 -0700 (PDT) User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-MIME-Autoconverted: from 8bit to quoted-printable by rzlab.ucr.edu id n36M3mXW025769 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Mon, 06 Apr 2009 18:03:55 -0400 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:26944 gmane.emacs.pretest.bugs:24240 Archived-At: In shell-script mode (at least for Shell-script[sh]), in the following li= ne: for i do the token =E2=80=9Cdo=E2=80=9D is not colored as a keyword, which it shou= ld be. From the relevant POSIX documentation: http://www.opengroup.org/onlinepubs/000095399/utilities/xcu_chap02.html#t= ag_02 The format for the for loop is as follows: for name [ in [word ... ]]do compound-list done Note that there is no explicit mention of semi-colons (this appears to be the issue, as if the line is changed to for i; do then it is colored correctly, although in fact this syntax is NOT permitted by POSIX, although bash accepts it.) A semi-colon is only needed (and indeed, rqeuired) when an =E2=80=9Cin=E2=80=9D clause is used= , as the =E2=80=9Cword=E2=80=9D list mentioned above must end in a semicolon. Hence, two things seem to need fixing: 1. In Shell-script[sh,bash] modes, =E2=80=9Cfor name do=E2=80=9D should c= olor =E2=80=9Cdo=E2=80=9D as a keyword. 2. In Shell-script[sh], =E2=80=9Cfor name; do=E2=80=9D should *not* color= =E2=80=9Cdo=E2=80=9D as a keyword. In GNU Emacs 23.0.60.1 (i486-pc-linux-gnu, GTK+ Version 2.14.3) of 2008-10-13 on rothera, modified by Debian (emacs-snapshot package, version 1:20081013-1) Windowing system distributor `The X.Org Foundation', version 11.0.1060000= 0 configured using `configure '--build' 'i486-linux-gnu' '--host'=20 'i486-linux-gnu' '--prefix=3D/usr' '--sharedstatedir=3D/var/lib'=20 '--libexecdir=3D/usr/lib' '--localstatedir=3D/var' '--infodir=3D/usr/shar= e/info'=20 '--mandir=3D/usr/share/man' '--with-pop=3Dyes'=20 '--enable-locallisppath=3D/etc/emacs-snapshot:/etc/emacs:/usr/local/share= /emacs/23.0.60/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emac= s/23.0.60/site-lisp:/usr/share/emacs/site-lisp'=20 '--with-x=3Dyes' '--with-x-toolkit=3Dgtk' 'build_alias=3Di486-linux-gnu'=20 'host_alias=3Di486-linux-gnu' 'CFLAGS=3D-DDEBIAN -DSITELOAD_PURESIZE_EXTR= A=3D5000=20 -g -O2' 'LDFLAGS=3D-g -Wl,--as-needed' 'CPPFLAGS=3D'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_GB.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t --=20 http://rrt.sc3d.org/ | impatience, n. the urge to do nothing Listening to: 'Sanctus and Benedictus' from 'Mass of the Children and oth= er sacred music' (The Cambridge Singers / John Rutter)