[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9183: js-mode highlights quotes inside regexp character sets as stri
bug#9183: js-mode highlights quotes inside regexp character sets as string
Sat, 06 Aug 2011 13:34:17 +0200
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)
On Fri, 05 Aug 2011 18:54:45 +0200
Stefan Monnier wrote:
>> js-mode erroneously highlights everything following `'' as a string.
>> Same problem with `"'.
> I installed the patch below which should fix this case and a few
Thanks, but it doesn't seem to fix anything, just mess things up in a
somewhat different way.
E.g., with the following in a JS buffer:
All of the first /[']/ is highlighted as a string, and everything from
the second single quote up to the third single quote is highlighted as a
(Just in case, I downloaded the fixed js.el and loaded that with my
oldish Emacs 24 (started as emacs -Q), but I don't think that should
> But I don't know how to solve it completely because I don't know
> from a /-regexp from a /-comment-starter in all cases:
> - is something like
> x = 1 + /a/.test("foo");
Yes, it's valid, although I suspect it would be considered bad style.
(BTW, in Debian there is a spidermonkey-bin package, which has minimal
dependencies and provides a `js' command, giving you a REPL.)
> If so, is there a list of infix operators somewhere?
I'd have to search for it just as you might have... There's this, for