Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

Commit

Permalink
added define and cond as lisp keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Jul 21, 2010
1 parent 819298e commit 01b3777
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lang-lisp.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ PR.registerLangHandler(
[PR.PR_STRING, /^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/, null, '"']
],
[
[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],
[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],
[PR.PR_LITERAL,
/^[+\-]?(?:0x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],
// A single quote possibly followed by a word that optionally ends with
Expand Down
10 changes: 9 additions & 1 deletion tests/prettify_test.html
Original file line number Diff line number Diff line change
Expand Up @@ -945,6 +945,9 @@ <h1>Bug 42 - Lisp Syntax Highlighting</h1>
(turn-on-auto-fill)
)
)

;; Define and cond are keywords in scheme
(define (sqt x) (sqrt-iter 1.0 2.0 x))
</pre>

<h1>Bug 45 - Square brackets in strings</h1>
Expand Down Expand Up @@ -2488,7 +2491,12 @@ <h1>Scala mode</h1>
'&nbsp; &nbsp; &nbsp;`END`OPN(`END`PLNturn-on-auto-fill`END' +
'`CLO)`END`PLN<br>' +
'&nbsp; &nbsp;`END`CLO)`END`PLN<br>' +
'`END`CLO)`END'),
'`END`CLO)`END`PLN<br>' +
'<br>' +
'`END`COM;; Define and cond are keywords in scheme`END`PLN<br>' +
'`END`OPN(`END`KWDdefine`END`PLN `END`OPN(`END`PLNsqt x`END`CLO)`END' +
'`PLN `END`OPN(`END`PLNsqrt-iter `END`LIT1.0`END`PLN `END' +
'`LIT2.0`END`PLN x`END`CLO))`END'),
issue45: (
'`KWDthrow`END`PLN `END`KWDnew`END`PLN `END`TYPRuntimeException`END' +
'`PUN(`END`STR"Element ["`END`PLN `END`PUN+`END`PLN element`END' +
Expand Down

0 comments on commit 01b3777

Please sign in to comment.