Subject: Re: bug#44864: 27.1; advice.el: ad-with-originals deprecated, but no advice on replacement

From: Lars Ingebrigtsen <[email-masked]>
Date: Thu, 26 Nov 2020 11:45:43 +0100

Julian Gilbey <[email-masked]> writes:

>                 (ad-with-originals (hack-one-local-variable)
>                   (multi-hack-local-variables))
>               (multi-hack-local-variables))
>
> The ad-with-originals function has been marked as obsolete in version
> 27.1 of emacs, so I now get a warning message every time I load
> emacs.  But there is no advice on what to do instead.

The macro was obsoleted by this commit, so perhaps Stefan (added to the
Ccs) has some insight here.

commit 458948189e56a110739ff9002236d269b8382293
Author:     Stefan Monnier <[email-masked]>
AuthorDate: Mon Sep 17 14:02:05 2018 -0400

    * lisp/emacs-lisp/advice.el: Only use defmacro when needed
    
    (ad-get-advice-info): Mark it inlinable.
    (ad-get-advice-info-macro): Make it an obsolete alias.
    (ad-copy-advice-info, ad-is-advised, ad-get-advice-info-field)
    (ad-find-advice, ad-macrofy, ad-lambdafy, ad-lambda-p, ad-advice-p)
    (ad-compiled-p, ad-compiled-code, ad-get-cache-definition)
    (ad-get-cache-id, ad-set-cache): Turn macros into defsubsts.
    (ad-defadvice-flags): Make it into a plain list.
    (ad-set-advice-info-field): Apply a bit of CSE.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no