The output of the following program solving the Towers of Hanoi problem in Common Lisp directs the output of the "format" statement to the "*inferior-lisp*" buffer instead of to the "*slime-repl clisp-2.37*" buffer on Windows XP Professional, Service Pack 3:
(defun hanoi (n) (hanoi-helper n 'A 'B 'C))
(defun hanoi-helper (n source dest using) (cond ((equalp n 1) (format t "Move disc from ~A to ~A.~%" source dest)) (t (progn (hanoi-helper (- n 1) source using dest) (hanoi-helper 1 source dest using) (hanoi-helper (- n 1) using dest source)))))
When "M-x slime-redirect-inferior-output RET" is invoked in Lispbox Emacs, the output is redirected correctly, but so is the rest of the output to the "*inferior-lisp*" buffer. This is not a clean solution.
Does anybody know how to get the above hanoi-helper procedure to direct the output of the "format" statement correctly to the REPL, instead of to the "*inferior-lisp*" buffer?
(This point is probably not relevant, but I have reconfigured Lispbox to call my .emacs file using my existing GNU Emacs 22.3.1 installation.)
-- Benjamin L. Russell