all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefankangas@gmail.com>
To: Adam Spiers <emacs-devel@adamspiers.org>,
	Protesilaos Stavrou <info@protesilaos.com>
Cc: emacs-devel@gnu.org
Subject: Re: Patch upstream Git for Elisp diff hunk headings
Date: Thu, 11 Feb 2021 13:05:19 -0600	[thread overview]
Message-ID: <CADwFkmnY0c_VNrYAWNYfD27bF=y2vwr=TOORcVio-RpvR_4-PA@mail.gmail.com> (raw)
In-Reply-To: <CAOkDyE_HFTnGz2mcKs7zVzrB3Y2smOyQJfMMV_HtZX_uFOAgKQ@mail.gmail.com>

Adam Spiers <emacs-devel@adamspiers.org> writes:

> While of course no one is claiming that this is technically correct in
> all cases, I don't think I can actually recall ever seeing a single
> instance of a top-level form which *was* indented.  So presumably it's
> a good enough heuristic to be helpful in the vast majority of cases.
> Or at least it's more likely to be right than a heuristic which
> assumes that all top-level forms include "def" in the first symbol in
> the form, since the latter obviously fails in many common scenarios
> including the init files one mentioned above.

(It also fails with `ert-deftest', and probably also other unit test
frameworks in popular use.)

I'd say go for it.  The heuristics seems like a clear improvement and
this feature would be appreciated.

Thanks for working on this.



  reply	other threads:[~2021-02-11 19:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-11 14:42 Patch upstream Git for Elisp diff hunk headings Protesilaos Stavrou
2021-02-11 18:27 ` Adam Spiers
2021-02-11 19:05   ` Stefan Kangas [this message]
2021-02-12 17:39     ` Basil L. Contovounesios
2021-02-11 19:13   ` Clément Pit-Claudel
2021-02-11 19:15   ` Óscar Fuentes
2021-02-11 19:38   ` Stefan Monnier
2021-02-13 19:35     ` Adam Spiers

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='CADwFkmnY0c_VNrYAWNYfD27bF=y2vwr=TOORcVio-RpvR_4-PA@mail.gmail.com' \
    --to=stefankangas@gmail.com \
    --cc=emacs-devel@adamspiers.org \
    --cc=emacs-devel@gnu.org \
    --cc=info@protesilaos.com \
    /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.