GNU bug report logs - #11946
syntax highlighting error in sh-mode

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>

Date: Sun, 15 Jul 2012 20:53:02 UTC

Severity: normal

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Subject: bug#11946: closed (Re: bug#11946: syntax highlighting error in
 sh-mode)
Date: Tue, 17 Jul 2012 08:46:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#11946: syntax highlighting error in sh-mode 

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 11946 <at> debbugs.gnu.org.

-- 
11946: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=11946
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 11946-done <at> debbugs.gnu.org
Subject: Re: bug#11946: syntax highlighting error in sh-mode
Date: Tue, 17 Jul 2012 04:38:54 -0400
> Hi, the following after the "#" is taken as a comment, which is wrong:
> VERSION[${#VERSION[*]}]=$i

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


        Stefan


--- lisp/progmodes/sh-script.el	2012-07-10 11:51:54 +0000
+++ lisp/progmodes/sh-script.el	2012-07-17 08:19:01 +0000
@@ -1087,7 +1087,7 @@
     ;; metacharacters.  The list of special chars is taken from
     ;; the single-unix spec of the shell command language (under
     ;; `quoting') but with `$' removed.
-    ("[^|&;<>()`\\\"' \t\n]\\(#+\\)" (1 "_"))
+    ("\\(?:[^|&;<>()`\\\"' \t\n]\\|\\${\\)\\(#+\\)" (1 "_"))
     ;; In a '...' the backslash is not escaping.
     ("\\(\\\\\\)'" (1 (sh-font-lock-backslash-quote)))
     ;; Make sure $@ and $? are correctly recognized as sexps.


[Message part 3 (message/rfc822, inline)]
From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: syntax highlighting error in sh-mode 
Date: Sun, 15 Jul 2012 22:46:27 +0200
Hi, the following after the "#" is taken as a comment, which is wrong:

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

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




This bug report was last modified 12 years and 338 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.