all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#24829: 24.5; `easy-mmode-define-navigation': rename `define-...', per convention
@ 2016-10-30 22:50 Drew Adams
  2019-07-27 12:50 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2016-10-30 22:50 UTC (permalink / raw)
  To: 24829

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'





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#24829: 24.5; `easy-mmode-define-navigation': rename `define-...', per convention
  2016-10-30 22:50 bug#24829: 24.5; `easy-mmode-define-navigation': rename `define-...', per convention Drew Adams
@ 2019-07-27 12:50 ` Lars Ingebrigtsen
  2020-08-12  0:46   ` Stefan Kangas
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-27 12:50 UTC (permalink / raw)
  To: Drew Adams; +Cc: 24829

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?

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#24829: 24.5; `easy-mmode-define-navigation': rename `define-...', per convention
  2019-07-27 12:50 ` Lars Ingebrigtsen
@ 2020-08-12  0:46   ` Stefan Kangas
  2020-08-12 10:51     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Kangas @ 2020-08-12  0:46 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 24829

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#24829: 24.5; `easy-mmode-define-navigation': rename `define-...', per convention
  2020-08-12  0:46   ` Stefan Kangas
@ 2020-08-12 10:51     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-12 10:51 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 24829

Stefan Kangas <stefan@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





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-08-12 10:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-30 22:50 bug#24829: 24.5; `easy-mmode-define-navigation': rename `define-...', per convention Drew Adams
2019-07-27 12:50 ` Lars Ingebrigtsen
2020-08-12  0:46   ` Stefan Kangas
2020-08-12 10:51     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.