bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#50946: insert-file-contents can corrupt buffers. [Was: bug#50946: Em


From: Eli Zaretskii
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@gmail.com>
> Cc: 50946@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.





reply via email to

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