From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs 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 20:56:19 +0300 Message-ID: <83y27a6lh8.fsf@gnu.org> References: <831r54einq.fsf@gnu.org> <871r54xnds.fsf@gmail.com> <87ee933bcj.fsf@gmail.com> <83pmsnbnci.fsf@gnu.org> <83k0ivbjbu.fsf@gnu.org> <83czonbhex.fsf@gnu.org> <83lf3a8eo7.fsf@gnu.org> <87y27at950.fsf@gmail.com> <83bl4685m2.fsf@gnu.org> <837deu84i0.fsf@gnu.org> <87pmsmavj6.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7083"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 50946@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Oct 03 19:57:11 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mX5ja-0001cc-Iy for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Oct 2021 19:57:10 +0200 Original-Received: from localhost ([::1]:35826 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mX5jY-000199-Dk for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 03 Oct 2021 13:57:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55010) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mX5jS-00018e-Hw for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 13:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51578) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mX5jS-0002Tp-AY for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 13:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mX5jS-0006Us-3r for bug-gnu-emacs@gnu.org; Sun, 03 Oct 2021 13:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 03 Oct 2021 17:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50946 X-GNU-PR-Package: emacs Original-Received: via spool by 50946-submit@debbugs.gnu.org id=B50946.163328381324948 (code B ref 50946); Sun, 03 Oct 2021 17:57:02 +0000 Original-Received: (at 50946) by debbugs.gnu.org; 3 Oct 2021 17:56:53 +0000 Original-Received: from localhost ([127.0.0.1]:34888 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mX5jI-0006UK-Q0 for submit@debbugs.gnu.org; Sun, 03 Oct 2021 13:56:53 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49840) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mX5jG-0006U5-OY for 50946@debbugs.gnu.org; Sun, 03 Oct 2021 13:56:51 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:53566) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mX5jA-0002ET-G2; Sun, 03 Oct 2021 13:56:45 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3603 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mX5j2-0006CS-RX; Sun, 03 Oct 2021 13:56:42 -0400 In-Reply-To: <87pmsmavj6.fsf@gmail.com> (message from =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= on Sun, 03 Oct 2021 18:05:33 +0100) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:216290 Archived-At: > From: João Távora > Cc: 50946@debbugs.gnu.org > Date: Sun, 03 Oct 2021 18:05:33 +0100 > > Icky or not, the fboundp one isn't working, the hook one I gave you > earlier does. > > With the fboundp, I get some recursive load error (not the first time). > I didn't investigate, maybe you can tell what's going on? I am missing > sometehing obvious? Not entirely sure, but I don't think the fboundp test is the culprit. The trigger is something else: > --- a/lisp/loadup.el > +++ b/lisp/loadup.el > @@ -355,7 +355,6 @@ > (load "paren") > > (load "shorthands") > -(setq load-source-file-function #'load-with-shorthands-and-code-conversion) 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. 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. Then in mule.el condition the call to hack-local-variables--find-variables on that new variable instead.