Subject: bug#42222: closed (Re: bug#42222: 26.3; `called-interactively-p' doc is incorrect and misleading)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 13 Aug 2020 00:30:06 +0000

Your bug report

#42222: 26.3; `called-interactively-p' doc is incorrect and misleading

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
42222: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=42222
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#42222: 26.3; `called-interactively-p' doc is incorrect and misleading
From: Stefan Kangas <[email-masked]>
To: Eli Zaretskii <[email-masked]>
Cc: [email-masked], Drew Adams <[email-masked]>
Date: Wed, 12 Aug 2020 17:28:53 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

Eli Zaretskii <[email-masked]> writes:

> There's no bug here.

I'm therefore closing this bug report.

Subject: 26.3; `called-interactively-p' doc is incorrect and misleading
From: Drew Adams <[email-masked]>
To: [email-masked]
Date: Sun, 5 Jul 2020 16:33:33 -0700 (PDT)
List-Id: <debbugs-submit.debbugs.gnu.org>

1. Wrong signature:

     called-interactively-p is a compiled Lisp function in 'subr.el'.

     (called-interactively-p KIND)

   It should be (called-interactively-p &optional KIND).

2. Nothing is said about the case where KIND is absent or nil.

   Nothing is said about the behavior where KIND is anything other than
   `interactive' or `any'.  It seems that it returns nil for anything
   other than those two symbols, regardless of whether the calling
   function was called interactively.

   How misleading is that?  No error - nil (as "false") presumably
   means called non-interatively, but in fact it means nothing in this 
   case.  Result: bugged code, with no help from Emacs about the bug.

3. The same problems exist for the Elisp manual, node `Distinguish
   Interactive'.

4. On the other hand, if the intention really is to _require_ KIND, so
   that what the Elisp manual says is true: "KIND should be either the
   symbol 'interactive' or the symbol 'any'", then the function should
   raise an error when KIND is missing (and the "should" should then
   be changed to "must").

5. This bug seems to still be present in Emacs 28 (recent snapshot).
   There, there's the additional bug that this appears right after the
   first doc-string line, for `C-h f':

     Probably introduced at or before Emacs version 22.1.

   Such meta-information should not be placed up front like that.  It's
   not in any sense the most important info.  If it's shown at all, it
   should be placed at the end, after a horizontal separator.  It's
   essentially a footnote.

   Yes, This (#5) is a separate, unrelated bug.  I don't feel like
   filing it separately.  But it should be fixed.

In GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
 of 2019-08-29
Repository revision: 96dd0196c28bc36779584e47fffcca433c9309cd
Windowing system distributor `Microsoft Corp.', version 10.0.18362
Configured using:
 `configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''