summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--prettify/lang-lisp.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/prettify/lang-lisp.js b/prettify/lang-lisp.js
index 4cffa53..49c05ee 100644
--- a/prettify/lang-lisp.js
+++ b/prettify/lang-lisp.js
@@ -67,8 +67,8 @@
PR.registerLangHandler(
PR.createSimpleLexer(
[
- ['opn', /^\(/, null, '('],
- ['clo', /^\)/, null, ')'],
+ ['opn', /^\(|\[/, null, ''],
+ ['clo', /^\)|\]/, null, ''],
// A line comment that starts with ;
[PR.PR_COMMENT, /^;[^\r\n]*/, null, ';'],
// Whitespace
@@ -77,17 +77,17 @@ 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|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|loop|with--*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?\b|define--*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?\b|for|in|from|to|fn|defn|def)/, 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
+ // A single quote or a colon possibly followed by a word that optionally ends with
// = ! or ?.
[PR.PR_LITERAL,
- /^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],
+ /^(\'|\:)(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],
// A word that optionally ends with = ! or ?.
[PR.PR_PLAIN,
/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],
// A printable non-space non-special character
- [PR.PR_PUNCTUATION, /^[^\w\t\n\r \xA0()\"\\\';]+/]
+ [PR.PR_PUNCTUATION, /^[^\w\t\n\r \xA0\"\\\';]+/]
]),
['cl', 'el', 'lisp', 'scm']);