bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#72915: Docstrings of add-hook and remove-hook improvement?


From: Stefan Monnier
Subject: bug#72915: Docstrings of add-hook and remove-hook improvement?
Date: Sun, 15 Sep 2024 09:19:43 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

Tomas Nordin [2024-09-15 11:17:55] wrote:

> Stefan Kangas <stefankangas@gmail.com> writes:
>
>> Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of
>> text editors" <bug-gnu-emacs@gnu.org> writes:
>>
>>> Something like:
>>>
>>>       "Remove FUNCTION from HOOK's functions.
>>>     HOOK should be a symbol, and FUNCTION may be any valid function.
>>>     Does nothing if HOOK does not currently contain FUNCTION.
>>>     Compares functions with `equal`, which means that it can be
>>>     slow if FUNCTION is not a symbol.  See `add-hook'.
>>
>> Ah, now I see that you posted this proposal.  This is a better start
>> than what I had.
>>
>> Should we install it?
>
> This is about the doc of remove-hook. What about the edits in the
> add-hook docstring, was that OK? There was a question on the bit about
> setting the HOOK to nil, but I think that was sorted out.

The `add-hook` part was OK for me, indeed.

[ I'm no great fan of that paragraph (neither the original nor the one
  you replace it with), tho, because it's a bit "too detailed" for my
  taste.  E.g. the value *always* ends up being a list of functions, and
  the parenthesis states something which sounds to me like it should be
  inferrable from the rest of the docstring.  ]


        Stefan






reply via email to

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