From: Eli Zaretskii <eliz@gnu.org>
To: "Clément Pit-Claudel" <cpitclaudel@gmail.com>
Cc: 64792@debbugs.gnu.org
Subject: bug#64792: js-mode doesn't recognize LS and PS line endings, leading to incorrect syntax highlighting
Date: Sat, 22 Jul 2023 19:52:40 +0300 [thread overview]
Message-ID: <83y1j77usn.fsf@gnu.org> (raw)
In-Reply-To: <0fe501d9-ca6f-a115-5813-f51eb0b3b45b@gmail.com> (message from Clément Pit-Claudel on Sat, 22 Jul 2023 18:41:42 +0200)
> Date: Sat, 22 Jul 2023 18:41:42 +0200
> From: Clément Pit-Claudel <cpitclaudel@gmail.com>
>
> Is there an easy way to make Emacs treat LS and PS as newlines in js-mode? Ideally it would display the calls to console.debug on their own separate lines, like this:
>
> //[LS]
> console.debug("Hello,");
> //[PS]
> console.debug("world!");
This can be accomplished via the display-table, but I doubt that it
would satisfy you.
> … but it would already be nice to fix the syntax highlighting to not use the comment font. For that these characters could be marked as comment enders. There may be additional work to do to check uses of \n of "^" and "$" in regular expressions, too.
AFAIU, this requires either changes to the font-lock regexps or
low-level change to regex-emacs.c such that it considers these two
separator characters as equivalents of a newline.
(If you ask me, Unicode made a heck of a mess by introducing these
characters, witness the problems editors out there have to this day
with handling them.)
prev parent reply other threads:[~2023-07-22 16:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-22 16:41 bug#64792: js-mode doesn't recognize LS and PS line endings, leading to incorrect syntax highlighting Clément Pit-Claudel
2023-07-22 16:52 ` Eli Zaretskii [this message]
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=83y1j77usn.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=64792@debbugs.gnu.org \
--cc=cpitclaudel@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.