Le vendredi 26 août 2016 00:02:13 UTC+2, Matthias Felleisen a écrit : > The specification has to come with feature and/or the language, not the tool. > How would Emacs know about it? Or Notepad? Every editor — and every tool in > the tool chain — must know what indentation means if it may touch it.
I agree, it is unfortunate that for a language's get-info to respond to the `'drracket:indentation` it has to manipulate racket:text<%> among other things. This could however be achieved (without popping a GUI) by an emacs mode communicating with Racket. If macros were allowed to specify how they are indented, the editor would need to run some racket code at some point, anyway (to expand the macro). It is already necessary to run some racket code to parse the surface syntax of the file, and know what parts are strings, what parts are identifiers etc. (the same file with #lang scribble and #lang racket won't indent in the same way, obviously). I'm not sure if using racket:text<%> is that much of a concern in the end, though: any editor plugin could spawn a racket process, create an instance of racket:text<%> and communicate with it to get the indentation of any line it wants. The overhead does not seem that high, and it does not require a full-blown gui (the GTK libraries might be needed, but not a suitable display). -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.