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 15:05:00 -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="77888"; 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 21:05:47 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 1iX9kx-000K8Q-2y for ged-emacs-devel@m.gmane.org; Tue, 19 Nov 2019 21:05:47 +0100 Original-Received: from localhost ([::1]:51134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iX9kv-0007JF-SJ for ged-emacs-devel@m.gmane.org; Tue, 19 Nov 2019 15:05:45 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49193) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iX9kI-0007IC-FH for emacs-devel@gnu.org; Tue, 19 Nov 2019 15:05:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iX9kH-0008Bd-1T for emacs-devel@gnu.org; Tue, 19 Nov 2019 15:05:05 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:47380) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iX9kG-0008BQ-RI for emacs-devel@gnu.org; Tue, 19 Nov 2019 15:05:04 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C7D631000F4; Tue, 19 Nov 2019 15:05:03 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 1E8DB1000ED; Tue, 19 Nov 2019 15:05:02 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1574193902; bh=NfMxx2teqsVWitjmap5kMWEE5Hcu2miQS1q1Dxd5UrM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=TvGismSHACP0S6H501H/0yFIu3II4PdPhq9+qoj7fzkDrQYRlBV/0vWxT8fZ9iqdn dhQTfq6F7hhFij5NPWXWsKRTOTiTiTxjgZceQjQC2Hn0ia1qOvBAAkn235QhHpmWGo pklM1VgFtYJuTmV4i4kRWIhLsGmy+Zd+lLzSAenrH8o/sNbx6ieyTmAq9JG1H3irRV M+tLcPpvekKUsqRlqF+av/yj53alPWl56ZGra+hhKQKFAvxS9jPbup5XHdyoWAYRX0 GGQ7ukE0x4+mTmuhsA4IRAouZ7Rl6+u7Dwhf66NoeKkbDp+v91DGtgoFsgvtlVlaBE uciLBGtLAiyzg== Original-Received: from alfajor (modemcable157.163-203-24.mc.videotron.ca [24.203.163.157]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id EF54A12093F; Tue, 19 Nov 2019 15:05:01 -0500 (EST) In-Reply-To: (Juanma Barranquero's message of "Tue, 19 Nov 2019 20:45:24 +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:242448 Archived-At: >> IIRC you can use >> >> (let* ((doc (documentation NAME)) >> (fd (help-split-fundoc doc NAME))) >> (if fd (cdr fd) doc)) > > Obviously, but at that point it's not cleaner (or clearer) than simply > calling a function that does replace-regexp-in-string, IMO. It is because it hides the particular detail about the format we use. >> Maybe it should always return a pair (USAGE >> . DOC) so we could just do: >> >> (cdr (help-split-fundoc (documentation NAME) NAME) > > I'm not against it, but that's changing the behavior of a non-internal > function (it's already used like ten times just in our sources) which has > been like that for at least six years, likely more. Indeed, to do that we need to see how it's used to see whether it can safely be changed as-is or whether it needs to depend on some new arg or something. Stefan