unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Eshel Yaron <me@eshelyaron.com>
Cc: 65092@debbugs.gnu.org
Subject: bug#65092: 30.0.50; C-h f shows malformed description for vc-mode
Date: Sun, 25 Feb 2024 13:20:03 -0500	[thread overview]
Message-ID: <jwv1q90qufd.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <m1sf8xn33c.fsf@eshelyaron.com> (Eshel Yaron's message of "Sat, 05 Aug 2023 14:25:11 +0300")

> I seems to have stumbled upon an issue with type inference on the master
> branch that causes `describe-function` to display the following
> malformed description for the function `vc-mode`:
>
>     vc-mode is a native-compiled Lisp function in ‘vc-hooks.el’.
>
>     (vc-mode &optional ARG)
>
>     Inferred type: (function (&optional t) (member Version Control minor
>     mode.  This minor mode is automatically activated whenever you visit a
>     file under control of one of the revision control systems in
>     `vc-handled-backends'.  VC commands are globally reachable under the
>     prefix `\[vc-prefix-map]': \{vc-prefix-map}))
>
>     Version Control minor mode.
>     This minor mode is automatically activated whenever you...
>
> To reproduce, do `C-h f vc-mode RET` in `emacs -Q`.
>
> Basically, it looks like the inferred type somehow includes the
> function's docstring verbatim:
>
> --8<---------------cut here---------------start------------->8---
> (comp-function-type-spec 'vc-mode)
> => ((function (&optional t) (member "Version Control minor mode.
> This minor mode is automatically activated whenever you visit a file under
> control of one of the revision control systems in `vc-handled-backends'.
> VC commands are globally reachable under the prefix `\\[vc-prefix-map]':
> \\{vc-prefix-map}")) . inferred)
> --8<---------------cut here---------------end--------------->8---

This output is actually "correct" 🙁
I've just pushed a fix for it in `master` by giving an actual body to
the function, in addition to its doc string.


        Stefan






      parent reply	other threads:[~2024-02-25 18:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-05 11:25 bug#65092: 30.0.50; C-h f shows malformed description for vc-mode Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-05 11:50 ` Eli Zaretskii
2024-02-25 18:20 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv1q90qufd.fsf-monnier+emacs@gnu.org \
    --to=bug-gnu-emacs@gnu.org \
    --cc=65092@debbugs.gnu.org \
    --cc=me@eshelyaron.com \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).