\begindata{text,538353528} \textdsversion{12} \template{default} \define{global } -- xwipe.n -- Various erasure options added to the keyboard -- ESC-CTL-w deletes everything between selection and the -- mark set with CTL-@ (or Insert key on RT) -- BACKSPACE checks the selection and if it is non-empty, -- deletes the selection; but if empty, does a normal backspace extend \bold{"view:textview"} \bold{on keys "\\e"} -- intercept ESC-CTL-w marker at -- the atMarker value marker sel -- the current selection value at := currentmark(defaulttext) sel := currentselection(defaulttext) -- we don't know if -at- precedes -sel- -- or vice versa, so we test if extent(at, sel) = "" then -- either -sel- and -at- are empty at the same -- place, or finish(sel) precedes start(at) sel := extent(sel, at) else sel := extent(at, sel) end if -- select everything between mark and selection: setcurrentselection(defaulttext, sel) -- now call the Cut function directly textview_zap_region(defaulttext) end keys \bold{on keys "\\b"} -- extend BACKSPACE marker sel sel := currentselection(defaulttext) if sel = "" then replace(previous(sel), "") else replace(sel, "") end if end keys end extend -- \begindata{bp,537558784} \enddata{bp,537558784} \view{bpv,537558784,41,0,0} -- Copyright 1992 Carnegie Mellon University and IBM. All rights reserved. \smaller{\smaller{-- $Disclaimer: -- Permission to use, copy, modify, and distribute this software and its -- documentation for any purpose is hereby granted without fee, -- provided that the above copyright notice appear in all copies and that -- both that copyright notice, this permission notice, and the following -- disclaimer appear in supporting documentation, and that the names of -- IBM, Carnegie Mellon University, and other copyright holders, not be -- used in advertising or publicity pertaining to distribution of the software -- without specific, written prior permission. -- -- IBM, CARNEGIE MELLON UNIVERSITY, AND THE OTHER COPYRIGHT HOLDERS -- DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -- ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT -- SHALL IBM, CARNEGIE MELLON UNIVERSITY, OR ANY OTHER COPYRIGHT HOLDER -- BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY -- DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -- WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS -- ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE -- OF THIS SOFTWARE. -- $ }}\enddata{text,538353528}