Subject: Re: bug#11946: syntax highlighting error in sh-mode

From: Thierry Volpiatto <[email-masked]>
Date: Tue, 17 Jul 2012 12:21:36 +0200

Hi Stefan,

Stefan Monnier <[email-masked]> writes:

> Thanks, installed the patch below in trunk to fix this problem.

Thanks, it fix the problem but not fully; when I edit in the buffer the
coloration is ok, but if I kill buffer and reopen it the line:

VERSION[${#VERSION[*]}]=$i

is Ok, but this one:

LEN=${#BIN[@]}

is not now (i.e colorized as a comment after #)

and then if I edit this line

LEN=${#BIN[@]}

the one above:

VERSION[${#VERSION[*]}]=$i

look as a comment after #.

If I edit it (e.g remove '}' and put it back), the color becomes correct
(i.e no comment color)

Here the full snippet of code if you want to reproduce:

--8<---------------cut here---------------start------------->8---
LEN=${#BIN[@]}

N=1
declare -a VERSION
for i in $(ls "$PREFIX/sbin") ; do
    echo -e $N')' $i
    VERSION[${#VERSION[*]}]=$i
    N=$(($N + 1))
done
--8<---------------cut here---------------end--------------->8---

I can send you the full file if you want.

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997