[comp.sys.xerox] Sedit Enhancements

ttf@VAX3.ITI.ORG ("Tihamer T. Toth-Fejel") (07/31/89)

A little while ago I asked if anyone had a bunch of
enhancements to Sedit.
Aparently, noone had, so I had to do it myself.

While on a year-long stint on Explorers, on which
I did my damnest to make it look like Medley,
I wrote something I called Autobind,
which was an improvement of what Jay Ferguson
(formerly at Stanford, Ford Aerospace, and CRL -now at Xerox Hdqrs)
wrote for D-Edit and called Deditbind.
Autobind does a number of things to the
ZMACS (line-oriented yech lisp editor):

- Takes a selected for loop, let or binding list
     and correctly binds the variables
     (A GREAT timesaver) for faster test-as-you go editing.
    Reads the currently selected region, and:
    If the selected expression is a for loop, then it cranks through
      the first iteration.
      eg. in (loop for thing in '(z b c d) collect thing),
      thing gets bound to z, and super I lets you bind thing to
      iib,c,...
      eg. in (loop for thing from 0 to 10 collect thing),
      thing gets bound to 0 etc.
    If the expression is a let, let*, or multiple-value-bind
     then it binds all the local variables
      eg. in (let ((z 10)(b 'tree) c) (list 'goblygook)),
      z gets bound to 10, b to tree, c to nil.
      eg. in (multiple-value-bind (xlim ylim)
           (send *terminal-io* :inside-size) (list 'goblygook)),
        xlim gets set to the 1st value returned by
       (send *terminal-io* :inside-size), ylim to the 2nd
    If the selected expression is a list of length two,
      with the first a symbol (as in the individual
      variable assignments in a let expression,
      the first gets setq'ed to the evaluation of the second.
    If the selected expression is an atom, that atom gets set to nil.
    The loop bindings were originally inspired by Jay
      Ferguson's DeditBind enhancement
      to the Xerox DEdit while both of us
      were at Ford Aerospace.  When debugging
      loops, he got tired of typing
      (setq var (car list-to-itterate-over...)).
       And so did I.

The above is very useful if you have been brought up in a
"test as you go" environment, in which you eval everything
after you write it.
Unfortunately, Sedit does not encourage this type of behavior
because it makes you bring up another editor or inspector
for each return.  The reasoning for this is sound - you might
want to edit the return.  But if you only want to look at it
to check your code, its a pain - you'd rather just have
it pop in the prompt window.
Anyway, I've done that too.
Meta E is evaluation,
Meta W is evaluate into promptwindow
Meta Q is autobind.

If you want a copy, let me know, and I'll email it to you.

Tihamer Toth-Fejel
internet:  ttf@iti.org
uucp:  ...{pur-ee,well}!itivax!ttf (Tihamer T. Toth-Fejel)
Industrial Technologies Institute, Ann Arbor, Michigan 48106
(313) 769-4248 or 4345                  home: (313) 622-4741
*----*----*----*----*----*----*----*----*----*----*----*----*----*