Update of /project/lisppaste/cvsroot/lisppaste2 In directory common-lisp.net:/home/bmastenbrook/lisppaste2
Modified Files: coloring-types.lisp lisppaste.asd Log Message: elisp colorization
Date: Thu Jun 3 13:20:46 2004 Author: bmastenbrook
Index: lisppaste2/coloring-types.lisp diff -u lisppaste2/coloring-types.lisp:1.3 lisppaste2/coloring-types.lisp:1.4 --- lisppaste2/coloring-types.lisp:1.3 Thu Jun 3 07:17:04 2004 +++ lisppaste2/coloring-types.lisp Thu Jun 3 13:20:46 2004 @@ -22,10 +22,6 @@ (defparameter *close-parens* '(#)))
(define-coloring-type :lisp "Basic Lisp" - :autodetect (lambda (name) - (member name '("emacs") - :test #'(lambda (name ext) - (search ext name :test #'char-equal)))) :modes (:normal :symbol :escaped-symbol :keyword :string :comment :multiline :character :single-escaped :in-list :syntax-error) @@ -191,6 +187,24 @@ (declare (ignore type)) (let ((result (if (find-package :r5rs-lookup) (funcall (symbol-function (intern "SYMBOL-LOOKUP" :r5rs-lookup)) + s)))) + (if result + (format nil "<a href="~A" class="symbol">~A</a>" + result (call-parent-formatter)) + (call-parent-formatter))))))) + +(define-coloring-type :elisp "Emacs Lisp" + :autodetect (lambda (name) + (member name '("emacs") + :test #'(lambda (name ext) + (search ext name :test #'char-equal)))) + :parent :lisp + :formatters + (((:symbol :escaped-symbol) + (lambda (type s) + (declare (ignore type)) + (let ((result (if (find-package :elisp-lookup) + (funcall (symbol-function (intern "SYMBOL-LOOKUP" :elisp-lookup)) s)))) (if result (format nil "<a href="~A" class="symbol">~A</a>"
Index: lisppaste2/lisppaste.asd diff -u lisppaste2/lisppaste.asd:1.10 lisppaste2/lisppaste.asd:1.11 --- lisppaste2/lisppaste.asd:1.10 Thu Jun 3 07:17:58 2004 +++ lisppaste2/lisppaste.asd Thu Jun 3 13:20:46 2004 @@ -1,5 +1,5 @@ ;;;; Silly emacs, this is -*- Lisp -*- -;;;; $Id: lisppaste.asd,v 1.10 2004/06/03 14:17:58 bmastenbrook Exp $ +;;;; $Id: lisppaste.asd,v 1.11 2004/06/03 20:20:46 bmastenbrook Exp $ ;;;; $Source: /project/lisppaste/cvsroot/lisppaste2/lisppaste.asd,v $
;;;; See the LICENSE file for licensing information. @@ -33,6 +33,7 @@ (:file "colorize" :depends-on ("colorize-package" "coloring-css")) (:file "clhs-lookup" :depends-on ("encode-for-pre")) (:file "r5rs-lookup" :depends-on ("encode-for-pre")) + (:file "elisp-lookup" :depends-on ("encode-for-pre")) (:file "coloring-types" :depends-on ("colorize" "clhs-lookup")) (:file "web-server"