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

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

bug#25529: diagnosis and one approach to a fix


From: Tom Tromey
Subject: bug#25529: diagnosis and one approach to a fix
Date: Sat, 04 Feb 2017 22:37:29 -0700

I think the problem here is that js-syntax-propertize-regexp is using
parse-partial-sexp to try to parse the regexp literal.  However, this
gets confused by the construct [^[], because it thinks that the brackets
aren't matched.

I don't think there is a way to teach parse-partial-sexp that "^" is a
quote only in this one specific instance.

One possible fix here would be to change this function to do a simple
parse of the regexp literal.  I think it would only really have to
handle parsing bracket syntax and looking for the terminating "/".  The
current code also looks for balanced parens, but I don't think this is
actually needed.

Tom





reply via email to

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