emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 49192e9: Strip "(fn...)" from output of `describe-mode' (bug#


From: Juanma Barranquero
Subject: Re: master 49192e9: Strip "(fn...)" from output of `describe-mode' (bug#38222)
Date: Sat, 23 Nov 2019 22:12:27 +0100

On Fri, Nov 22, 2019 at 10:45 PM Stefan Monnier <address@hidden> wrote:

> And if it's just t it could always return a pair.
> Sounds good.

Please take a look.

The patches do not include info changes, because help-split-fundoc is not
documented. Should this change, once accepted, be mentioned in NEWS?

BTW, other than the discussed new feature, I've added the following tiny,
sort of incompatible change:

 Before:
- DEF = non-symbol => usage = "(anonymous ARGS...)"
- DEF = symbol s => usage = "(s ARGS...)"

Now:
- DEF = non-symbol OR nil => "(anonymous ARGS...)"
- DEF = other symbol s => "(s ARGS...)"

When callers are not interested in the usage they can already pass a
non-symbol, like "" or 0, but perusing the sources, 3 out of 14 uses of
help-split-fundoc pass nil, and none of them passes a non-symbol.

Treating nil like "don't care" saves two function calls over the current
code (which passes nil through help--docstring-quote), and DEF is
documented as "the function whose usage we're looking for", so
nil = "don't care" makes more sense than "" or 0.

I can revert this part of the patch (is a one-liner), if you're worried
about the incompatibility.


Attachment: 0001-Make-help-split-fundoc-more-flexible-about-what-retu.patch
Description: Binary data

Attachment: 0002-Rework-previous-change-to-fix-bug-38222.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]