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

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

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


From: Basil L. Contovounesios
Subject: bug#54802: OClosure: Make `interactive-form` a generic function
Date: Wed, 27 Apr 2022 19:05:03 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

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)
  [...]

Thanks,

-- 
Basil

In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 
1.16.0, Xaw3d scroll bars)
 of 2022-04-27 built on tia
Repository revision: 0beb8fd663663dcaa1bda4df5995d10f1ef615fb
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101003
System Description: Debian GNU/Linux bookworm/sid

Configured using:
 'configure 'CFLAGS=-Og -ggdb3' --config-cache --prefix /home/blc/.local
 --enable-checking=structs --with-x-toolkit=lucid
 --with-file-notification=yes --with-xinput2 --with-x'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS WEBP X11 XAW3D XDBE XIM XINPUT2 XPM LUCID ZLIB





reply via email to

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