From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#66750: help-split-fundoc (was: bug#66750: Unhelpful text in C-h v for variables with a lambda form as value) Date: Thu, 02 Nov 2023 17:20:00 -0400 Message-ID: References: Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15504"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Alan Mackenzie , Andrea Corallo , 66750@debbugs.gnu.org To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 02 22:20:56 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qyf7Y-0003uH-7u for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 02 Nov 2023 22:20:56 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qyf7C-0004yG-Av; Thu, 02 Nov 2023 17:20:34 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qyf79-0004xy-5I for bug-gnu-emacs@gnu.org; Thu, 02 Nov 2023 17:20:32 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qyf75-0007nw-DB for bug-gnu-emacs@gnu.org; Thu, 02 Nov 2023 17:20:30 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qyf7e-0002GO-8N for bug-gnu-emacs@gnu.org; Thu, 02 Nov 2023 17:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 02 Nov 2023 21:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66750 X-GNU-PR-Package: emacs Original-Received: via spool by 66750-submit@debbugs.gnu.org id=B66750.16989600518667 (code B ref 66750); Thu, 02 Nov 2023 21:21:02 +0000 Original-Received: (at 66750) by debbugs.gnu.org; 2 Nov 2023 21:20:51 +0000 Original-Received: from localhost ([127.0.0.1]:56285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyf7P-0002Fg-F1 for submit@debbugs.gnu.org; Thu, 02 Nov 2023 17:20:51 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:22302) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qyf7K-0002FM-DU for 66750@debbugs.gnu.org; Thu, 02 Nov 2023 17:20:46 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id D79A4100068; Thu, 2 Nov 2023 17:20:01 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1698960001; bh=gOQjwgiGta2CmwFiPVUMMMJoONppTBbudX3o66pRaOM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Y+A5aD4g5b4YcFLH8b1QZvSYw87IhucanqWVfyQNJMP5wKEKrt54ciRB6lAGYy8o9 5t2/6BLtek3BvPed53o20pIWEc+rl8y4mdXoJVgfGYgwIQxDGmQ6BUfyTyABkF7y+I yu5O277adDSlb5qFvGddBx1VvK8amTh8uuCOO70WNti0Z+wiOFyB9eyo8RT4euI8lw KB/JCAjuu1RK108o09mHKVXWPdNSc8txd9KEYRJNaeRSCa3RlP3fq0QtqGtS5hQbtc e0GAwypExZdxBFV49pKouejvCNW41BSZpt3o6c7flG8mHPWKv2y4CqFlWT32Pe0FCK 4WT6Icva1p4Ig== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 3570E100043; Thu, 2 Nov 2023 17:20:01 -0400 (EDT) Original-Received: from pastel (unknown [45.72.195.71]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0520D120209; Thu, 2 Nov 2023 17:20:00 -0400 (EDT) In-Reply-To: (Stefan Kangas's message of "Thu, 2 Nov 2023 13:53:34 -0700") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:273679 Archived-At: >> The way we do it for the arglist is hideous and a pain in the rear (I >> blame the maintainers who accepted my patch back then), so it would be >> an opportunity to "do it right" this time. > What is bad about it, and how do you propose it could be improved? It shouldn't be hidden under a `help-` prefix. `help-split-fundoc` should not return "either a cons or nil". Things like that. It's clunky. Part of the problem is that arglists often need to be manipulated/provided by macros whose output is a language that only knows about docstrings and not arglists, so it necessarily exposes this hack of storing the arglist inside the docstring. It's somewhat difficult to make it much better without significant changes elsewhere (like an extension to the syntax of `lambda` where we can provide side info like arglists). Maybe it would help to rename `function-documentation` to `function-info` whose output is type shouldn't matter because we only access it via other functions like `function-info-documentation`, `function-info-arglist`, ... And then provide a (function-info-join INFO TYPE VALUE) where type can be `documentation` or `arglist` or ... The function arglist thingy was originally designed so that function arglists could be easily provided from the DEFUNs in the C code, so it was important to use a syntax that was somewhat human-readable, but it's not indispensable to use the same format in the DEFUNs as elsewhere, so we could choose a less human-friendly encoding that's more robust and easier to extend. Stefan