git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Scott L. Burson" <Scott@sympoiesis.com>
Cc: "Johannes Sixt" <j6t@kdbg.org>,
	"Jaydeep P Das" <jaydeepjd.8914@gmail.com>,
	"Atharva Raykar" <raykar.ath@gmail.com>,
	git@vger.kernel.org, "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Scott L. Burson via GitGitGadget" <gitgitgadget@gmail.com>
Subject: Re: [PATCH] diff: "lisp" userdiff_driver
Date: Mon, 17 Nov 2025 20:38:34 -0800	[thread overview]
Message-ID: <xmqqldk4ez05.fsf@gitster.g> (raw)
In-Reply-To: <CAF5LJ4CMtEaJgDYRHXvCTUm9Pjpv2GAsMQN9D-DL-Ric3ADMXQ@mail.gmail.com> (Scott L. Burson's message of "Mon, 17 Nov 2025 15:23:19 -0800")

"Scott L. Burson" <Scott@sympoiesis.com> writes:

> ...  The greater
> potential for false positives comes from the rule (in my proposal)
> that a left parenthesis in column 0 is taken as indicating a top-level
> definition, without even looking at the following characters.

I didn't respond to that part as I didn't know if you were serious
or joking ;-).

> Although Lisp dialects certainly vary, I have not seen one in which
> standard indentation practice does not indent internal expressions;
> certainly, Lisp mode in Emacs indents them.  And, I think the rule
> really does need to be that broad, because top-level forms don't
> always begin with "def"; indeed, one can put any executable expression
> at top level in a source file to perform load-time initializations.

Exactly, but the more important question is are they considered as
the beginning of an important, and sematically distinct, block, just
like the beginning of a function is.  I am somewhat negative to the
"anything not indented is a beginning of a significant group", as I
do not know how well it meshes with the "(defXX is a beginning of a
function", when they are used together.

> One solution would be to add an aliasing mechanism to the
> driver table.  Perhaps there would be other use cases for it.  If you
> would consider a patch along these lines, I can code it up.

It is not a particularly interesting part of the problem, simply
because as the first approximation, we can just advertise "you can
mark your lisp files as 'scheme'".  A more interesting issue is if
we can indeed come up with such a superset of patterns that can
cover all Lisp variants that matter.

  reply	other threads:[~2025-11-18  4:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-15 10:17 [PATCH] diff: "lisp" userdiff_driver Scott L. Burson via GitGitGadget
2025-11-15 17:06 ` Johannes Sixt
2025-11-15 23:32   ` Scott L. Burson
2025-11-20 16:47     ` D. Ben Knoble
2025-11-27  2:10       ` Scott L. Burson
2025-11-16  5:30   ` Junio C Hamano
2025-11-17 23:23     ` Scott L. Burson
2025-11-18  4:38       ` Junio C Hamano [this message]
2025-11-27  2:38 ` [PATCH v2 0/2] userdiff: extend Scheme support to cover other Lisp dialects Scott L. Burson via GitGitGadget
2025-11-27  2:38   ` [PATCH v2 1/2] diff: "lisp" userdiff_driver Scott L. Burson via GitGitGadget
2025-11-27 10:32     ` Scott L. Burson
2025-11-27 10:51       ` Johannes Sixt
2025-11-27  2:38   ` [PATCH v2 2/2] merge with Scheme regexp; fix bugs Scott L. Burson via GitGitGadget
2025-11-27 16:09     ` Johannes Sixt
2025-12-02 10:27       ` Johannes Sixt

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=xmqqldk4ez05.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=Scott@sympoiesis.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=j6t@kdbg.org \
    --cc=jaydeepjd.8914@gmail.com \
    --cc=raykar.ath@gmail.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).