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

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

bug#7693: 24.0.50, 23.2.91; advice to kill-new causes warning


From: Stefan Monnier
Subject: bug#7693: 24.0.50, 23.2.91; advice to kill-new causes warning
Date: Thu, 23 Dec 2010 10:37:38 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

severity 7693 minor
thanks

> Maybe it's harmless but surprises me a bit.

Indeed, it's harmless, and it's admittedly unjustified.

> (require 'bytecomp)
> (defadvice kill-new (before nop activate))

> This causes a warning in the "*Compile-Log*" buffer as follows:

> Warning: ad-Orig-kill-new called with 3 arguments, but accepts only 1-2

> It is because the arglist of `kill-new' is still
> (string &optional replace yank-handler), that `advice' recognizes
> by using `symbol-function'.  Any idea?

I think it's right for the advice to use the obsolete (string &optional
replace yank-handler) rather than the advertised arglist, so what we'd
need to do here is just silence the warning (rather than change the code
generated by defadvice).

We already have a few other cases where we emit warnings for obsolete
vars and functions that aren't justified (typically in the code that
implements those obsolete objects).  It would be good to figure out how
to cleanly silence such warnings.


        Stefan





reply via email to

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