From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: master 60102016e4: Abolish max-specpdl-size (bug#57911) Date: Tue, 20 Sep 2022 14:56:29 +0000 Message-ID: References: <166360889903.6127.6574959318930089210@vcs2.savannah.gnu.org> <20220919173459.EC224C00872@vcs2.savannah.gnu.org> <87pmfrqjvc.fsf@gnus.org> <87r106mecp.fsf@gmx.de> <9311F07F-9D1C-41F5-9D39-0B6233CA6A55@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8451"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Michael Albinus , Lars Ingebrigtsen , emacs-devel , Stefan Monnier To: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 20 22:02:06 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oajRW-00022A-Jh for ged-emacs-devel@m.gmane-mx.org; Tue, 20 Sep 2022 22:02:06 +0200 Original-Received: from localhost ([::1]:56510 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oajRV-00029P-K8 for ged-emacs-devel@m.gmane-mx.org; Tue, 20 Sep 2022 16:02:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45324) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaefr-0003GC-Sa for emacs-devel@gnu.org; Tue, 20 Sep 2022 10:56:36 -0400 Original-Received: from mx3.muc.de ([193.149.48.5]:44878) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oaefp-0002ho-Gg for emacs-devel@gnu.org; Tue, 20 Sep 2022 10:56:35 -0400 Original-Received: (qmail 67983 invoked by uid 3782); 20 Sep 2022 16:56:30 +0200 Original-Received: from acm.muc.de (p4fe15d4d.dip0.t-ipconnect.de [79.225.93.77]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 20 Sep 2022 16:56:30 +0200 Original-Received: (qmail 8919 invoked by uid 1000); 20 Sep 2022 14:56:29 -0000 Content-Disposition: inline In-Reply-To: <9311F07F-9D1C-41F5-9D39-0B6233CA6A55@acm.org> X-Submission-Agent: TMDA/1.3.x (Ph3nix) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.5; envelope-from=acm@muc.de; helo=mx3.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:295827 Archived-At: Hello, Mattias. On Tue, Sep 20, 2022 at 14:49:40 +0200, Mattias Engdegård wrote: > 20 sep. 2022 kl. 14.15 skrev Michael Albinus : > > Tramp needs this for Emacs 26. I've wrapped it with `with-no-warnings'. > Thank you, but maybe silencing all warnings in the affected code was a > cudgel heavier than the situation called for? Perhaps something like > this would do: > > (defmacro tramp--with-max-specpdl-size (new-limit &rest body) > > (declare (indent 1)) > > (if (< emacs-major-version 29) > > `(let ((max-specpdl-size ,new-limit)) . ,body) > > `(progn . ,body)))) > Or we could postpone the obsoletion for a while. The change was made > partly for user convenience, but the typically package maintainer may > not agree that this has been achieved: there is no way to be avoid > warnings in code that has to work on previous Emacs versions without > making it uglier. > Would it be a bad idea to, say, make a note to obsolete > max-specpdl-size in Emacs 31? I suspect it would go the same way as font-lock-reference-face did. That face was renamed to font-lock-constant-face in the early 1990s, with an alias. People just continued to use the alias. If you postpone the obsoletion of m-s-s to Emacs 31, the code using it probably won't change until then. :-( I suspect I am going to implement a macro something like: (defmacro c-maybe-max-specpdl-size-let (varlist &rest body) (let ((-varlist- varlist) msp-binding) (if (get 'max-specpdl-size 'byte-obsolete-variable) (cond ((memq 'max-specpdl-size -varlist-) (setq -varlist- (delq 'max-spec-pdl-size -varlist-))) ((setq msp-binding (assq 'max-spec-pdl-size -varlist-)) (setq -varlist- (delq msp-binding -varlist-))))) `(let ,varlist ,@body))) .. Which points out a deficit in Emacs, namely the lack of functions obsolete-variable-p and obsolete-function-p. -- Alan Mackenzie (Nuremberg, Germany).