GNU bug report logs - #50946
Emacs-28: Inadequate coding in hack-elisp-shorthands

Previous Next

Package: emacs;

Reported by: Alan Mackenzie <acm <at> muc.de>

Date: Fri, 1 Oct 2021 17:12:02 UTC

Severity: normal

Done: João Távora <joaotavora <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #124 received at 50946 <at> debbugs.gnu.org (full text, mbox):

From: João Távora <joaotavora <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 50946 <at> debbugs.gnu.org
Subject: Re: insert-file-contents can corrupt buffers. [Was: bug#50946:
 Emacs-28: Inadequate coding in hack-elisp-shorthands]
Date: Sun, 3 Oct 2021 20:59:55 +0100
On Sun, Oct 3, 2021 at 8:51 PM Eli Zaretskii <eliz <at> gnu.org> wrote:

> > Given you dislike hooks, the patch with
> > hack-read-symbol-shorthands-function is below.  Looks good?
>
> I like it slightly less than my proposal, because it spreads the
> arrangement over 3 files instead of just 2.

No, you're not counting right, or I'm not. I count only 2 in my arrangement.

In my arrangement, loadup.el knows nothing about the agreement
between mule.el and shorthands.el. So it's the same, but without the
negative "inhibit" logic and mule.el knowing about a function in files.el,
which is loaded after it.

It's shorthands.el who knows about two things loaded before it: a variable
and a function, as it The Right Thing.  Which reminds me, shorthand.el
should (require 'mule)

>  But if you want a hook so badly, I won't fight.

I don't want it badly, I just think it's simpler and easier to reason about.
The version I propose uses a "-function" variable instead of a hook.

> Just put a comment in mule.el describing how we arrange for this to start
> being in effect.

I have, already.

João




This bug report was last modified 3 years and 235 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.