Subject: bug#54802: OClosure: Make `interactive-form` a generic function

From: "Basil L. Contovounesios" <[email-masked]>
Date: Sun, 12 Jun 2022 00:24:48 +0300

Basil L. Contovounesios [2022-04-27 19:05 +0300] wrote:

> Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" [2022-04-19 13:52 -0400] wrote:
>
>> @@ -2041,52 +2040,89 @@ DEFUN ("commandp", Fcommandp, Scommandp, 1, 2, 0,
>
> [...]
>
>> +  /* By now, if it's not a function we already returned nil.  */
>> +
>> +  /* Check an `interactive-form' property if present, analogous to the
>> +     function-documentation property.  */
>> +  fun = function;
>> +  while (SYMBOLP (fun))
>> +    {
>> +      Lisp_Object tmp = Fget (fun, Qinteractive_form);
>> +      if (!NILP (tmp))
>> +	error ("Found an 'interactive-form' property!");
>> +      fun = Fsymbol_function (fun);
>> +    }
>
> error ("Success!");
>
> Why is it now an error for functions to have an interactive-form
> property?  The Elisp manual is careful to describe this practice as
> unusual, but nevertheless supported, e.g. in cases such as:
>
> 0. emacs -Q -f toggle-debug-on-error
> 1. (progn
>      (defun my-foo (&rest _))
>      (function-put 'my-foo 'interactive-form
>                    (interactive-form 'ignore)))
> 2. C-x C-e
> 3. M-x C-i
>
> Debugger entered--Lisp error: (error "Found an ’interactive-form’ property!")
>   commandp(my-foo)
>   [...]

In the meantime should I reopen this bug or report a new one, so this
isn't forgotten about?

Thanks,

-- 
Basil