[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: About definition finding
From: |
Drew Adams |
Subject: |
RE: About definition finding |
Date: |
Wed, 6 Mar 2013 08:11:44 -0800 |
> In (info "(elisp) Coding Conventions"):
>
> * Constructs that define a function or variable should be macros,
> not functions, and their names should start with `define-'. The
> macro should receive the name to be defined as the
> first argument.
> That will help various tools find the definition automatically.
> Avoid constructing the names in the macro itself, since
> that would confuse these tools.
>
> Which tools will make use of it? Imenu/etags/...? I'm not quite
> familiar with it. Can anybody help? Thanks.
Yes, both Imenu and Emacs tags. And perhaps other tools that you might write to
take advantage of such a convention.
Note that this doc section's guideline conflicts a bit with that of adding a
package/library prefix to such macros. E.g., `icicle-define-command' vs
`define-icicle-command'. I put the library prefix first, but others might do
otherwise.