From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: 55738@debbugs.gnu.org
Subject: bug#55738: character escape bugs in the reader
Date: Wed, 01 Jun 2022 15:42:47 +0200 [thread overview]
Message-ID: <87mtew4i08.fsf@gnus.org> (raw)
In-Reply-To: <84CE3A6F-E487-4823-96CB-208C79EB235C@acm.org> ("Mattias Engdegård"'s message of "Wed, 1 Jun 2022 12:00:21 +0200")
Mattias Engdegård <mattiase@acm.org> writes:
> Make the character literal ?\LF (linefeed) generate 10, not -1.
>
> Ensure that Control escape sequences in character literals are
> idempotent: ?\C-\C-a and ?\^\^a mean the same thing as ?\C-a and ?\^a,
> generating the control character with value 1. "\C-\C-a" no longer
> signals an error.
I think both changes make sense.
> * src/lread.c (read_escape): Make nonrecursive and only combine
> the base char with modifiers at the end, creating control chars
> if applicable. Remove the `stringp` argument; assume character
> literal syntax. Never return -1.
> (read_string_literal): Handle string-specific escape semantics here
> and simplify.
And also sounds good.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2022-06-01 13:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-31 11:33 bug#55738: character escape bugs in the reader Mattias Engdegård
2022-06-01 10:00 ` Mattias Engdegård
2022-06-01 13:42 ` Lars Ingebrigtsen [this message]
2022-06-01 17:56 ` Mattias Engdegård
2022-06-01 20:48 ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-01 20:53 ` Mattias Engdegård
2022-06-01 21:05 ` Basil L. Contovounesios via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-06-02 15:12 ` Mattias Engdegård
2022-06-03 11:07 ` Mattias Engdegård
2022-06-18 6:54 ` Stefan Kangas
2022-06-18 9:34 ` Mattias Engdegård
2023-09-06 1:56 ` Stefan Kangas
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=87mtew4i08.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=55738@debbugs.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).