Is this thing on?

SyntaxHighlighter elisp brush


Posted on 7th December, by Ben in Blog, Elisp, Javascript. No Comments

I plan to post some of my elisp code from emacs customizations. I want them to be pretty and useful, so I wrote an elisp brush for the SyntaxHighlighter javascript library. There are only a few styles defined, but I think it adds to the code’s readability. I have included the comments, strings, tags and hashes of elisp in the styles. I have also set special coloring for a collection of the ‘def’ commands. A sample set is shown below.
;; Comment
(defun declared-function-name
    (basic-function "string1")
    (another-function :tag value))
;; Another comment
(defcustom custom-var t)
(defface face)
(defvar variable 'setting)
(defmacro like/a/function)
;; Last Comment
(defadvice printMsg (before 'basic-function)
     (message "Marco!"))
That example is a bit too colorful for my taste, but I am hopeful that the highlighting will add something to real world elisp examples. The implementation on this site is done as a WordPress plug-in as outlined in these instructions. Once I figure out how to package and post a plugin, I will do so.



Leave a Reply



From the Blog

Here are the latest items from the blog. Hopefully there is something interesting to show.

Bookmarks for January 10th through March 12th

Interesting links links for January 10th through March 12th:

Low Sodium Recipe Archive – Recipes for my dad. Amazon.com: Prime Eligible – Kindle Edition:...
Bookmarks for September 14th through October 18th

Interesting links links for September 14th through October 18th:

QuantumLevitation « adafruit industries blog – Floating discs are cool Cool tech demo: match 3D...