From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Paul Pogonyshev <pogonyshev@gmail.com>
Cc: 19397@debbugs.gnu.org
Subject: bug#19397: incorrect handling of / in a character class in js-mode
Date: Tue, 23 Dec 2014 10:54:51 -0500 [thread overview]
Message-ID: <jwv7fxicql4.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <CAG7BparL9kE+kLWuyeBRs=w-GYAa1=br+zrKGh0jap0ywZi4nQ@mail.gmail.com> (Paul Pogonyshev's message of "Wed, 17 Dec 2014 16:15:47 +0100")
> Try to type the following code in a JS buffer:
> function test ()
> {
> return /[/]/.test ('/')
> }
Indeed, there are two problems here: js-mode treats the first / as
a division operation, and even if you change the code to avoid this
problem, you bump into the fact that js-mode doesn't know there can be
"unescaped / in character class".
I installed a fix for the first problem into emacs-24.
For the second problem, I recommend you escape the slash for now (IIUC
the syntax of regexps in ecmascript, that will DTRT).
Stefan
next prev parent reply other threads:[~2014-12-23 15:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-17 15:15 bug#19397: incorrect handling of / in a character class in js-mode Paul Pogonyshev
2014-12-23 15:54 ` Stefan Monnier [this message]
2014-12-23 16:16 ` Stefan Monnier
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=jwv7fxicql4.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=19397@debbugs.gnu.org \
--cc=pogonyshev@gmail.com \
/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.