[Top][All Lists]

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

Re: Any convention for the suffix of hook functions?

From: Bastien
Subject: Re: Any convention for the suffix of hook functions?
Date: Fri, 28 Sep 2012 01:00:34 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

> but while I don't want to explicitly discourage
> such names (I use them myself), they're not very good since they don't
> describe what the function does but only who calls them.

Okay.  I've renamed such functions in Org when it made sense,
I've kept the -hook suffix for others.

> Still, it's a "natural" choice when you can't come up with a good way to
> describe what the function actually does; and that happens often because
> it's in the nature of the functions we add to hooks to be ad-hoc and
> strongly depend on who calls them.

Agreed.  Another idea in the same vein is that those functions are 
only relevant when run within hooks.  Still, it may sometimes just be
laziness so I tried to give some Org functions explicit names.

Thanks for the explanations,


reply via email to

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