From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Christian Johansson <christian@cvj.se>
Cc: "Mattias Engdegård" <mattiase@acm.org>,
"Emacs developers" <emacs-devel@gnu.org>
Subject: Re: [ELPA] New package: phps-mode
Date: Wed, 17 Jul 2019 08:24:16 -0400 [thread overview]
Message-ID: <jwv4l3kvos5.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <B932FC3D-29CD-4132-96DB-615314096992@cvj.se> (Christian Johansson's message of "Wed, 17 Jul 2019 11:36:18 +0200")
> Ah I missed that, the original re2c regex is
> [a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*
I strongly suspect that this regexp is applied to a stream of *bytes*,
whereas in phps-mode you're dealing with a stream of *characters*.
IOW for the re2c code, `λ` is the two byte sequence of \xCE and \xBB
(assuming the file is using utf-8) whereas in phps-mode it's just `λ` or
\u03BB.
So the regexp above actually matches all the non-ascii Unicode chars,
assuming the file uses utf-8.
> But I’m not sure about the equivalent in emacs-lisp but I know PHP does not fully support UTF-8 yet.
In that case, maybe
[[:alpha:]_][[:alnum:]_]*
is the saner choice.
Stefan
next prev parent reply other threads:[~2019-07-17 12:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-16 10:00 [ELPA] New package: phps-mode Mattias Engdegård
2019-07-17 5:43 ` Christian Johansson
2019-07-17 8:44 ` Mattias Engdegård
2019-07-17 9:36 ` Christian Johansson
2019-07-17 12:24 ` Stefan Monnier [this message]
2019-07-17 20:27 ` Christian Johansson
-- strict thread matches above, loose matches on Subject: below --
2019-07-12 17:15 Christian Johansson
2019-07-12 22:35 ` Stephen Leake
2019-07-12 23:36 ` Lars Ingebrigtsen
2019-07-13 13:14 ` Stefan Monnier
2019-07-13 13:28 ` Lars Ingebrigtsen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwv4l3kvos5.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=christian@cvj.se \
--cc=emacs-devel@gnu.org \
--cc=mattiase@acm.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).