bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#24829: 24.5; `easy-mmode-define-navigation': rename `define-...', pe


From: Stefan Kangas
Subject: bug#24829: 24.5; `easy-mmode-define-navigation': rename `define-...', per convention
Date: Tue, 11 Aug 2020 17:46:10 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Drew Adams <drew.adams@oracle.com> writes:
>
>> Macro `easy-mmode-define-navigation' apparently defines Emacs commands
>> (functions).  Per the Emacs Lisp coding conventions, its seems that the
>> macro should be renamed.
>>
>>>>From (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'm not sure how much of an edict that's supposed to be.
>
> easy-mmode has other functions/macros using the same naming convention
> (like easy-mmode-define-syntax), but those don't define functions, of
> course.
>
> We could change easy-mmode-define-navigation to, say,
> `define-easy-mmode-navigation', but I'm not sure that would be a net
> win, confusion wise.  Anybody have an opinion here?

FWIW, I also think the original name is less confusing.  It also
includes the package name prefix, which is probably nice given its
surrounding context.

Best regards,
Stefan Kangas





reply via email to

[Prev in Thread] Current Thread [Next in Thread]