GNU bug report logs - #72915
Docstrings of add-hook and remove-hook improvement?

Previous Next

Package: emacs;

Reported by: Tomas Nordin <tomasn <at> posteo.net>

Date: Sat, 31 Aug 2024 12:38:01 UTC

Severity: normal

Tags: patch

Fixed in version 30.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #60 received at 72915-done <at> debbugs.gnu.org (full text, mbox):

From: Tomas Nordin <tomasn <at> posteo.net>
To: Stefan Kangas <stefankangas <at> gmail.com>, Stefan Monnier
 <monnier <at> iro.umontreal.ca>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 72915-done <at> debbugs.gnu.org
Subject: Re: bug#72915: Docstrings of add-hook and remove-hook improvement?
Date: Fri, 28 Feb 2025 17:38:29 +0000
Stefan Kangas <stefankangas <at> gmail.com> writes:

> No need, thanks.  I just pushed your patch to emacs-30 with the below
> small change to use the imperative mood.
>
> Thanks for the patch!  Closing this bug now.
>
> diff --git a/lisp/subr.el b/lisp/subr.el
> index d0faff73e4a..7af21125b33 100644
> --- a/lisp/subr.el
> +++ b/lisp/subr.el
> @@ -2177,8 +2177,8 @@ add-hook
>  (defun remove-hook (hook function &optional local)
>    "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
> +Do nothing if HOOK does not currently contain FUNCTION.
> +Compare functions with `equal`, which means that it can be
>  slow if FUNCTION is not a symbol.  See `add-hook'.
>
>  The optional third argument, LOCAL, if non-nil, says to modify

I wanted to write it like that but was too shy and took Stefan M:s text
verbatim. Perfect, thanks.




This bug report was last modified 78 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.