compilation-finish-function seems to be a good candidate.
e.g.

(setq compilation-finish-function 
      (lambda (buf msg)
        (message (format "Comp: %s." msg))))

msg is one of: "Finished^J" or "exited abnormally with code N^J" where
N is the exit code.  In FSF compile.el the messages seem to be
generated in compile-internal but I'm not sure where they are
generated in XEmacs (they appear to be different...).  I don't see an
obvious way to extract the exit code directly without parsing this
message (at least in XEmacs the buffer and process are dissasociated
by the time this function is called).

I hope that helps or at least doesn't hurt. :-)

Cheers,
mike


Paul Kinnucan writes:
 > At 09:51 AM 8/10/00 -0400, Jim Snyder wrote:
 > >GNU Emacs 20.7.1 (sparc-sun-solaris2.5.1, X toolkit) of Fri Jun 23 2000
 > >JDE 2.2.0
 > >
 > >I currently bind F1 to do jde-compile on the current buffer containing a
 > >java file (MyClass.java). In addition I have speed bar up and it of
 > >course colors MyClass.java and, prior to compiling, MyClass.java has a
 > >"!" after it to denote the class file needs compiling.
 > >
 > >Question: Once jde-compile is done, does it send a message to the speed
 > >bar to update itself to reflect that MyClass.java (and others) were
 > >compiled (whether the compile was successful or not)? If jde-compile
 > >doesn't send a message, how can I do it from the key binding of F1?
 > >Unfortunately, lisp is not my forte. Here is currently my key binding of
 > >F1:
 > >
 > >(global-set-key '[f1] 'jde-compile)
 > >
 > >Any help with lisp would be highly appreciated.
 > >
 > 
 > Hi Jim,
 > 
 > I am currently trying to figure out how to detect completion of a
 > compilation so that I can update the completion cache. Once I have done
 > that, it should be easy to include refreshing the speedbar as well. If
 > anybody has ideas about how to detect successful compilation via elisp,
 > please let me know.
 > 
 > - Paul

Reply via email to