Skip to content

Instantly share code, notes, and snippets.

@abutcher
Created September 13, 2010 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save abutcher/577935 to your computer and use it in GitHub Desktop.
Save abutcher/577935 to your computer and use it in GitHub Desktop.
SyntaxHighlighter.brushes.CommonLisp = function()
{
var funcs = 'lambda list progn mapcar car cdr reverse member append format';
var keywords = 'let while unless cond if eq t nil defvar dotimes setf listp numberp not equal';
var macros = 'loop when dolist dotimes defun';
var operators = '> < + - = * / %';
this.regexList = [
{ regex: SyntaxHighlighter.regexLib.multiLineDoubleQuotedString, css: 'string' },
{ regex: new RegExp('&\\w+;', 'g'), css: 'plain' },
{ regex: new RegExp(';.*', 'g'), css: 'comments' },
{ regex: new RegExp("'(\\w|-)+", 'g'), css: 'variable' },
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' },
{ regex: new RegExp(this.getKeywords(macros), 'gm'), css: 'keyword' },
{ regex: new RegExp(this.getKeywords(funcs), 'gm'),css: 'functions' },
];
this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
}
SyntaxHighlighter.brushes.CommonLisp.prototype = new SyntaxHighlighter.Highlighter();
SyntaxHighlighter.brushes.CommonLisp.aliases = ['lisp', 'cl', 'el'];
@ajmath
Copy link

ajmath commented Sep 13, 2010

Should some of the things in funcs be highlighted as a keyword?

@abutcher
Copy link
Author

Definitely -- Evaluating this shit again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment