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


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: João Távora <joaotavora <at> gmail.com>
Cc: 50946 <at> debbugs.gnu.org
Subject: bug#50946: insert-file-contents can corrupt buffers. [Was: bug#50946: Emacs-28: Inadequate coding in hack-elisp-shorthands]
Date: Sun, 03 Oct 2021 22:51:21 +0300
> From: João Távora <joaotavora <at> gmail.com>
> Cc: 50946 <at> debbugs.gnu.org
> Date: Sun, 03 Oct 2021 19:59:24 +0100
> 
> > Note that previously, the shorthand searching and application was
> > effectively turned off until very late into the loadup procedure.  But
> > now, we enable it as soon as files.el is loaded, which is way
> > earlier.  Somewhere there is the reason for the problem.
> 
> Yes, I agree, this makes sense.
> 
> > So I think, instead of the fboundp test, introduce a variable,
> > say inhibit-shorthands, set it to t at the beginning of loadup, then
> > reset to nil after shorthands.el has been loaded.
> 
> At this point, I think that's slightly worse than introducing
> hack-read-symbol-shorthands-function... or introducing a hook as I had
> before.

Not at all: we have several inhibit-foo bits in loadup already, so one
more won't make any change.

> 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.  But if you want a hook so
badly, I won't fight.  Just put a comment in mule.el describing how we
arrange for this to start being in effect.

Thanks.




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.