TTY editor gets called again if SEDIT window is open
maybe no one else uses the ttyeditor but for some things it's the only way. this is an odd little quirk which I want to fix. Basically, whenever you edit a function or variable in the ttyeditor, it calls the ttyeditor again. if ou do a backtrace you'll see the markaschanged on the stack. I think this is totell the SEDIT windows to refresh with new content.
Wouldn't it be a bad thing if you did have an SEdit window open on the same thing you changed with the ttyeditor and SEdit wasn't told about the change? If you closed the SEdit window it might reinstall the old definition.
The problem happens when EDITMODE(TELETYPE) is set while you have SEDIT windows open.
It calls EDITDEF in order to notify the SEDIT windows, but the EDITMODE means that doesn't work.
Maybe just resetting EDITMODE for the duration if it isn't SEDIT:SEDIT?
So this is the situation where you are editing two different things, one in TTYEDIT the other in multiple SEDIT windows (otherwise it wouldn't fall into the (GET-CONTEXT ...) case?) and when it's doing this MARKASCHANGEDFN in one SEdit, the attempt to EDITDEF the other(s) causes TTYEDIT to get invoked rather than SEDIT? If this code is really specific to SEDIT instances, should it be binding the editmode around the EDITDEF call?
Maybe related:
. EDIT WHERE ANY CALLS xxx
I think uses tty commands to drive down the SEDIT window for the function. But when you make an edit, the function doesn't get marked as changed. CLEANUP doesn't save the edits
a separate issue. always? In both FNS and FUNCTIONS? (an example?)
PR #912 patched the patch put in earlier.