On Wed, 2 Jun 2004 09:29:22 +0200 , Berndl, Klaus <[EMAIL PROTECTED]> wrote: > > >> ;; to a buffer belonging to another. > >> (make-local-hook 'post-command-hook) > > >Hmm, I don't think I need the above form because the add-hook form below > >makes the variable local anyway. > > Indeed. > > > > (add-hook 'post-command-hook > > > 'jde-detect-java-buffer-activation nil t) > > > > > > > > > This is the code from `jde-mode' (JDEE 2.3.4beta3). > >This should work even if the "from" buffer is not a jde-mode buffer. Are > >you saying that it doesn't? > > Yes, i'm saying this - and it can not work in other modes: > This add-hook is called when `jde-mode' is called which is only called when a buffer > X is opened which is "linked" to jde-mode. And because you add the function LOCALLY > to post-command-hook only the local value (local in buffer X) contains this function > - the global value of post-command-hook doesn't. Therefore this works only in > jde-buffers - which is suboptimal IMHO ;-)
I can confirm this. Moving from a java file in one project to a .el file and then to a java file in another project does not result in the loading of the new project's settings file. Suraj