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#70209: 30.0.50; describe key + lambda too poetic Date: Fri, 05 Apr 2024 07:44:51 -0400 Message-ID: References: <874jcgbekr.fsf@gmail.com> <87wmpc9z38.fsf@gmail.com> 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="34331"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 70209@debbugs.gnu.org To: No Wayman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Apr 05 13:46:24 2024 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 1rsi1X-0008fW-Tj for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Apr 2024 13:46:24 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rsi19-0003r7-OE; Fri, 05 Apr 2024 07:45:59 -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 1rsi17-0003qk-D3 for bug-gnu-emacs@gnu.org; Fri, 05 Apr 2024 07:45:57 -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 1rsi16-0003UP-F2 for bug-gnu-emacs@gnu.org; Fri, 05 Apr 2024 07:45:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rsi1B-0001vr-Lu for bug-gnu-emacs@gnu.org; Fri, 05 Apr 2024 07:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Apr 2024 11:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 70209 X-GNU-PR-Package: emacs Original-Received: via spool by 70209-submit@debbugs.gnu.org id=B70209.17123175097162 (code B ref 70209); Fri, 05 Apr 2024 11:46:01 +0000 Original-Received: (at 70209) by debbugs.gnu.org; 5 Apr 2024 11:45:09 +0000 Original-Received: from localhost ([127.0.0.1]:35337 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rsi0L-0001rS-1v for submit@debbugs.gnu.org; Fri, 05 Apr 2024 07:45:09 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:58476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rsi0H-0001q2-Bk for 70209@debbugs.gnu.org; Fri, 05 Apr 2024 07:45:07 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 804FD80C41; Fri, 5 Apr 2024 07:44:53 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1712317492; bh=vFhHC/5eQf2o4ExQp1wBXAGVSQpUFZzVjCQJU6xovWE=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=QKj82hIM31vJ+Mrq9Qu6ubM+/Ad5TWQb4hgKsk1aH2/cYsADC+BMT21ABaxh6Ktaw sFL/PN24oMEawu37R33S4LF1jFj2GWbU9l/I/+FXFJqog/s0V1+q/5gxLRiBFr/dtU 185oZ0CeWHInL4y190q0qDTp6C58x6qvtSTBBH3stG8m0ynq29Aest65lXNXEZeNyW rgZSQAVrfoRFFeIXL8XcLB9H68vZB0ltxfl2n5VPnakXyh6brgvtsCac+eAQkdFu+e y5kbMbhJvxr6AZBPdYygjeC5NyPiehGBxCB5ecw8jSvKoR/hfsjIr5C9VMF86jIk90 Tkajc3JjVMJnQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 2F83180946; Fri, 5 Apr 2024 07:44:52 -0400 (EDT) Original-Received: from pastel (unknown [45.72.201.215]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 10431120472; Fri, 5 Apr 2024 07:44:52 -0400 (EDT) In-Reply-To: <87wmpc9z38.fsf@gmail.com> (No Wayman's message of "Fri, 05 Apr 2024 01:07:39 -0400") 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:282700 Archived-At: Thank you for your enjoyable bug report and the suggested patch. > @@ -1102,6 +1102,8 @@ help-fns-function-description-header > elts nil)) > (setq elts (cdr-safe elts))) > (concat beg (if is-full "keymap" "sparse keymap")))) > + ((eq (car-safe def) 'lambda) > + (concat beg "anonymous Lisp function")) > (t "")))) > (with-current-buffer standard-output > (insert description)) Actually, I think this won't help because in my test the `car` of `def` is `closure` rather than `lambda`. I installed the patch below instead. Stefan diff --git a/lisp/help-fns.el b/lisp/help-fns.el index a291893e9a2..27011575333 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -1086,13 +1086,6 @@ help-fns-function-description-header ;; need to check macros before functions. (macrop function)) (concat beg "Lisp macro")) - ((atom def) - (let ((type (or (oclosure-type def) (cl-type-of def)))) - (concat beg (format "%s" - (make-text-button - (symbol-name type) nil - 'type 'help-type - 'help-args (list type)))))) ((keymapp def) (let ((is-full nil) (elts (cdr-safe def))) @@ -1102,7 +1095,16 @@ help-fns-function-description-header elts nil)) (setq elts (cdr-safe elts))) (concat beg (if is-full "keymap" "sparse keymap")))) - (t "")))) + (t + (let ((type + (if (and (consp def) (symbolp (car def))) + (car def) + (or (oclosure-type def) (cl-type-of def))))) + (concat beg (format "%s" + (make-text-button + (symbol-name type) nil + 'type 'help-type + 'help-args (list type))))))))) (with-current-buffer standard-output (insert description))