unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Richard M. Stallman" <rms@gnu.org>
Subject: [jerome@marant.org: [sh-script] Erroneous syntax highlighting of "[[ ]]" expressions with zsh]
Date: Sun, 11 Dec 2005 17:57:16 -0500	[thread overview]
Message-ID: <E1Ela84-0007pm-NU@fencepost.gnu.org> (raw)

Since the Font Lock facilities are limited, it may be impossible to
handle these cases right.  But could someone who understands Font Lock
please try?


------- Start of forwarded message -------
To: bug-gnu-emacs@gnu.org
Date: Sun, 11 Dec 2005 15:38:47 +0100 (CET)
From: jerome@marant.org (jerome)
Subject: [sh-script] Erroneous syntax highlighting of "[[ ]]" expressions
	with zsh
Sender: bug-gnu-emacs-bounces+rms=gnu.org@gnu.org
X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on monty-python
X-Spam-Level: 
X-Spam-Status: No, hits=0.1 required=5.0 tests=RCVD_IN_SORBS autolearn=no 
	version=2.63

This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.4.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2005-10-04 on athlon, modified by Debian
configured using `configure '--build=x86_64-linux-gnu' '--host=x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--with-x=yes' '--with-x-toolkit=athena' 'CFLAGS=-DDEBIAN -g -O2' 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu''
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: fr_FR.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

This is Debian bug #335712 (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=335712)

Thanks in advance.

- ----------------------------

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).

- ----------------------------

It seems that bash makes the ";" mandatory after "]]" while zsh does
not.


Recent input:
s SPC i n SPC a d v a n c e . <return> <return> C h 
e e r s , <down-mouse-1> <mouse-1> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <down-mouse-1> 
<mouse-1> SPC D a n i e l <down-mouse-1> <mouse-1> 
<backspace> ? C-c C-c , i M-u q g <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
SPC SPC q <help-echo> <help-echo> M-x C-h C-g C-g C-g 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <menu-bar> <help-menu> <re
port-emacs-bug>

Recent messages:
Checking new news...done
Retrieving newsgroup: emacs-devel...
Fetching headers for emacs-devel...done
Suppressing duplicates...done
Generating summary...done
No more unread newsgroups
Auto-saving...
call-interactively: Quit
keyboard-quit: Quit
Loading emacsbug...done


_______________________________________________
Bug-gnu-emacs mailing list
Bug-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs
------- End of forwarded message -------

                 reply	other threads:[~2005-12-11 22:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=E1Ela84-0007pm-NU@fencepost.gnu.org \
    --to=rms@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).