Skip to content

Commit ccf37a5

Browse files
committed
"lisp" userdiff_driver
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>
1 parent fd372d9 commit ccf37a5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

userdiff.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,14 @@ PATTERNS("kotlin",
249249
"|[.][0-9][0-9_]*([Ee][-+]?[0-9]+)?[fFlLuU]?"
250250
/* unary and binary operators */
251251
"|[-+*/<>%&^|=!]==?|--|\\+\\+|<<=|>>=|&&|\\|\\||->|\\.\\*|!!|[?:.][.:]"),
252+
PATTERNS("lisp",
253+
/* Either an unindented left paren, or a slightly indented line
254+
* starting with "(def" */
255+
"^((\\(|:space:{1,2}\\(def).*)$",
256+
/* Common Lisp symbol syntax allows arbitrary strings between vertical bars */
257+
"\\|([^\\\\]|\\\\\\\\|\\\\\\|)*\\|"
258+
/* All other words are delimited by spaces or parentheses/brackets/braces */
259+
"|([^][(){} \t])+"),
252260
PATTERNS("markdown",
253261
"^ {0,3}#{1,6}[ \t].*",
254262
/* -- */

0 commit comments

Comments
 (0)