GNU bug report logs - #24829
24.5; `easy-mmode-define-navigation': rename `define-...', per convention

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sun, 30 Oct 2016 22:51:01 UTC

Severity: wishlist

Found in version 24.5

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 24829 in the body.
You can then email your comments to 24829 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#24829; Package emacs. (Sun, 30 Oct 2016 22:51:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 30 Oct 2016 22:51:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5; `easy-mmode-define-navigation': rename `define-...', per
 convention
Date: Sun, 30 Oct 2016 15:50:43 -0700 (PDT)
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.


In GNU Emacs 24.5.1 (i686-pc-mingw32)
 of 2015-04-11 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=3D/c/usr --host=3Di686-pc-mingw32'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24829; Package emacs. (Sat, 27 Jul 2019 12:51:01 GMT) Full text and rfc822 format available.

Message #8 received at 24829 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 24829 <at> debbugs.gnu.org
Subject: Re: bug#24829: 24.5; `easy-mmode-define-navigation': rename
 `define-...', per convention
Date: Sat, 27 Jul 2019 14:50:50 +0200
Drew Adams <drew.adams <at> 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?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24829; Package emacs. (Wed, 12 Aug 2020 00:47:01 GMT) Full text and rfc822 format available.

Message #11 received at 24829 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 24829 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: Re: bug#24829: 24.5; `easy-mmode-define-navigation': rename
 `define-...', per convention
Date: Tue, 11 Aug 2020 17:46:10 -0700
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Drew Adams <drew.adams <at> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#24829; Package emacs. (Wed, 12 Aug 2020 10:52:02 GMT) Full text and rfc822 format available.

Message #14 received at 24829 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: Drew Adams <drew.adams <at> oracle.com>, 24829 <at> debbugs.gnu.org
Subject: Re: bug#24829: 24.5; `easy-mmode-define-navigation': rename
 `define-...', per convention
Date: Wed, 12 Aug 2020 12:51:40 +0200
Stefan Kangas <stefan <at> marxist.se> writes:

> 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.

OK, closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 24829 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 12 Aug 2020 10:52:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 09 Sep 2020 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 229 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.