[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Checking Process Status

From: David Kastrup
Subject: Re: Checking Process Status
Date: 12 Feb 2003 23:43:12 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

"CarlC" <> writes:

> "CarlC" <> wrote in message
> news:Ewz2a.39752$
> > This code has worked for me. To do away with the "undesirable
> consequences",
> > I make this temporary in the compile function:
> >
> > (defadvice compile (before cobol-compile activate)
> >   "Set compile-command and make compile syncronous"
> >   (fset 'save-start-process (symbol-function 'start-process))
> >   (fmakunbound 'start-process))
> >
> > (defadvice compile (after cobol-compile activate)
> >   "Process cobol error listing."
> >   (fset 'start-process 'save-start-process)
> > ...
> Spoke too soon. This code breaks with "Symbol's chain of function
> indirections contains a loop: start-process" if I run a compile more than
> once and then try to open a shell buffer. Anyone know the proper way to
> accomplish this?

You do it right the first time, wrong the second time.  But it is not
really necessary to save in a global variable, and you want stuff to
get restored in any case.

I'd use
(defadvice compile (around cobol-compile activate)
  "Set ...."
  (let ((saved-start-process (symbol-function 'start-process)))
         (progn (fmakunbound 'start-process) ad-to-it)
         (fset 'start-process saved-start-process))))

David Kastrup, Kriemhildstr. 15, 44793 Bochum

reply via email to

[Prev in Thread] Current Thread [Next in Thread]