joaotavora / sly

Sylvester the Cat's Common Lisp IDE
1.24k stars 140 forks source link

Set interactive-stream-p to t for slynk-gray::sly-output-stream in allegro #500

Open dieggsy opened 2 years ago

dieggsy commented 2 years ago

I commented this on https://github.com/joaotavora/sly/issues/426, but setting interactive-stream-p via (setf (interactive-stream-p stream) t) in Allegro makes the sly REPL act more like the Allegro command line repl.

This mechanism is documented here:

https://franz.com/support/documentation/9.0/doc/streams.htm#force-finish-output-2 https://franz.com/support/documentation/current/doc/implementation.htm#extensions-to-interactive-stream-p-3

While it'd be nice to make this default behavior for Allegro, I've found this can be achieved with user configuration by putting the following in ~/.slynk.lisp:

(defmethod initialize-instance :after ((stream slynk-gray::sly-output-stream) &rest args)
  #+allegro
  (setf (interactive-stream-p stream) t))
joaotavora commented 2 years ago

Mind if I make this into a discussion and then you can answer your own question?

dieggsy commented 2 years ago

I'm not entirely sure what that means/how it works but sure?

Would you be opposed to a PR including something like this in slynk-gray.lisp (I've updated the snippet above with #+allegro)?