pop@cs.umass.edu ( Robin Popplestone ) writes:
> Date: 18 Aug 1994 18:28:09 GMT
> Organization: Dept. of Computer Science, Univ. of Mass., Amherst, MA
>
> Would it not also be (tolerably) more rational to have ved_q look at
> vedargument and use it as a basis for quitting the current file and
> executing another ved command, rather than having a whole collection of
> ved_q... procedures. E.g. you would do
>
> <enter> q help topic
>
> instead of
>
> <enter> qhelp topic
>
> I would hack it up, but life is too short.
I thought I had posted a reply to this, but apparently it didn't
go out for some reason.
Adrian did reply thus:
| Date: 19 Aug 1994 10:00:48 +0100
| From: adrianh@uk.ac.sussex.cogs (Adrian John Howard)
|
| ved_qand was added to Poplog in '92 and does what you want, eg:
|
| <enter> qand help topic
|
| There was a reason I didn't change ved_q.... but it escapes me at the
| moment.
This is only available from Poplog V14.5 on, I assume.
In fact the basic procedure to do what Robin wanted is already there
in earlier versions of Poplog, and certainly in V14.2.
It's vedqget, defined thus in REF VEDPROCS:
-------------------------------------------------------------------
vedqget(P) [procedure]
Quits the current file (checking if it needs writing) then runs
the procedure P, but without losing the current window. This is
used to define ved_qget, ved_qhelp, ved_qref, etc. These are all
procedures that quit the current file, then start up a new one,
using the current window. They also have the property that if
there is only one file in VED quitting it does not cause
-vededitor- to exit before the new file is started.
For example, ved_qved is defined thus:
define vars ved_qved();
;;;quit current edit and start another
if vedargument = nullstring then chain(ved_q) endif;
vedqget(ved_ved);
enddefine;
-------------------------------------------------------------------
You can use this as follows to define ved_qand
define ved_qand();
;;; quit current ved buffer and run the command given as
;;; argument to ved_qand
vedqget(veddo(%vedargument%)); ;;; See HELP VEDDO
;;; or possibly
;;; vedqget(vedargument, veddo)
enddefine;
I don't know if that's how Adrian defined it. (It's one of many ways
veddo is very useful for turning a VED command string into a
procedure.)
Aaron
--
Aaron Sloman,
School of Computer Science, The University of Birmingham, B15 2TT, England
EMAIL A.Sloman@cs.bham.ac.uk OR A.Sloman@bham.ac.uk
Phone: +44-(0)21-414-4775 Fax: +44-(0)21-414-4281
|