From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: master 49192e9: Strip "(fn...)" from output of `describe-mode' (bug#38222) Date: Tue, 19 Nov 2019 14:22:53 -0500 Message-ID: References: <20191119101930.28082.63466@vcs0.savannah.gnu.org> <20191119101931.EA4E2209BF@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="168018"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: Emacs developers To: Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 19 20:23:13 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1iX95l-000hav-1L for ged-emacs-devel@m.gmane.org; Tue, 19 Nov 2019 20:23:13 +0100 Original-Received: from localhost ([::1]:50804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iX95j-0006IO-Sp for ged-emacs-devel@m.gmane.org; Tue, 19 Nov 2019 14:23:11 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43784) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iX95d-0006HB-9E for emacs-devel@gnu.org; Tue, 19 Nov 2019 14:23:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iX95b-0008Ud-VL for emacs-devel@gnu.org; Tue, 19 Nov 2019 14:23:04 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:1316) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iX95b-0008UG-PK for emacs-devel@gnu.org; Tue, 19 Nov 2019 14:23:03 -0500 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 3525F81DE7; Tue, 19 Nov 2019 14:23:02 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id EEC56806B3; Tue, 19 Nov 2019 14:23:00 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1574191381; bh=dyM/cDj19gYoVokMaXM7vHicEBjSPWi63wYSCoDvrsM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=N0cBoYbAZuJslEBzUcwk33yXYdJVX2kjc3cCM/aj8bC2zZ5n8YnRo/rIGRKdkX2pI rSRnO+RIsvMCaUVKKY6dp+sH69/q0rnN/BcdhVYe9g5t2eBmYhKyq1SoS4z2+I87Oj e0qJaiQjviMyr/uYY0HadCo+VuyDwhHs7XKvLAWCaH1j1wIYUEOm+YcrLXF5PM59vz G3042L85PDdr3lgx4CU67w9dP14p4ZgdafthjZGynOJI3tXMU+HdHK8uKP3tZc7pvn KlDBecFLOKXEwG1SEeTBDoCejacbNR1r8Y291Gj5rcDT0KLKnmfeMagLfps1+1lLNa TrqF+k2+E8VyA== Original-Received: from alfajor (modemcable157.163-203-24.mc.videotron.ca [24.203.163.157]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 3D02A120676; Tue, 19 Nov 2019 14:23:00 -0500 (EST) In-Reply-To: (Juanma Barranquero's message of "Tue, 19 Nov 2019 19:47:15 +0100") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:242445 Archived-At: > help-split-fundoc returns nil if the docstring has no usage string. > > (help-split-fundoc (documentation 'auto-composition-mode) > 'auto-composition-mode) => nil IIRC you can use (let* ((doc (documentation NAME)) (fd (help-split-fundoc doc NAME))) (if fd (cdr fd) doc)) But I agree that `help-split-fundoc` is inconvenient. Improvements welcome. Maybe it should always return a pair (USAGE . DOC) so we could just do: (cdr (help-split-fundoc (documentation NAME) NAME) -- Stefan