From: Adam Porter <adam@alphapapa.net>
To: emacs-devel@gnu.org
Subject: Re: 2a73673 Change how thread-first/thread-last indent the first argument
Date: Tue, 05 Oct 2021 01:58:33 -0500 [thread overview]
Message-ID: <87ee90vtye.fsf@alphapapa.net> (raw)
Hi Lars, et al,
In this commit, you changed the thread-last macro's indentation from
(indent 1) to (indent 0). Could this be reverted, please? This change
has two drawbacks:
1. The threaded form is no longer indented differently from the other
forms, so it no longer stands out. In some code, this makes it harder
to read. For example, in deffy.el (an example application in the
taxy.el repo), this form is now much harder to read:
(thread-last
(make-fn
:name "Deffy"
:description
(format "Definitions in %s:"
(if files
(string-join (mapcar #'file-relative-name files) ", ")
(file-name-nondirectory
(directory-file-name (project-root project)))))
:take (taxy-make-take-function keys deffy-keys))
(taxy-fill forms)
(taxy-sort* #'string< #'taxy-name)
(taxy-sort #'string< #'def-name))
Whereas before, it looked like this:
(thread-last
(make-fn
:name "Deffy"
:description
(format "Definitions in %s:"
(if files
(string-join (mapcar #'file-relative-name files) ", ")
(file-name-nondirectory
(directory-file-name (project-root project)))))
:take (taxy-make-take-function keys deffy-keys))
(taxy-fill forms)
(taxy-sort* #'string< #'taxy-name)
(taxy-sort #'string< #'def-name))
Without the extra indentation for the first form, it's hard to see where
the threaded form ends and the threaded-into forms begin.
2. The change in indentation results in "indentation churn" in every
downstream package that uses thread-last or thread-first. For example,
I use aggressive-indent-mode when editing Elisp packages, to ensure that
they're always indented properly, and now all of these forms get
reindented, and it makes extra diffs to scrutinize when committing other
changes in Magit.
Thanks for your consideration.
Adam
next reply other threads:[~2021-10-05 6:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-05 6:58 Adam Porter [this message]
2021-10-05 7:35 ` 2a73673 Change how thread-first/thread-last indent the first argument Lars Ingebrigtsen
2021-10-05 8:41 ` Adam Porter
2021-10-05 14:50 ` Basil L. Contovounesios
2021-10-06 9:08 ` Lars Ingebrigtsen
2021-10-06 10:27 ` Stefan Kangas
2021-10-06 11:32 ` Adam Porter
2021-10-06 10:49 ` Adam Porter
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=87ee90vtye.fsf@alphapapa.net \
--to=adam@alphapapa.net \
--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.