[Top][All Lists]

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

Re: Round-tripping key definitions

From: Stefan Monnier
Subject: Re: Round-tripping key definitions
Date: Wed, 17 Nov 2021 15:38:24 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>   > Then again, maybe we'd want to finally get rid of the conflation between
>   > "control modifier + key" and "ASCII control char".  But that's harder
>   > (because it affects ELisp source code, where `?\C-i` is 9 rather than
>   > #x4000069,
> I think the crucial requirement is that these are two different
> character codes,

Indeed, tho they currently aren't.

> but programs want to treat them as equivalent and
> bind them both with one binding.

As long as they're treated as keys, we can probably fix whichever
problem comes up by adding remappings from one to the other, such as via

>   >            so either we keep `?\C-i` as 9 and introduce a new syntax
>   > for "character i with a control modifier", or we change the value and
>   > risk breaking some programs (tho maybe we can auto-fix the vast
>   > majority with appropriate heuristics)).
> That would break a lot of old code.

I thought so too, but I've been playing with a quick&dirty patch to see
how much breakage it introduces and it seems it's not nearly as bad as
I thought.
I'm starting to believe that maybe we could pull it off, tho I haven't
had enough experience with it yet to be sure.

>   > [ BTW, I just noticed that `?\C-é` is 137, which seems like a plain bug.  
> ]
> One can argue that it should give an error message, but barring that,
> there is no better value it could give.

Of course there is: #x4000000 + ?é
And that's indeed what it now returns (on `master`).


reply via email to

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