[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#13740: About a coding convention
From: |
Xue Fuqiao |
Subject: |
bug#13740: About a coding convention |
Date: |
Thu, 21 Feb 2013 08:28:57 +0800 |
On Tue, 19 Feb 2013 14:55:35 -0500
Glenn Morris <rgm@gnu.org> wrote:
> Xue Fuqiao 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.
> >
> > I think macros like `cl-defsubst', `cl-defun' should be mentioned here.
> Why?
They are macros that define functions, but they don't start with `define-'.
> What would you say about them?
Maybe something like this:
Constructs that define a function or variable should be macros, not functions,
and their names should start with `define-', except for some macros in
`cl-lib', like `cl-defsubst' and `cl-defun'.
--
Best regards, Xue Fuqiao.
http://www.emacswiki.org/emacs/XueFuqiao