Subject: bug#11747: 24.1.50; called-interactively-p vs. advice

From: Michael Heerdegen <[email-masked]>
Date: Mon, 25 Jun 2012 19:54:21 +0200

Glenn Morris <[email-masked]> writes:

> > `called-interactively-p' returns wrong values when called inside
> > commands that are adviced.
>
> Old "interactive-p" had the same issue, though maybe that mattered less.
> It's to do with the way advice is implemented. It actually goes out of
> its way to avoid using call-interactively unless it has to (subrs).
> See comments in advice.el header.

So, do you mean this can't be fixed?  Too bad, but ok, that's what I
thought.

But then, we IMHO should improve the docstring of `called-interactively':

1.  This sentence:

   This function is meant for implementing advice and other
   function-modifying features.

Is there a "not" missing?

2.  Explicitly say that `called-interactively' will not work when used
in an adviced function.

This is something completely different than 1.  1. is about implementing
advice via `called-interactively'.  2. says that if you advice any
function that already uses it, it will stop working.  

So, my wish is to improve the docstring of `called-interactively' a bit.
Then, this report can be closed.

Michael.