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

[PATCH v2 1/2] diff: "lisp" userdiff_driver

From
Scott L. Burson via GitGitGadget <gitgitgadget@gmail.com>
Date
Nov 27, 2025, 02:38 UTC
Message-ID
<da99bb0bcd8c92e0d6de8b929b67095fae251f88.1764211096.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.2000.v2.git.1764211096.gitgitgadget@gmail.com>
From: "Scott L. Burson" <Scott@sympoiesis.com>

The "scheme" driver doesn't quite work for Common Lisp. This driver is very generic and should work for almost any dialect of Lisp, including Common Lisp.

Signed-off-by: Scott L. Burson <Scott@sympoiesis.com>
---
 userdiff.c | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/userdiff.c b/userdiff.c
index fe710a68bf..e127b4a1f1 100644
--- a/userdiff.c
+++ b/userdiff.c
@@ -249,6 +249,14 @@ PATTERNS("kotlin",
 	 "|[.][0-9][0-9_]*([Ee][-+]?[0-9]+)?[fFlLuU]?"
 	 /* unary and binary operators */
 	 "|[-+*/<>%&^|=!]==?|--|\\+\\+|<<=|>>=|&&|\\|\\||->|\\.\\*|!!|[?:.][.:]"),
+PATTERNS("lisp",
+	 /* Either an unindented left paren, or a slightly indented line
+	  * starting with "(def" */
+	 "^((\\(|:space:{1,2}\\(def).*)$",
+	 /* Common Lisp symbol syntax allows arbitrary strings between vertical bars */
+	 "\\|([^\\\\]|\\\\\\\\|\\\\\\|)*\\|"
+	 /* All other words are delimited by spaces or parentheses/brackets/braces */
+	 "|([^][(){} \t])+"),
 PATTERNS("markdown",
 	 "^ {0,3}#{1,6}[ \t].*",
 	 /* -- */
-- 
gitgitgadget
Previous: Scott L. Burson via GitGitGadgetNext: Scott L. Burson
Message 10 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.