From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: master 49192e9: Strip "(fn...)" from output of `describe-mode' (bug#38222) Date: Tue, 19 Nov 2019 20:45:24 +0100 Message-ID: References: <20191119101930.28082.63466@vcs0.savannah.gnu.org> <20191119101931.EA4E2209BF@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000433e5d0597b850c1" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="265988"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Emacs developers To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 19 20:46:22 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 1iX9S8-00173F-FX for ged-emacs-devel@m.gmane.org; Tue, 19 Nov 2019 20:46:20 +0100 Original-Received: from localhost ([::1]:50990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iX9S5-0006Je-SW for ged-emacs-devel@m.gmane.org; Tue, 19 Nov 2019 14:46:17 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46435) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iX9Rz-0006JT-Gg for emacs-devel@gnu.org; Tue, 19 Nov 2019 14:46:12 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iX9Ry-0001CE-FN for emacs-devel@gnu.org; Tue, 19 Nov 2019 14:46:11 -0500 Original-Received: from mail-qv1-xf36.google.com ([2607:f8b0:4864:20::f36]:39372) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iX9Ry-00018o-Ap for emacs-devel@gnu.org; Tue, 19 Nov 2019 14:46:10 -0500 Original-Received: by mail-qv1-xf36.google.com with SMTP id v16so8667485qvq.6 for ; Tue, 19 Nov 2019 11:46:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=qB2jvySTarVtBaZEQDiXPymBXWAnnEtMV4cI6rvATTM=; b=rwezv3756+J8T+KcLPPzF86XQIA9cj/d5TAmED2DUtpl/c9lx7PQLO/LqByJqB+er3 J4dWgsyHJ5jZBJ9C+ZZnKUcpb0moYaLz/2K2+Mjpm5EHfdZscm9ftYK9sYEFNGSm9U6w ZZHkJ5QXTN6fcXcj+YQZSAiUa+AQx3xwKhCOwU1Zfl+7LZ46FzADQiJ7D7p8aYEZKkCF zyWmePb/DiHr2fuH/Gzqg06eIYTf0eOdfdAMZvKvBpl4j947ufJrW5IeQq4CG/4gidFQ ZXt4HDWReWi+fnIfhB0lluFl4dlUNE8NJNEOqhwz51DrXYm+pTH0qyi618wUHRcoLmVS xKHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=qB2jvySTarVtBaZEQDiXPymBXWAnnEtMV4cI6rvATTM=; b=AovIeQin0B3wkLZZ/lybC+J2+hNcDYhJWxtaEvBlQ+2Z9vhNv13A8d1QaPxwCFWzTb PsFnl+lXdruW9LL/pmh123bivMR7eog+K3v9h3PhcpAoPDiT+zrBAQ7J8JhKZCOv9m59 uZtJhnSUyUpbgHFX/Gw5chRKb//8w6MxlNyd2burOGy+o6lujnxI0AVG1KV5rgMh4vGy otL4w5SY5ibx4nMpB9CN+oVHGbczs0G6yP0cX0sJoxlgnscXtpA6yRIlG5yeWbXlAEIx z7Pbk0bufASX0ACfXOsRDXfKmVWWQfhbOO53MyOZhpm+8jwqs98cVsaiMUzUGps9yxju /JzQ== X-Gm-Message-State: APjAAAVtAflPJWXtc0Qq1ARJZmxORrr7pwbi0L4R5qWmE8KR89LAokJk KHPETD+XRQ9gouCQcRxRi+XjD7T+d9ZK02AeLtleBQ== X-Google-Smtp-Source: APXvYqxMh0/lgMz53dFjpx2Rf6fjnI8tv08qqZP/V7X/7bcWKmskf0Zze5Kh33AsI1NmscZUXj6WslZcfmoZQOjloy4= X-Received: by 2002:a05:6214:22c:: with SMTP id j12mr31460173qvt.150.1574192759911; Tue, 19 Nov 2019 11:45:59 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::f36 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:242446 Archived-At: --000000000000433e5d0597b850c1 Content-Type: text/plain; charset="UTF-8" On Tue, Nov 19, 2019 at 8:23 PM Stefan Monnier wrote: > 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. > 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. --000000000000433e5d0597b850c1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Tue, Nov 19, 2019 at 8:23 PM Stefan Monnier <monnier@iro.umontreal.ca> wrote= :

> IIRC you can use
>
> =C2=A0 =C2=A0 (let* ((d= oc (documentation NAME))
> =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(= fd (help-split-fundoc doc NAME)))
> =C2=A0 =C2=A0 =C2=A0 (if fd (cdr = fd) doc))

Obviously, but at that point it's not clean= er (or clearer) than simply calling a function that does replace-regexp-in-= string, IMO.

> Maybe it should always return a pair (USAGE=
> . DOC) so we could just do:
>
> =C2=A0 =C2=A0 (cdr (he= lp-split-fundoc (documentation NAME) NAME)

I'm not ag= ainst 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 li= ke that for at least six years, likely more.

--000000000000433e5d0597b850c1--