From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#11946: syntax highlighting error in sh-mode Date: Tue, 17 Jul 2012 04:38:54 -0400 Message-ID: References: <874np8hhwc.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1342514418 20020 80.91.229.3 (17 Jul 2012 08:40:18 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 17 Jul 2012 08:40:18 +0000 (UTC) Cc: 11946-done@debbugs.gnu.org To: Thierry Volpiatto Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 17 10:40:17 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Sr3KH-0005We-Hf for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Jul 2012 10:40:13 +0200 Original-Received: from localhost ([::1]:50252 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sr3KG-0007M1-Sj for geb-bug-gnu-emacs@m.gmane.org; Tue, 17 Jul 2012 04:40:12 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60032) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sr3KE-0007Kh-R3 for bug-gnu-emacs@gnu.org; Tue, 17 Jul 2012 04:40:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Sr3K8-0005Bo-U7 for bug-gnu-emacs@gnu.org; Tue, 17 Jul 2012 04:40:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35682) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Sr3K8-0005BK-Pi for bug-gnu-emacs@gnu.org; Tue, 17 Jul 2012 04:40:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Sr3Pv-0007Lr-2m for bug-gnu-emacs@gnu.org; Tue, 17 Jul 2012 04:46:03 -0400 Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Tue, 17 Jul 2012 08:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 11946 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 11946@debbugs.gnu.org, monnier@IRO.UMontreal.CA Original-Received: via spool by 11946-done@debbugs.gnu.org id=D11946.134251470828192 (code D ref 11946); Tue, 17 Jul 2012 08:46:02 +0000 Original-Received: (at 11946-done) by debbugs.gnu.org; 17 Jul 2012 08:45:08 +0000 Original-Received: from localhost ([127.0.0.1]:45226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sr3P1-0007Ke-Hn for submit@debbugs.gnu.org; Tue, 17 Jul 2012 04:45:08 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]:43280) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sr3Or-0007Jt-So for 11946-done@debbugs.gnu.org; Tue, 17 Jul 2012 04:45:01 -0400 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q6H8ctDH008414; Tue, 17 Jul 2012 04:38:56 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 8BE67AE508; Tue, 17 Jul 2012 04:38:54 -0400 (EDT) In-Reply-To: <874np8hhwc.fsf@gmail.com> (Thierry Volpiatto's message of "Sun, 15 Jul 2012 22:46:27 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4281=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4281> : streams <786061> : uri <1167396> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:62033 Archived-At: > 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.