[Date Prev] [Date Next] [Thread Prev] [Thread Next] Date Index Thread Index Search archive:
Date:Mon Sep 6 22:24:24 1994 
Subject:Re: ved_q (Simplified slightly) 
From:"A.Sloman" 
Volume-ID:940906.01 

Adrian wrote
> [snip]
(I wrote)
> > Even simpler would be the following, which does not require the old
> > value of ved_q to be saved.
> >
> > define ved_q();
> >     ;;; quit current ved buffer and, if appropriate, run the command
> > 	;;; given as argument to ved_q, using old window if necessary.
> >     if vedargument /= nullstring then
> >       	vedqget(veddo(%vedargument%));  ;;; See HELP VEDDO
> >       	;;; or possibly
> >       	;;;     vedqget(vedargument, veddo)
> >     else
> > 		vedqget(identfn)
> >     endif;
> > enddefine;

Adrian wrote
> Indeed. This is the definition (well... near as dammit.) of the ved_qand
> command which is now in Poplog

Great minds think alike??

I wrote
> > It seems to work, perhaps surprisingly.
Adrian wrote
> Why surprisingly ?

Well, one might have expected vedqget to expect as argument a procedure
that starts up a VED buffer. Since identfn doesn't do that I thought
one might somehow get an error, or an anomalous window. Instead it
gracefully gives up the old window in that case (even in Xved), which is
a tribute to whoever designed/extended vedqget!

Aaron