all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Any convention for the suffix of hook functions?
@ 2012-09-27  9:14 Bastien
  2012-09-27 13:06 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Bastien @ 2012-09-27  9:14 UTC (permalink / raw)
  To: emacs-devel

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




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-09-27 23:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-27  9:14 Any convention for the suffix of hook functions? Bastien
2012-09-27 13:06 ` Stefan Monnier
2012-09-27 23:00   ` Bastien

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.