[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fred syntax awareness

>Date: Thu, 22 Oct 92 13:31:48 -0700
>From: "Carl L. Gay" <cgay@skinner.cs.uoregon.edu>
>To: info-mcl@cambridge.apple.com
>Subject: Fred syntax awareness
>Reply-To: cgay@cs.uoregon.edu
>I just noticed the following feature listed in the announcement of the
>MCL 2.0 release:                       
>-   A fully programmable syntax-aware editor which can instantly access source 
>code and documentation for any function, variable, or macro.
>How is Fred "syntax-aware"?  I've wanted some syntax support from Fred
>for quite a while for some Fred extensions I've written, but I
>couldn't find anything useful.  I need a function that when given a
>buffer position will return the syntax at that location.  e.g.,
>string, code, comment, etc.  Essentially the equivalent of
>zwei:shift-lock-cached-syntactic-context (if I remember the name
>correctly) and friends on Symbolics's.  Does anything like this exist
>in MCL, or has anyone hacked it up?

Since lisp syntax is so trivial, it doesn't take much to be 
syntax-aware: blinking parentheses and indentation takes care 
of most of it.

in the file lib;fred-additions.lisp (on the MCL cd under "Additional MCL
Source Code").

You can look at the CAR of the current s-expression and
find out for yourself whether it's a macro, function, or
whatnot. Maybe there's much more that people have hacked up,
but this is what you can start with if you want to roll your own.