Skip to content

Commit 01b3777

Browse files
added define and cond as lisp keywords
1 parent 819298e commit 01b3777

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/lang-lisp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ PR.registerLangHandler(
7777
[PR.PR_STRING, /^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/, null, '"']
7878
],
7979
[
80-
[PR.PR_KEYWORD, /^(?:block|c[ad]+r|catch|cons|defun|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, null],
80+
[PR.PR_KEYWORD, /^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, null],
8181
[PR.PR_LITERAL,
8282
/^[+\-]?(?:0x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],
8383
// A single quote possibly followed by a word that optionally ends with

tests/prettify_test.html

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -945,6 +945,9 @@ <h1>Bug 42 - Lisp Syntax Highlighting</h1>
945945
(turn-on-auto-fill)
946946
)
947947
)
948+
949+
;; Define and cond are keywords in scheme
950+
(define (sqt x) (sqrt-iter 1.0 2.0 x))
948951
</pre>
949952

950953
<h1>Bug 45 - Square brackets in strings</h1>
@@ -2488,7 +2491,12 @@ <h1>Scala mode</h1>
24882491
'&nbsp; &nbsp; &nbsp;`END`OPN(`END`PLNturn-on-auto-fill`END' +
24892492
'`CLO)`END`PLN<br>' +
24902493
'&nbsp; &nbsp;`END`CLO)`END`PLN<br>' +
2491-
'`END`CLO)`END'),
2494+
'`END`CLO)`END`PLN<br>' +
2495+
'<br>' +
2496+
'`END`COM;; Define and cond are keywords in scheme`END`PLN<br>' +
2497+
'`END`OPN(`END`KWDdefine`END`PLN `END`OPN(`END`PLNsqt x`END`CLO)`END' +
2498+
'`PLN `END`OPN(`END`PLNsqrt-iter `END`LIT1.0`END`PLN `END' +
2499+
'`LIT2.0`END`PLN x`END`CLO))`END'),
24922500
issue45: (
24932501
'`KWDthrow`END`PLN `END`KWDnew`END`PLN `END`TYPRuntimeException`END' +
24942502
'`PUN(`END`STR"Element ["`END`PLN `END`PUN+`END`PLN element`END' +

0 commit comments

Comments
 (0)