From: Philipp Stephani <p.stephani2@gmail.com>
To: Barry Margolin <barmar@alum.mit.edu>, help-gnu-emacs@gnu.org
Subject: Re: Naming conventions for defining macros
Date: Sun, 21 Jun 2015 19:47:19 +0000 [thread overview]
Message-ID: <CAArVCkQYdxT4yibucYV0FfneXtj4O7VtVgV88-U+a-+B8deiFg@mail.gmail.com> (raw)
In-Reply-To: <barmar-B19E94.10384824022015@88-209-239-213.giganet.hu>
Barry Margolin <barmar@alum.mit.edu> schrieb am Di., 24. Feb. 2015 um
16:45 Uhr:
> In article <mailman.727.1424760332.31049.help-gnu-emacs@gnu.org>,
> Philipp Stephani <p.stephani2@gmail.com> wrote:
>
> > Hi,
> >
> > the manual page about coding conventions says: "Constructs that define a
> > function or variable should be macros, not functions, and their names
> > should start with `define-'." This recommendation is at odds with the
> usual
> > recommendation to prefix all non-local names with the package name and
> > doesn't seem to be widely followed by either Emacs (e.g. ert-deftest,
> > cl-defstruct) or popular third-party packages (e.g.
> magit-define-command).
> > Should we get rid of this recommendation? It amounts to special-casing a
> > certain class of names without much benefit.
>
> I think you're expected to combine the conventions, hence
> magit-define-command. It obeys the recommendation to use the package
> name prefix, then the define- prefix.
>
>
Instead of trying to formalize this convention, would it do much harm to
get rid of the 'define-' convention altogether? AFAIK there's no other kind
of function with a conventional midfix; the other conventions are either
suffixes (e.g. '-hook') or prefixes (the package name).
next prev parent reply other threads:[~2015-06-21 19:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.727.1424760332.31049.help-gnu-emacs@gnu.org>
2015-02-24 15:38 ` Naming conventions for defining macros Barry Margolin
2015-06-21 19:47 ` Philipp Stephani [this message]
2015-02-24 6:45 Philipp Stephani
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=CAArVCkQYdxT4yibucYV0FfneXtj4O7VtVgV88-U+a-+B8deiFg@mail.gmail.com \
--to=p.stephani2@gmail.com \
--cc=barmar@alum.mit.edu \
--cc=help-gnu-emacs@gnu.org \
/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.