emacs-devel
[Top][All Lists]
Advanced

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

Any convention for the suffix of hook functions?


From: Bastien
Subject: Any convention for the suffix of hook functions?
Date: Thu, 27 Sep 2012 11:14:27 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (gnu/linux)

Hook *variables* are suffixed with "-hook" "-functions" or
"-function".

I don't know if this is a standard, but it looks like the use
of this convention is pretty consistent in Emacs Lisp.

Hook *functions* are sometimes suffixed with "-hook" too.

This sounds pretty natural first: "This function is meant to be
hooked into the corresponding hook variable" ... but I find this
confusing while reading the code.  When we say "a hook", for me
this is short for saying "a hook variable", so a hook function 
is not a hook in this sense...

(Still with me?)

My question is: is there a naming convention for naming hook 
functions?

I'm fine if there is none, but I'm curious about what other
devs do.

-- 
 Bastien




reply via email to

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