Suraj Acharya writes:
 > 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.
 > 

It does on my system. I opened up four frames:

Frame 1: Project A
Frame 2: Project B
Frame 3: jde.el
Frame 4: *Messages* buffer (to monitor project load messages).

Frame Movements    Result
------------------------------------------------

1->2               Project B reloaded.
2->3->1            Project A reloaded.
1->3               No change.
3->2               Project B reloaded.

etc.

I am at a loss to explain why the project switching does
not work correctly on your system.

I am using JDEE 2.3.4beta5 with Emacs 21.3.1 on Windows
Millenium.

Paul

Reply via email to