On Mon, 29 Oct 2001 markus.nentwig@nokia.com wrote:
>is there an easy way to get a list of all words, which Maxima recognizes or
>uses for its own purposes?
As a matter of fact, yes. I was interested in that for getting the
list of candidate keywords for readline completion, and Dr. Schelter
suggested me the way. I'm not sure whether I tested this with Maxima
or just with Gcl, but it should work with both. The bad thing is,
that if I understood correctly sloop is special to Gcl and not Common
Lisp.
Anyway, here's the relevant part of my readline-patch:
+; init Readline word completion list for Gcl
+ (if (fboundp 'si::readline-init)
+ (let (l)
+ (sloop::sloop for v in-package 'lisp do
+ (if (or (boundp v) (fboundp v))
+ (setq l (cons (symbol-name v) l))))
+ (sloop::sloop for v in-package 'keyword do
+ (if (or (boundp v) (fboundp v))
+ (setq l (cons (format nil ":~A" v) l))))
+ (si::readline-init t "Gcl" 1 l)))
This reads the keyword list to "l". The first line checks if the
underlaying Lisp system supports the subroutine "si::readline" init,
and if so it builds the keyword list and calls the subroutine.
--
| Tuukka Toivonen <tuukkat@ee.oulu.fi> [PGP public key
| Homepage: http://www.ee.oulu.fi/~tuukkat/ available]
| Try also finger -l tuukkat@ee.oulu.fi
| Studying information engineering at the University of Oulu
+-----------------------------------------------------------