all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bastien <bzg@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Any convention for the suffix of hook functions?
Date: Fri, 28 Sep 2012 01:00:34 +0200	[thread overview]
Message-ID: <878vbvrrzh.fsf@bzg.ath.cx> (raw)
In-Reply-To: <jwvzk4bwrl4.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 27 Sep 2012 09:06:09 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> 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,

-- 
 Bastien



      reply	other threads:[~2012-09-27 23:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878vbvrrzh.fsf@bzg.ath.cx \
    --to=bzg@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.