[snip]
> 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;
Indeed. This is the definition (well... near as dammit.) of the ved_qand
command which is now in Poplog
define global ved_qand();
if vedargument = nullstring then
vedqget(identfn);
else
vedqget(veddo(%vedargument%));
endif;
enddefine;
> It seems to work, perhaps surprisingly.
Why surprisingly ?
> The only snag with redefining ved_q like this is that it is no longer
> safe to call ved_q in arbitrary contexts (e.g. mapped to a key
> sequence, or invoked from another VED procedure), because it may pick up
> an unintended version of vedargument.
Thankyou! I knew there was a reason I didn't redefine ved_q! I was going
nuts trying to remember why. Isn't upwards compatability wonderful :-)
Adrian
aids (adrianh@cogs.susx.ac.uk) ObDisclamer: Poplog used to pay my wages
Phone: +44 (0)273 678367 URL: http://www.cogs.susx.ac.uk/users/adrianh/
|