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

*standard-output*



I would like to describe an object (with the describe function). Not in the
listener but in a new fred window. After haing created a new instance of
fred-window, I would like to redirect the output to this window.

So I do the following :

;; save the current output
(defvar oldIO *standard-output*)

;; change to the new output. New should be a fred-window
(defun changeIO (new)
    (setq *standard-output* new)
)

;; restore the output to the standard one
(defun restoreIO ()
    (setq *standard-ouput* oldIO)
)

All """seems""" to work except restoreIO. When compiling I have a warning
about undeclared free variable *standard-output* (only in restoreIO). After
using restoreIO, the output is still my fred-window (by behavior). But when
I check the value of *standard-output* it is the right one (terminal-IO
something, the listener I suppose).
Moreover if, in the listener, I ask "(setq *standard-output* oldIO)", it
works and the behavior is the expected one : the new IO is the listener.

Where am I wrong ????

Mathieu
---
Lafourcade Mathieu
GETA (Groupe d'Etude pour la Traduction Automatique)
BP 53X, 38041 GRENOBLE CEDEX, FRANCE

Lafourca@imag.fr