From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thomas Gambier Newsgroups: gmane.emacs.help Subject: Re: sh-script.el : don't colorize $(( 4 << 2 )) as here-document Date: Tue, 24 Nov 2009 10:32:56 +0100 Message-ID: <4B0BA848.3070608@sdesigns.eu> References: <4B06640D.2060206@sdesigns.eu> <4B0822F8.4070909@easy-emacs.de> <4B083F04.1090707@easy-emacs.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1259055303 26072 80.91.229.12 (24 Nov 2009 09:35:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Nov 2009 09:35:03 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: =?UTF-8?B?QW5kcmVhcyBSw7ZobGVy?= , Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Nov 24 10:34:57 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NCrnV-0006Hs-33 for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Nov 2009 10:34:57 +0100 Original-Received: from localhost ([127.0.0.1]:36770 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NCrnU-0004Y7-Jd for geh-help-gnu-emacs@m.gmane.org; Tue, 24 Nov 2009 04:34:56 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NCrlf-0002SE-L9 for help-gnu-emacs@gnu.org; Tue, 24 Nov 2009 04:33:03 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NCrle-0002Qf-Is for help-gnu-emacs@gnu.org; Tue, 24 Nov 2009 04:33:03 -0500 Original-Received: from [199.232.76.173] (port=50600 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NCrle-0002QN-94 for help-gnu-emacs@gnu.org; Tue, 24 Nov 2009 04:33:02 -0500 Original-Received: from a.mx.sdesigns.eu ([78.31.43.6]:50444) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1NCrld-0004uQ-VP for help-gnu-emacs@gnu.org; Tue, 24 Nov 2009 04:33:02 -0500 Original-Received: from [172.27.0.188] (murgen.france.sdesigns.com [172.27.0.188]) by mailhost.france.sdesigns.com (Postfix) with ESMTP id 51A5C100019; Tue, 24 Nov 2009 10:32:56 +0100 (CET) User-Agent: Thunderbird 2.0.0.23 (X11/20090817) In-Reply-To: <4B083F04.1090707@easy-emacs.de> X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:70078 Archived-At: Hi, Andreas R=C3=B6hler wrote: > > seems you got me. :-) > Thanks. > Preceding whitespaces resp. tabs are permitted by "-" in "<<-", so it's= not possible to exclude it. > > Well, the only clean solution I see is based on a check if "<<" is insi= de > > a command like $(( 4 << 2 )) > > BTW, how it's called in english? > > Beside of writing such a check and include it into sh-script.el > a quick and dirty solution might be > > (setq sh-here-doc-open-re (concat "<<-?\\s-" sh-here-document-word)) > > Then only customized `sh-here-document-word' will be > accepted with some whitespace before, nothing else. > > Works here... > > > =20 It worked here except I had to change the variable name=20 "sh-here-document-word" because it was used as the word to insert after=20 typing <<. I will use this for now. Thanks a lot. Stefan Monnier wrote: >> when I'm writing something like this in bash script value=3D$(( 4 << 2= )), >> Emacs keep thinking it's the beginning of here-document and will color= ize in >> yellow all the code below this expression. >> =20 > > Ever heard of M-x report-emacs-bug? > > =20 You're right, I've just send a bug report using this function. So I'm happy with Andreas' solution and hopefully it will be corrected=20 in next version of sh-script.el Regards. Thomas.