GNU bug report logs -
#44864
27.1; advice.el: ad-with-originals deprecated, but no advice on replacement
Previous Next
Reported by: Julian Gilbey <julian-gnu <at> d-and-j.net>
Date: Wed, 25 Nov 2020 13:10:01 UTC
Severity: normal
Tags: moreinfo, wontfix
Found in version 27.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> ;; Use file's local variables section to set variables in
> ;; this buffer. (Don't just copy local variables from the
> ;; base buffer because it may have set things locally that
> ;; we don't want in the other modes.) We need to prevent
> ;; `mode' being processed and re-setting the major mode.
> ;; It all goes badly wrong if `hack-one-local-variable' is
> ;; advised. The appropriate mechanism to get round this
> ;; appears to be `ad-with-originals', but we don't want to
> ;; pull in the advice package unnecessarily. `flet'-like
> ;; mechanisms lose with advice because `fset' acts on the
> ;; advice anyway.
> (if (featurep 'advice)
> (ad-with-originals (hack-one-local-variable)
> (multi-hack-local-variables))
> (multi-hack-local-variables))
The comment doesn't explain why Dave thought that "It all goes badly
wrong if `hack-one-local-variable' is advised", so there's not much we
can do. AFAIK it will only go wrong with some advice, so he must have
had some particular pieces of advice in mind.
`advice.el` is deprecated anyway, so my recommendation is to remove this
test and just call `multi-hack-local-variables` without paying attention
to any potential advice there. If/when you bump into a problem with
that, then we'll be able to see what should be done (the best option
might be to change the advice itself).
> But there is no advice on what to do instead.
I think that's because `ad-with-originals` was used on it ;-)
Stefan
This bug report was last modified 3 years and 275 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.