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 19:20:07 +0300

> From: João Távora <joaotavora@gmail.com>
> Date: Sun, 3 Oct 2021 17:02:04 +0100
> Cc: 50946@debbugs.gnu.org
> 
> > > A bigger problem is that hack-local-variables--find-variables isn't
> > > defined at that point and the function will then be used to load
> > > lisp/files.el itself (which happens to be where h-l-v--f-v is defined).
> >
> > You are talking about loadup?  We can easily condition the call by
> > that function's being fboundp, no?  Preloaded files, at least those
> > loaded before file.el, should not use shorthands, so bypassing the
> > call should not produce any problems.  Am I missing something?
> 
> No, fboundp also works, probably.  Do you prefer that to a hook?
> A hook is, in theory, more powerful.

Well, using a hook in our own sources is IMO ... "icky".

So yes, I prefer the fboundp test.  And then shorthands.el will deal
with stuff other than loading, which I think is a Good Thing.

Thanks.





reply via email to

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