budden
9/21/2015 8:56:00 PM
Hi!
We get some slowdown. Autoindent code is completely written, but there are bugs so I can not say it really "works".
Concept is that I didn't implement lisp mode, but wrote an interface to oduvanchik (spiritually transformed hemlock).
As user edits Tk's text widget, I incrementally sync buffer contents of oduvanchik's buffer to that of tk's text widget.
When user calls auto-indent command, it is evaluated in oduvanchik with some special variable bound to t. This indicates special mode of oduvanchik's operation. As oduvanchik tries to do elementary text operations, such is insert-string, nothing is done. Instead, event is sent to tk with instructions what to do. tk's text widget does string insertion and then oduvanchik's buffer resynched. So, insert-string is called twice in oduvanchik, first time with special var bound to t, second time with var bound to nil to sync oduvanchik to tk.
This is rather complex sequence of phenomena occuring in distributed environment (partly at client, partly at server). It "works", but somewhere synchronization between text or between marks is lost and results are buggy.
Currently I develop a toolbox to diagnose this kind of problems, and have some success. I hope autoindent will be finished this week.