[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" <carlc@snowbd.com> writes:
> "CarlC" <carlc@snowbd.com> wrote in message
> news:Ewz2a.39752$yn1.1662533@twister.austin.rr.com...
> > 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)))
(unwind-protect
(progn (fmakunbound 'start-process) ad-to-it)
(fset 'start-process saved-start-process))))
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
- Re: Checking Process Status, (continued)
- Re: Checking Process Status, CarlC, 2003/02/03
- Re: Checking Process Status, David Kastrup, 2003/02/03
- Re: Checking Process Status, CarlC, 2003/02/03
- Re: Checking Process Status, Kevin Rodgers, 2003/02/03
- Re: Checking Process Status, Jay Belanger, 2003/02/04
- Re: Checking Process Status, Kevin Rodgers, 2003/02/10
- Re: Checking Process Status, Eli Zaretskii, 2003/02/11
- Re: Checking Process Status, CarlC, 2003/02/12
- Re: Checking Process Status, CarlC, 2003/02/12
- Re: Checking Process Status,
David Kastrup <=
- Re: Checking Process Status, CarlC, 2003/02/12
- Re: Checking Process Status, David Kastrup, 2003/02/12
- Re: Checking Process Status, Kai Großjohann, 2003/02/13
Re: Checking Process Status, Kevin Rodgers, 2003/02/11