all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Thomas Gambier <thomas_gambier@sdesigns.eu>
To: "Andreas Röhler" <andreas.roehler@easy-emacs.de>,
	"Stefan Monnier" <monnier@iro.umontreal.ca>
Cc: help-gnu-emacs@gnu.org
Subject: Re: sh-script.el : don't colorize $(( 4 << 2 )) as here-document
Date: Tue, 24 Nov 2009 10:32:56 +0100	[thread overview]
Message-ID: <4B0BA848.3070608@sdesigns.eu> (raw)
In-Reply-To: <4B083F04.1090707@easy-emacs.de>

Hi,

Andreas Röhler 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 inside
>
> 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...
>
>
>   

It worked here except I had to change the variable name 
"sh-here-document-word" because it was used as the word to insert after 
typing <<. I will use this for now.

Thanks a lot.


Stefan Monnier wrote:
>> when I'm writing something like this in bash script value=$(( 4 << 2 )),
>> Emacs keep thinking it's the beginning of here-document and will colorize in
>> yellow all the code below this expression.
>>     
>
> Ever heard of M-x report-emacs-bug?
>
>   
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 
in next version of sh-script.el

Regards.

Thomas.




  reply	other threads:[~2009-11-24  9:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-20  9:40 sh-script.el : don't colorize $(( 4 << 2 )) as here-document Thomas Gambier
2009-11-21 17:27 ` Andreas Röhler
2009-11-21 17:38   ` Lennart Borgman
2009-11-21 19:27     ` Andreas Röhler
2009-11-24  9:32       ` Thomas Gambier [this message]
     [not found] <mailman.11231.1258815847.2239.help-gnu-emacs@gnu.org>
2009-11-24  2:51 ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2009-11-19 17:18 Thomas Gambier

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

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

  git send-email \
    --in-reply-to=4B0BA848.3070608@sdesigns.eu \
    --to=thomas_gambier@sdesigns.eu \
    --cc=andreas.roehler@easy-emacs.de \
    --cc=help-gnu-emacs@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.