emacs-devel
[Top][All Lists]
Advanced

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

Re: Return value from advice is incorrect?


From: Lennart Borgman
Subject: Re: Return value from advice is incorrect?
Date: Tue, 18 Apr 2006 00:30:05 +0200
User-agent: Thunderbird 1.5 (Windows/20051201)

Stefan Monnier wrote:
If I replace a function with an around advice the return value
seems incorrect.

  (defun test-ad() t)
  (defadvice test-ad(around test-ad-ad () activate) t)

After this (test-ad) returns nil. Should it not return t?

The return value is normally the return value from the original function,
unless you change it explicitly, or (as you discovered) unless you don't run
the original function in which case it defaults to nil.

It's kind of inconvenient and/or unexpected, but it's a bit late to change
it,


        Stefan
Thanks. I will set ad-return-value instead then.




reply via email to

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