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

How do I write top level function?



I am developing my own toplevel function and get into trouble. Simple
toplevel function like the following does not work with the
eval-selection facility provided by Fred window.

(defun simple-toplevel ()
  (loop
	(format t "~&> ")
	(if (eql :quit (print (eval (read))))
	    (return-from simple-toplevel))))

While running this toplevel, evaluating selection or current
s-expression in a fred window does not work. Acctually, the evaluation
is blocked until this toplevel is quit. 

I have read page 319-320 of the manual but I could not find the best
way to write my own toplevel which completely co-work with the
existing facilities like fred window. 

Could someone show me the good example of toplevel function which, at
least, co-work with evaluation facilities provided by fred window?

**************************************
Yasuaki Honda
honda@csl.sony.co.jp
SONY Computer Science Laboratory Inc.
**************************************