all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Juanma Barranquero <lekktu@gmail.com>
Cc: Emacs developers <emacs-devel@gnu.org>
Subject: Re: master 49192e9: Strip "(fn...)" from output of `describe-mode' (bug#38222)
Date: Tue, 19 Nov 2019 15:05:00 -0500	[thread overview]
Message-ID: <jwv1ru37hxp.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CAAeL0SRhXPQms4zapEFDmv5tS_ZBXvFVbSO8KGbMKdQNHjsX3g@mail.gmail.com> (Juanma Barranquero's message of "Tue, 19 Nov 2019 20:45:24 +0100")

>> 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




  reply	other threads:[~2019-11-19 20:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20191119101930.28082.63466@vcs0.savannah.gnu.org>
     [not found] ` <20191119101931.EA4E2209BF@vcs0.savannah.gnu.org>
2019-11-19 13:54   ` master 49192e9: Strip "(fn...)" from output of `describe-mode' (bug#38222) Stefan Monnier
2019-11-19 18:47     ` Juanma Barranquero
2019-11-19 19:22       ` Stefan Monnier
2019-11-19 19:45         ` Juanma Barranquero
2019-11-19 20:05           ` Stefan Monnier [this message]
2019-11-19 20:25             ` Juanma Barranquero
2019-11-19 20:56               ` Stefan Monnier
2019-11-19 21:26                 ` Drew Adams
2019-11-22 20:00                 ` Juanma Barranquero
2019-11-22 21:45                   ` Stefan Monnier
2019-11-23 21:12                     ` Juanma Barranquero
2019-11-23 22:08                       ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv1ru37hxp.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=lekktu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.