(FILECREATED "17-Apr-85 08:28:33" {IVY}<HTHOMPSON>LISP>UTIL>DEDITK.;2 7404   

      changes to:  (VARS DEDITKCOMS)

      previous date: " 2-Oct-84 16:41:58" {IVY}<HTHOMPSON>LISP>UTIL>DEDITK.;1)


(* Copyright (c) 1984, 1985 by HThompson. All rights reserved.)

(PRETTYCOMPRINT DEDITKCOMS)

(RPAQQ DEDITKCOMS ((FNS DEDITK KAFTER KBEFORE KDELETE KREPLACE DEDITBIREP LeftP RightP SHOWME)
		   (VARS ReplaceBitmap AfterBitmap BeforeBitmap DKDelta DeleteBitmap)
		   [VARS (MYD %' ((AfterBitmap KAFTER)
			       (BeforeBitmap KBEFORE)
			       (DeleteBitmap KDELETE)
			       (ReplaceBitmap KREPLACE)
			       (Switch DEDITSwitch)
			       ("( )" DEDITBI ("( ) in" DEDITBI)
				      ("( in" DEDITLI)
				      (") in" DEDITRI))
			       ("( ) out" DEDITBO ("( ) out" DEDITBO)
					  ("( out" DEDITLO)
					  (") out" DEDITRO))
			       (Undo DEDITUndo (Undo DEDITUndo)
				     (!Undo (DEDITUndo T))
				     (?Undo (UNDOCHOOSE))
				     (&Undo (UNDOCHOOSE T)))
			       (Find DEDITFind)
			       (Swap DEDITSwap (Center DEDITCenter)
				     (Clear (SETQ \DEDITSELECTIONS NIL))
				     (Copy DEDITCopy)
				     (Pop (POPSELECTION))
				     (Swap DEDITSwap))
			       (Reprint DEDITReprint)
			       [Edit DEDITEdit (DEdit% Def (DEDITEdit 'DISPLAY
								      'Def))
				     (DEdit% Form (DEDITEdit 'DISPLAY
							     'Form))
				     (TTYEdit% Def (DEDITEdit 'TELETYPE
							      'Def))
				     (TTYEdit% Form (DEDITEdit 'TELETYPE
							       'Form))
				     (TTYIn% Def (DEDITEdit 'TTYIn
							    'Def))
				     (TTYIn% Form (DEDITEdit 'TTYIn
							     'Form]
			       [EditCom DEDITEditCom (?= DEDITARGS)
					(GETD (DEDITEditCom 'GETD))
					(CL (DEDITEditCom 'CL))
					(DW (DEDITEditCom 'DW))
					(REPACK (DEDITEditCom 'REPACK))
					(CAP (DEDITEditCom 'CAP))
					(LOWER (DEDITEditCom 'LOWER))
					(RAISE (DEDITEditCom 'RAISE]
			       (Break DEDITBreak)
			       (Eval DEDITEval)
			       (Exit DEDITExit (OK DEDITExit)
				     (STOP (DEDITExit T]
		   (P (DEDITK))))
(DEFINEQ

(DEDITK
  [LAMBDA NIL                                                (* edited: " 2-Oct-84 16:40")
    (/SET '\DEDITCOMS (SUBPAIR '(AfterBitmap BeforeBitmap DeleteBitmap ReplaceBitmap)
			       (LIST AfterBitmap BeforeBitmap DeleteBitmap ReplaceBitmap)
			       MYD))
    (/SET '\DEDITMNUW NIL])

(KAFTER
  [LAMBDA NIL                                                (* ht: "15-Jun-84 09:56")
    (if (RightP LASTMOUSEX)
	then (DEDITAfter)
	     (DEDITBO)
      else (DEDITAfter])

(KBEFORE
  [LAMBDA NIL                                                (* ht: "15-Jun-84 10:05")
    (if (RightP LASTMOUSEX)
	then (DEDITBefore)
	     (DEDITBO)
      else (DEDITBefore])

(KDELETE
  [LAMBDA NIL                                                (* ht: "15-Jun-84 10:06")
    (if (LeftP LASTMOUSEX)
	then (DEDITBI)
	     (DEDITDelete)
      else (DEDITDelete])

(KREPLACE
  [LAMBDA NIL                                                (* ht: "15-Jun-84 10:07")
    (if (RightP LASTMOUSEX)
	then (DEDITReplace)
	     (DEDITBO)
      elseif (LeftP LASTMOUSEX)
	then (DEDITBIREP)
      else (DEDITReplace])

(DEDITBIREP
  [LAMBDA NIL                                                (* ht: " 6-Apr-84 15:40")
    (OR (CDDR \DEDITSELECTIONS)
	(CANT "Too few selections"))
    (PROG ((first (POPSELECTION)))
          (DEDITBI)
          (PUSHSELECTION first)
          (RETURN (DEDITReplace])

(LeftP
  [LAMBDA (X)                                                (* ht: "15-Jun-84 10:04")
    (PROG [(reg (GETWINDOWPROP \DEDITMNUW (QUOTE REGION]
          (RETURN (X-reg:LEFT lt DKDelta])

(RightP
  [LAMBDA (X)                                                (* ht: "15-Jun-84 09:57")
    (PROG [(reg (GETWINDOWPROP \DEDITMNUW (QUOTE REGION]
          (RETURN (reg:WIDTH-(X-reg:LEFT)
		    lt DKDelta])

(SHOWME
  [LAMBDA (w)                                                (* ht: " 6-Apr-84 17:01")
    (OR SHOWMEW SHOWMEW←(CREATEW))
    (bind last (reg ←(GETWINDOWPROP w (QUOTE REGION)))
       do (BLOCK)
	  (if last~=LASTMOUSEX
	      then (last←LASTMOUSEX)
		   (CLEARW SHOWMEW)
		   (printout SHOWMEW (last-reg:LEFT)
			     ,
			     (reg:WIDTH-(last-reg:LEFT])
)

(RPAQ ReplaceBitmap (READBITMAP))
(84 12
"@@@A@@@@@@@@@@@@@H@@@@@@"
"@@@A@@@@@@@@@@@@@H@@@@@@"
"@BHAAOH@@@A@@@@@@HDA@@@@"
"@DDAA@D@@@A@@@@@@HBB@@@@"
"@DDAA@DGAGAALCHG@HBB@@@@"
"@HBAA@DHIHIBBDDHHHAD@@@@"
"@HBAAOHOI@I@ND@OHHAD@@@@"
"@HBAA@DHA@ICBD@H@HAD@@@@"
"@HBAA@DHIHIBBDDHHHAD@@@@"
"@DDAA@DGAGAAMCHG@HBB@@@@"
"@DDA@@@@A@@@@@@@@HBB@@@@"
"@BHA@@@@A@@@@@@@@HDA@@@@")

(RPAQ AfterBitmap (READBITMAP))
(84 12
"@@@@@@@@@@@@@@@@@H@@@@@@"
"@@@@@@@@@@@@@@@@@H@@@@@@"
"@@@@@@@A@GD@@@@@@HDA@@@@"
"@@@@@@@A@DD@@@@@@HBB@@@@"
"@@@@@@@BHOOCHK@@@HBB@@@@"
"@@@@@@@BHDDDDM@@@HAD@@@@"
"@@@@@@@DDDDGLH@@@HAD@@@@"
"@@@@@@@GLDDD@H@@@HAD@@@@"
"@@@@@@@HBDDDDH@@@HAD@@@@"
"@@@@@@@HBDCCHH@@@HBB@@@@"
"@@@@@@@@@@@@@@@@@HBB@@@@"
"@@@@@@@@@@@@@@@@@HDA@@@@")

(RPAQ BeforeBitmap (READBITMAP))
(84 12
"@@@@@@@@@@@@@@@@@H@@@@@@"
"@@@@@@@@@@@@@@@@@H@@@@@@"
"@@@@@AOH@AL@@@@@@HDA@@@@"
"@@@@@A@D@A@@@@@@@HBB@@@@"
"@@@@@A@DGCLOAFG@@HBB@@@@"
"@@@@@AOHHIA@IJHH@HAD@@@@"
"@@@@@A@DOIA@I@OH@HAD@@@@"
"@@@@@A@DHAA@I@H@@HAD@@@@"
"@@@@@A@DHIA@I@HH@HAD@@@@"
"@@@@@AOHGA@OA@G@@HBB@@@@"
"@@@@@@@@@@@@@@@@@HBB@@@@"
"@@@@@@@@@@@@@@@@@HDA@@@@")

(RPAQQ DKDelta 20)

(RPAQ DeleteBitmap (READBITMAP))
(84 12
"@@@A@@@@@@@@@@@@@@@@@@@@"
"@@@A@@@@@@@@@@@@@@@@@@@@"
"@BHA@@OH@@H@B@@@@@@@@@@@"
"@DDA@@HD@@H@B@@@@@@@@@@@"
"@DDA@@HBCHHNGIL@@@@@@@@@"
"@HBA@@HBDDIABBB@@@@@@@@@"
"@HBA@@HBGLIOBCN@@@@@@@@@"
"@HBA@@HBD@I@BB@@@@@@@@@@"
"@HBA@@HDDDIABBB@@@@@@@@@"
"@DDA@@OHCHHNAIL@@@@@@@@@"
"@DDA@@@@@@@@@@@@@@@@@@@@"
"@BHA@@@@@@@@@@@@@@@@@@@@")

(RPAQ MYD %' [(AfterBitmap KAFTER)
	      (BeforeBitmap KBEFORE)
	      (DeleteBitmap KDELETE)
	      (ReplaceBitmap KREPLACE)
	      (Switch DEDITSwitch)
	      ("( )" DEDITBI ("( ) in" DEDITBI)
		     ("( in" DEDITLI)
		     (") in" DEDITRI))
	      ("( ) out" DEDITBO ("( ) out" DEDITBO)
			 ("( out" DEDITLO)
			 (") out" DEDITRO))
	      (Undo DEDITUndo (Undo DEDITUndo)
		    (!Undo (DEDITUndo T))
		    (?Undo (UNDOCHOOSE))
		    (&Undo (UNDOCHOOSE T)))
	      (Find DEDITFind)
	      (Swap DEDITSwap (Center DEDITCenter)
		    (Clear (SETQ \DEDITSELECTIONS NIL))
		    (Copy DEDITCopy)
		    (Pop (POPSELECTION))
		    (Swap DEDITSwap))
	      (Reprint DEDITReprint)
	      [Edit DEDITEdit (DEdit% Def (DEDITEdit 'DISPLAY
						     'Def))
		    (DEdit% Form (DEDITEdit 'DISPLAY
					    'Form))
		    (TTYEdit% Def (DEDITEdit 'TELETYPE
					     'Def))
		    (TTYEdit% Form (DEDITEdit 'TELETYPE
					      'Form))
		    (TTYIn% Def (DEDITEdit 'TTYIn
					   'Def))
		    (TTYIn% Form (DEDITEdit 'TTYIn
					    'Form]
	      [EditCom DEDITEditCom (?= DEDITARGS)
		       (GETD (DEDITEditCom 'GETD))
		       (CL (DEDITEditCom 'CL))
		       (DW (DEDITEditCom 'DW))
		       (REPACK (DEDITEditCom 'REPACK))
		       (CAP (DEDITEditCom 'CAP))
		       (LOWER (DEDITEditCom 'LOWER))
		       (RAISE (DEDITEditCom 'RAISE]
	      (Break DEDITBreak)
	      (Eval DEDITEval)
	      (Exit DEDITExit (OK DEDITExit)
		    (STOP (DEDITExit T])
(DEDITK)
(PUTPROPS DEDITK COPYRIGHT ("HThompson" 1984 1985))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (2022 4386 (DEDITK 2032 . 2353) (KAFTER 2355 . 2561) (KBEFORE 2563 . 2772) (KDELETE 2774
 . 2982) (KREPLACE 2984 . 3263) (DEDITBIREP 3265 . 3558) (LeftP 3560 . 3765) (RightP 3767 . 3991) (
SHOWME 3993 . 4384)))))
STOP