|
From: | Xue Fuqiao |
Subject: | Re: About definition finding |
Date: | Thu, 07 Mar 2013 06:18:38 +0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130221 Thunderbird/17.0.3 |
On 03/07/2013 12:11 AM, Drew Adams wrote:
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.
Ah, I see, thanks.
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.
Does alias make sense? E.g., `package-list-packages' is an alias of `list-packages'.
-- Best regards, Xue Fuqiao. http://www.emacswiki.org/emacs/XueFuqiao
[Prev in Thread] | Current Thread | [Next in Thread] |