git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] diff: "lisp" userdiff_driver

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 18, 2025, 04:38 UTC
Message-ID
<xmqqldk4ez05.fsf@gitster.g>
In-Reply-To
<CAF5LJ4CMtEaJgDYRHXvCTUm9Pjpv2GAsMQN9D-DL-Ric3ADMXQ@mail.gmail.com>
"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 ;-).

Show 6 quoted lines
> 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.

Previous: Scott L. BursonNext: Scott L. Burson via GitGitGadget
Message 8 of 27 in “diff: "lisp" userdiff_driver”
  1. diff: "lisp" userdiff_driverScott L. Burson via GitGitGadget, Nov 15, 2025
  2. Johannes SixtNov 15, 2025
  3. Scott L. BursonNov 15, 2025
  4. D. Ben KnobleNov 20, 2025
  5. Scott L. BursonNov 27, 2025
  6. Junio C HamanoNov 16, 2025
  7. Scott L. BursonNov 17, 2025
  8. Junio C HamanoNov 18, 2025
  9. 0/2 userdiff: extend Scheme support to cover other Lisp dialectsScott L. Burson via GitGitGadget, Nov 27, 2025
  10. 1/2 diff: "lisp" userdiff_driverScott L. Burson via GitGitGadget, Nov 27, 2025
  11. Scott L. BursonNov 27, 2025
  12. Johannes SixtNov 27, 2025
  13. 2/2 merge with Scheme regexp; fix bugsScott L. Burson via GitGitGadget, Nov 27, 2025
  14. Johannes SixtNov 27, 2025
  15. Johannes SixtDec 2, 2025
  16. Scott L. BursonJan 14, 2026
  17. Johannes SixtJan 14, 2026
  18. 0/2 userdiff: extend Scheme support to cover other Lisp dialectsScott L. Burson via GitGitGadget, Jan 15, 2026
  19. 1/2 userdiff: tighten word-diff test case of the scheme driverJohannes Sixt via GitGitGadget, Jan 15, 2026
  20. 2/2 userdiff: extend Scheme support to cover other Lisp dialectsScott L. Burson via GitGitGadget, Jan 15, 2026
  21. Johannes SixtJan 16, 2026
  22. Scott L. BursonJan 17, 2026
  23. Johannes SixtJan 17, 2026
  24. 0/2 userdiff: extend Scheme support to cover other Lisp dialectsScott L. Burson via GitGitGadget, Apr 15, 2026
  25. 1/2 userdiff: tighten word-diff test case of the scheme driverJohannes Sixt via GitGitGadget, Apr 15, 2026
  26. 2/2 userdiff: extend Scheme support to cover other Lisp dialectsScott L. Burson via GitGitGadget, Apr 15, 2026
  27. Johannes SixtApr 15, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.