From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Boruch Baum <boruch_baum@gmx.com>
Cc: Emacs-Devel List <emacs-devel@gnu.org>
Subject: Re: adding to emacs coding standard / formatting
Date: Mon, 19 Oct 2020 10:24:49 -0400 [thread overview]
Message-ID: <jwvh7qqi9qy.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <20201019031002.iulr45ztrkwsiqlo@E15-2016.optimum.net> (Boruch Baum's message of "Sun, 18 Oct 2020 23:10:02 -0400")
> 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
next prev parent reply other threads:[~2020-10-19 14:24 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-19 3:10 adding to emacs coding standard / formatting Boruch Baum
2020-10-19 9:28 ` Stefan Kangas
2020-10-19 15:37 ` Drew Adams
2020-10-19 14:24 ` Stefan Monnier [this message]
2020-10-19 14:32 ` Eli Zaretskii
2020-10-19 19:59 ` Boruch Baum
2020-10-19 20:07 ` Drew Adams
2020-10-21 4:37 ` Richard Stallman
2020-10-21 14:46 ` Drew Adams
2020-10-20 5:11 ` Richard Stallman
2020-10-20 5:11 ` Richard Stallman
2020-10-20 5:55 ` Boruch Baum
2020-10-20 8:32 ` Eli Zaretskii
2020-10-20 9:30 ` Jean Louis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvh7qqi9qy.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=boruch_baum@gmx.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.