help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I need to turn off defadvice warnings


From: Tassilo Horn
Subject: Re: I need to turn off defadvice warnings
Date: Fri, 13 Jan 2012 14:11:23 +0100
User-agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.92 (gnu/linux)

jidanni@jidanni.org writes:

>>> But now I get
>>> ad-handle-definition: `gnus-summary-select-article-buffer' got redefined
>>> warnings.
>>> 
>>> Is there anyway to turn them off?
>
> TH> Don't simply turn off a warning, but check what causes it.  In your
> TH> case, the warning tells you that
>
> TH>   gnus-summary-select-article-buffer
>
> TH> already has an advice on it.  Your new defadvice deactivates the old
> TH> piece of advice and activates the new one.
>
> Well,
>
> that would be nice,
>
> if that was the case.
>
> Unfortunately it is not,
> as far as I can tell.

Yeah, I was wrong.  You can put as many advices at a function as you
want.

But at least, I know what causes the warning.  Here's a recipe:

--8<---------------cut here---------------start------------->8---
(defun foo-foo ())
(defadvice foo-foo (before foo activate))
(defun foo-foo ())
--8<---------------cut here---------------end--------------->8---

So you first define an advice on the function `foo-foo', and then the
function gets redefined.  In your case,
`gnus-summary-select-article-buffer' gets redefined at some point in
time.  Not sure why, though...

What you can try is this:

  M-: (setq ad-redefinition-action 'error)
  M-x toggle-debug-on-error RET
  M-x gnus RET

I suspect something first loads the gnus version bundled with emacs, and
then you load the git version.  But I cannot find the source of the
problem in your configs (which are pretty confusing.) :-)

Bye,
Tassilo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]