all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Reuben Thomas <rrt@sc3d.org>
To: emacs-pretest-bug@gnu.org
Subject: bug#2910: 23.0.60; Shell-script coloring bug
Date: Mon, 6 Apr 2009 22:46:30 +0100 (BST)	[thread overview]
Message-ID: <alpine.DEB.2.00.0904062245360.2553@mord.config> (raw)

In shell-script mode (at least for Shell-script[sh]), in the following line:

for i do

the token “do” is not colored as a keyword, which it should be. From
the relevant POSIX documentation:

http://www.opengroup.org/onlinepubs/000095399/utilities/xcu_chap02.html#tag_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 “in” clause is used, as the
“word” list mentioned above must end in a semicolon.

Hence, two things seem to need fixing:

1. In Shell-script[sh,bash] modes, “for name do” should color “do” as
    a keyword.

2. In Shell-script[sh], “for name; do” should *not* color “do” 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.10600000
configured using `configure  '--build' 'i486-linux-gnu' '--host' 
'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' 
'--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info' 
'--mandir=/usr/share/man' '--with-pop=yes' 
'--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.0.60/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.0.60/site-lisp:/usr/share/emacs/site-lisp' 
'--with-x=yes' '--with-x-toolkit=gtk' 'build_alias=i486-linux-gnu' 
'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 
-g -O2' 'LDFLAGS=-g -Wl,--as-needed' 'CPPFLAGS=''

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

-- 
http://rrt.sc3d.org/ | impatience, n.  the urge to do nothing
Listening to: 'Sanctus and Benedictus' from 'Mass of the Children and other
sacred music' (The Cambridge Singers / John Rutter)






             reply	other threads:[~2009-04-06 21:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-06 21:46 Reuben Thomas [this message]
2009-04-09  6:21 ` bug#2910: 23.0.60; Shell-script coloring bug Glenn Morris
2009-04-09 11:06   ` Reuben Thomas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.00.0904062245360.2553@mord.config \
    --to=rrt@sc3d.org \
    --cc=2910@emacsbugs.donarmstrong.com \
    --cc=emacs-pretest-bug@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.