On Monday 17 December 2007 05:11 pm, Tony Balinski wrote: > Quoting Randy Kramer <[EMAIL PROTECTED]>: > > Is there anything like a book ;-) or other documentation that tries to > > explain how nedit works other than the code and comments in the code?
Tony, Thanks! Your explanations below should help quite a bit. I guess part of my question was also asking (or leading up to asking) whether such a document would be helpful (for developers new to Nedit). I think it would be, even its as simple as your explanation below. As I learn things, I'm going to try to keep an organized set of notes, starting with what you've written here, and then consider making them into some sort of document for future newbies. I guess the question that always comes up (in my mind) for something like this is how to present it--e.g., as a separate document, as comments in the code, perhaps combined as some sort of literate programming document, or ... regards, Randy Kramer PS: My overall goal, should I ever get that far, is to add (real) folding to nedit. At some point I want to start a discussion on the list about the best approach to doing that, but I'm not quite ready for that. (Aside, some other people were working on folding, I don't know how much progress they've made.) (Another aside: I started using kate because it does have folding, and I've found enough bugs (or misfeatures) that it really isn't as usable as I'd like--so now I use two editors, nedit for some things, kate for others. I should not that some of the bugs/misfeatures in kate are specifically related to folding, and, if anyone else is trying to implement folding, I'd like to tell them what bugs I found in kate in hopes that we don't duplicate those problems (or misfeatures, or lack of features) in an implementation of folding for nedit. > Not really. As ever, it depends what you want to do. Some places that might > get you into the code are the more functionally restricted areas, say menu.c > to see how the menus are built (you can then use the same techniques to adapt > them yourself), and macros.c, many of whose functions are the embodiment of > the built-ins described in the macro subroutines help, so it's easy to > understand what's happening. Again, modifying or adding macro built-ins > teaches you about the macro data structure (DataValue) and how that's > manipulated. The actual language is implemented in parse.y (which describes > how the language is compiled to instructions) and interpret.c (which > implements those instructions and the execution machine). > > More complicated, and X/Motif specific, are the main files nedit.[ch] and > windows.[ch]. If you want to add more properties to NEdit's windows, you'll be > playing with these, in particular adjusting the WindowInfo structure. Opening > and closing files is managed in file.c. > > The actual text manipulation is handled in textBuf.c and its display by the > widget textDisp.c and text.c. X resource preferences and the nedit.rc > read/write are handled in preferences.c, regex stuff in refexConvert.c and > regularExp.c, highlighting in highlight.c, searching in search.c and so on. > > As you can see the file names are a guide. NEdit is generally well commented > so, although it's often hard to see the wood for the trees, you shouldn't be > too led astray by reading them. > > Tony > -- > NEdit Develop mailing list - [email protected] > http://www.nedit.org/mailman/listinfo/develop > > -- NEdit Develop mailing list - [email protected] http://www.nedit.org/mailman/listinfo/develop
