Bug#335712: sh-script.el: coloring inconsistency with a zsh script

2005-12-11 Thread Jérôme Marant
Hi,

(Sorry for the late reply, again)

The then keyword is being colored differently because you forgot the
; after ]].

I don't know why the two x are colored differently though. Going
to ask upstream.

Regards,
-- 
Jérôme Marant



Bug#335712: sh-script.el: coloring inconsistency with a zsh script

2005-12-11 Thread Vincent Lefevre
On 2005-12-11 14:33:54 +0100, Jérôme Marant wrote:
 The then keyword is being colored differently because you forgot the
 ; after ]].

I didn't forget it since the ; is useless after ]]. [[ ... ]]
is a special syntax recognized by zsh, with its own rules (patterns
inside [[ ... ]] are handled differently and so on). But note that
this is not the case of [ ..., as [ is a normal command (though
also implemented as a builtin).

For instance:

prunille% if [[ a = a* ]] then
then echo OK
then fi
OK
prunille%

But:

prunille% if [ a = a* ] then
if [Ctrl-C]

Here the ; is necessary...

prunille% if [ a = a* ]; then
then echo OK
then fi
prunille%

And one can also see that OK is not written, unlike with [[ ... ]].

-- 
Vincent Lefèvre [EMAIL PROTECTED] - Web: http://www.vinc17.org/
100% accessible validated (X)HTML - Blog: http://www.vinc17.org/blog/
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#335712: sh-script.el: coloring inconsistency with a zsh script

2005-12-11 Thread Jérôme Marant
Vincent Lefevre [EMAIL PROTECTED] writes:

 On 2005-12-11 14:33:54 +0100, Jérôme Marant wrote:
 The then keyword is being colored differently because you forgot the
 ; after ]].

 I didn't forget it since the ; is useless after ]]. [[ ... ]]
 is a special syntax recognized by zsh, with its own rules (patterns
 inside [[ ... ]] are handled differently and so on). But note that
 this is not the case of [ ..., as [ is a normal command (though
 also implemented as a builtin).

It is not specific to zsh since bash supports it as well (man bash
documents it) but the difference is that zsh does not require the ;
after ]] which bash does.

I'm going to report it upstream. Thanks.

Regards,

-- 
Jérôme Marant



Bug#335712: sh-script.el: coloring inconsistency with a zsh script

2005-10-25 Thread Vincent Lefevre
Package: emacs21-el
Version: 21.4a-3
Severity: minor

Consider the following file

#!/bin/zsh
if [[ x == x ]] then
  echo OK
fi
if [[ x == x ]]; then
  echo OK
fi

opened in Shell-script[zsh] mode. The first then is not colored
(but the second one is).

Moreover, in the condition x == x, the first x is colored (this
is incorrect, IMHO), while the second one isn't (OK).

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.13.4-20051012
Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1)

Versions of packages emacs21-el depends on:
ii  emacs21-common21.4a-3The GNU Emacs editor's shared, arc

emacs21-el recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]