[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 49192e9: Strip "(fn...)" from output of `describe-mode' (bug#
From: |
Stefan Monnier |
Subject: |
Re: master 49192e9: Strip "(fn...)" from output of `describe-mode' (bug#38222) |
Date: |
Tue, 19 Nov 2019 15:05:00 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
>> 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
- Re: master 49192e9: Strip "(fn...)" from output of `describe-mode' (bug#38222), Stefan Monnier, 2019/11/19
- Re: master 49192e9: Strip "(fn...)" from output of `describe-mode' (bug#38222), Juanma Barranquero, 2019/11/19
- Re: master 49192e9: Strip "(fn...)" from output of `describe-mode' (bug#38222), Stefan Monnier, 2019/11/19
- Re: master 49192e9: Strip "(fn...)" from output of `describe-mode' (bug#38222), Juanma Barranquero, 2019/11/19
- Re: master 49192e9: Strip "(fn...)" from output of `describe-mode' (bug#38222),
Stefan Monnier <=
- Re: master 49192e9: Strip "(fn...)" from output of `describe-mode' (bug#38222), Juanma Barranquero, 2019/11/19
- Re: master 49192e9: Strip "(fn...)" from output of `describe-mode' (bug#38222), Stefan Monnier, 2019/11/19
- RE: master 49192e9: Strip "(fn...)" from output of `describe-mode' (bug#38222), Drew Adams, 2019/11/19
- Re: master 49192e9: Strip "(fn...)" from output of `describe-mode' (bug#38222), Juanma Barranquero, 2019/11/22
- Re: master 49192e9: Strip "(fn...)" from output of `describe-mode' (bug#38222), Stefan Monnier, 2019/11/22
- Re: master 49192e9: Strip "(fn...)" from output of `describe-mode' (bug#38222), Juanma Barranquero, 2019/11/23
- Re: master 49192e9: Strip "(fn...)" from output of `describe-mode' (bug#38222), Stefan Monnier, 2019/11/23