[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Fred syntax awareness
- To: "Carl L. Gay" <firstname.lastname@example.org>
- Subject: Fred syntax awareness
- From: Steve Strassmann <email@example.com>
- Date: Thu, 22 Oct 1992 18:44:32 -0500
- Cc: info-mcl
>Date: Thu, 22 Oct 92 13:31:48 -0700
>From: "Carl L. Gay" <firstname.lastname@example.org>
>Subject: Fred syntax awareness
>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.
Check out functions like BUFFER-CURRENT-SEXP or ED-CURRENT-SYMBOL
in the file lib;fred-additions.lisp (on the MCL cd under "Additional MCL
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.