theclapp

Search theclapp.blog-city.com

 

Red Perl

posted Monday, 25-Jun-2007
This morning I got a Perl script in a Lispworks editor buffer to turn red (the color of comments).

One of the things that bogged me down, that I haven't yet trained my brain sufficiently for, is the difference between

(defpackage :perl-mode
(:use :editor))

(in-package :perl-mode)
[...]
(setf (variable-value 'font-lock-fontify-syntactically-region-function ...)
...)

and
[...]

(setf (variable-value 'editor::font-lock-fontify-syntactically-region-function ...)
...)

One sets the variable I want to set, and one doesn't.

A key point in realizing my mistake came when I set tracing on my fontify function, ran Font Lock Fontify Buffer, and had the tracer output ... nothing.

I think I'll just say (in-package :editor) and not worry about it any more, at least for the moment.

Hmmm ... this whole what-package-is-my-symbol-in thing may be why Lispworks (and other CL-based Emacsen?) use strings as command names instead of symbols.

tags:        

links: digg this    del.icio.us    technorati    reddit