bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#8632: 23.2; shell-script[bash] doesn't handle bitshift $(( 1 << 16 )


From: Stefan Monnier
Subject: bug#8632: 23.2; shell-script[bash] doesn't handle bitshift $(( 1 << 16 ))
Date: Fri, 13 May 2011 16:12:54 -0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

> In shell-script mode (bash minor mode) Emacs 23.2 incorrectly parses the
> following line as a HERE DOCUMENT.

>       echo $(( 1 << 16 ))

> It is confused because sh-font-lock-open-heredoc (in sh-script.el)
> does not know about bash's ARITHMETIC EXPANSION.

Indeed, thanks for spotting this.

> There should be a function, similar to sh-in-comment-or-string, which
> parses the script looking for arithmetic expansion.

I guess the way to do it would be to try to handle $(( as
a string-opener in sh-syntax-propertize-function and then write
code to jump to the matching )) to mark it as the string-closer.

Patch welcome,


        Stefan





reply via email to

[Prev in Thread] Current Thread [Next in Thread]