At 06:17 PM 4/24/00 -0400, you wrote: >Thanks, Paul. I found and read an archived email from Aug 13 titled >"Saving Only Changed Variables in prj.el files", which gave me a >better appreciation of the complexity of this issue. > >I guess then I better take a step back and tell you what I am trying >to do and ask the best way to do it: > >I have two kinds of java source files, with different extensions, >specifically ".java" and ".coll". I want to use a different >"compiler" for each type of file (as well as eventually adjust the >imenu regexps differently for each). > >So, I defined a derived mode coll-mode as follows (and added it to the >auto-mode-alist): > >(define-derived-mode coll-mode jde-mode "JDE-Coll" > "..." > (make-local-variable 'jde-compiler) > (setq jde-compiler "collc") >) > >I am also using the faster Cafe compiler instead of javac for regular >.java files (I will eventually try jikes as you recommend): > >(add-hook 'jde-mode-hook > (function > (lambda () > (make-local-variable 'jde-compiler) > (setq jde-compiler "sj") > ...))) > >This seems to work ok, but is it the "correct" thing to do with all the >jde projects files and customization stuff going on? > Seems fine to me. >Btw, the usual way I would do this would be to do a toplevel >(setq-default jde-compiler "sj") instead of the jde-mode-hook >code above, but I discovered that does not work, due to >jde-set-variables-init-value. > That's true. Originally, before the custom package was introduced, all JDE variables were buffer local. When custom was introduced, I thought it would be a good idea for the JDE to use it as the most common errors I dealt with were people setting JDE variables to the wrong type of variables, e.g., strings where lists were required and vice versa. The conversion of JDE to customize just about eliminated those types of errors so I'm glad I did the conversion. The conversion was not without a drawback, however. The major hole in custom was that, originally, it knew nothing about buffer local variables. So I had to make all JDE variables global while preserving the effect of local variables. To do this, I developed the project context-switching mechanism currently used by the JDE. The context-switching system works but it means that you MUST use customize to set JDE variables. After I pointed out the buffer local problem to Stallman, he updated the custom package to update buffer local copies of customized variables but AFAIK this has never been done for XEmacs. So I have not pursued this problem any further. In any event, my longterm plan is to revamp the project system in such a way that buffer local vs. global variables will no longer be an issue. - Paul ------------------------------------------------------------ TECH SUPPORT POLICY I respond only to requests that contain a complete problem report. The easiest way to ensure that your report is complete is to include the output of the JDE->Help->Submit Problem Report command in your request. To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] JDE website: http://sunsite.auc.dk/jde/ JDE mailing list archive: http://www.mail-archive.com/[email protected]/maillist.html
