From: Alan Mackenzie <acm@muc.de>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: Michael Albinus <michael.albinus@gmx.de>,
Lars Ingebrigtsen <larsi@gnus.org>,
emacs-devel <emacs-devel@gnu.org>,
Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: master 60102016e4: Abolish max-specpdl-size (bug#57911)
Date: Tue, 20 Sep 2022 14:56:29 +0000 [thread overview]
Message-ID: <YynUnZiaHh4ue5rr@ACM> (raw)
In-Reply-To: <9311F07F-9D1C-41F5-9D39-0B6233CA6A55@acm.org>
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 <michael.albinus@gmx.de>:
> > 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).
next prev parent reply other threads:[~2022-09-20 14:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <166360889903.6127.6574959318930089210@vcs2.savannah.gnu.org>
[not found] ` <20220919173459.EC224C00872@vcs2.savannah.gnu.org>
2022-09-19 18:50 ` master 60102016e4: Abolish max-specpdl-size (bug#57911) Lars Ingebrigtsen
2022-09-20 12:15 ` Michael Albinus
2022-09-20 12:18 ` Lars Ingebrigtsen
2022-09-20 12:49 ` Mattias Engdegård
2022-09-20 13:07 ` Lars Ingebrigtsen
2022-09-20 13:14 ` Michael Albinus
2022-09-20 14:56 ` Alan Mackenzie [this message]
2022-09-23 8:32 ` Mattias Engdegård
2022-09-27 8:47 ` Alan Mackenzie
2022-09-27 9:01 ` bug#57911: " Mattias Engdegård
2022-09-27 10:14 ` Alan Mackenzie
2022-09-27 8:47 ` Alan Mackenzie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YynUnZiaHh4ue5rr@ACM \
--to=acm@muc.de \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
--cc=mattiase@acm.org \
--cc=michael.albinus@gmx.de \
--cc=monnier@iro.umontreal.ca \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.