emacs-devel
[Top][All Lists]
Advanced

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

Re: adding to emacs coding standard / formatting


From: Stefan Monnier
Subject: Re: adding to emacs coding standard / formatting
Date: Mon, 19 Oct 2020 10:24:49 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> That isn't the case in package time.el, so that's probably also the case
> in other packages.  Should doing so be added to the coding standard?

While this can work well for some files, I think it would work poorly
for others, so I'd rather not require this specific standard (and
I expect it will be difficult to get enough agreement on any specific
proposal anyway).

But I'd be in favor of encouraging such structure, e.g. by "leading by
example", or by having `C-h P` give better result for packages which do
follow such a structure, or by providing good templates (hooked into
the auto-insert system), ...

Maybe we can also mention the importance of such a structure *in
general*, without recommending any one particular structure  but just
showing a few good examples.

> Also, this is an opportunity to address a pet peeve: I occasionally see
> code either defining keybindings to lambda functions, or setting lambda
> functions as elements of function lists (eg. lists of hook functions).
> I'd like to propose that those uses be banned because of their
> difficulty to modify.

I think I mostly agree, but as always there will be exceptions where
using a symbol is impossible or wouldn't help (typically because the
function really can't be predefined once and for all).

Maybe you could start by adding compiler warnings for those, and then
submit patches that address the easy-to-fix cases.


        Stefan




reply via email to

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