(FILECREATED " 2-Apr-85 11:27:17" {ERIS}<LISPCORE>LIBRARY>EDITMARK.;3 21355  

      previous date: "24-Jul-84 10:22:31" {PHYLUM}<PAPERWORKS>EDITMARK.;25)


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

(PRETTYCOMPRINT EDITMARKCOMS)

(RPAQQ EDITMARKCOMS [(FNS EDITMARK.ACCEPTFN EDITMARK.ACCEPTALLFN EDITMARK.DONTKEEPFN 
			  EDITMARK.INSERTFN EDITMARK.KEEPFN EDITMARK.CARETLOOKSFN EDITMARK.DELETEFN 
			  DONTSHOWEDITMARKSFN PUTTEXTOBJPROP GETTEXTOBJPROP EDITMARK.REDO.DELETEFN 
			  REDISPLAY.TEDIT.WINDOW SHOWEDITMARKSFN SETSTYLEIFNEW EDITMARK.STYLEFN 
			  EDITMARK.UNDO.DELETEFN EDITMARK.UNDO.UNDELETEFN EDITMARK.UNDOCHANGESFN 
			  \EDITMARK.\TEDIT.DELETE)
	(ADDVARS (TEDIT.HISTORY.TYPELST (TentativeDelete EDITMARK.REDO.DELETEFN 
							 EDITMARK.UNDO.DELETEFN)
					(TentativeUndeletion PAPERWORKS.REDO.UNDELETEFN 
							     EDITMARK.UNDO.UNDELETEFN))
		 (TEDIT.DEFAULT.PROPS CARETLOOKSFN EDITMARK.CARETLOOKSFN TEDIT.TENTATIVE NIL 
				      SHOW.EDIT.MARKS NIL))
	(CONSTANTS (\EltsPerPiece 2))
	(ADVICE \INSERTCH)
	(P (MOVD? (QUOTE \TEDIT.DELETE)
		  (QUOTE \OLDTEDIT.DELETE))
	   (MOVD (QUOTE \EDITMARK.\TEDIT.DELETE)
		 (QUOTE \TEDIT.DELETE))
	   (TEDIT.ADD.MENUITEM TEDIT.DEFAULT.MENU
			       (QUOTE (Edit% Marks (QUOTE EDITMARK.ACCEPTFN)
						   "throws away the editting change information."
						   (SUBITEMS (Keep% Edits (QUOTE EDITMARK.KEEPFN)
									  
						    "keeps track of the insertion and deletions.")
							     (Don't% Keep% Edits (QUOTE 
									      EDITMARK.DONTKEEPFN)
										 
							"changes to the documents won't be kept.")
							     (Show% Edits (QUOTE SHOWEDITMARKSFN)
									  
					       "Will show the changes to this document as edits.")
							     (Don't% Show% Edits (QUOTE 
									      DONTSHOWEDITMARKSFN)
										 
				       "Will stop showing the changes to this document as edits.")
							     (Accept% Changes
							       (QUOTE EDITMARK.ACCEPTFN)
							       
"throws away the editting change information on the current selection, leaving the text in its newly editted form."
							       (SUBITEMS (Accept% Selected% Changes
									   (QUOTE EDITMARK.ACCEPTFN)
									   
			  "throws away the editting change information on the current selection.")
									 (Accept% ALL% Changes
									   (QUOTE 
									     EDITMARK.ACCEPTALLFN)
									   
				     "clears editting change information on the entire document.")))
							     (Undo% Changes (QUOTE 
									   EDITMARK.UNDOCHANGESFN)
									    
			  "returns the selected text to its PRE-edit state, throwing away edits."])
(DEFINEQ

(EDITMARK.ACCEPTFN
  [LAMBDA (TEXTSTREAM TEXTOBJ)                               (* rrb " 8-Jun-84 16:05")
                                                             (* ACCEPT the changes inside the selection -- mark 
							     everything as not new, and REALLY delete the stuff that 
							     is marked deleted.)
    (SETQ TEXTOBJ (TEXTOBJ TEXTSTREAM))
    (PROG ((PCLST (TEDIT.SELECTED.PIECES TEXTOBJ (fetch SEL of TEXTOBJ)))
	   (CH# (fetch CH# of (fetch SEL of TEXTOBJ)))
	   (PC# (\CHTOPCNO (fetch CH# of (fetch SEL of TEXTOBJ))
			   (fetch PCTB of TEXTOBJ)))
	   (SEL (fetch SEL of TEXTOBJ))
	   (PCTB (fetch PCTB of TEXTOBJ)))
          (\SHOWSEL SEL NIL NIL)
          (\TEDIT.HISTORYADD TEXTOBJ (create TEDITHISTORYEVENT
					     THCH# ← CH#
					     THLEN ←(fetch DCH of SEL)
					     THACTION ←(QUOTE Accept)
					     THFIRSTPIECE ←(CAR PCLST)
					     THOLDINFO ← PCLST))
          (\TEDIT.MARK.LINES.DIRTY TEXTOBJ CH# (fetch CHLIM of SEL))
          [bind LOOKS PLEN (CURCH# ← CH#) for PC in PCLST
	     do (SETQ LOOKS (fetch PLOOKS of PC))
		(SETQ PLEN (fetch PLEN of PC))
		(COND
		  ((fetch PNEW of PC)                        (* Mark any new text as not-new.)
		    (replace PNEW of PC with NIL)            (* turn off the old style.)
		    (replace PLOOKS of PC with (create CHARLOOKS
						  using LOOKS CLUSERINFO ← NIL CLSTYLE ← NIL))
		    (add CURCH# PLEN)
		    (add PC# \EltsPerPiece))
		  ((EQ (fetch CLUSERINFO of LOOKS)
		       (QUOTE DELETED))                      (* If it was deleted, really remove it.)
                                                             (* call the deletefn if it was an object.)
		    (AND (fetch POBJ of PC)
			 (IMAGEOBJPROP (fetch POBJ of PC)
				       (QUOTE WHENDELETEDFN))
			 (APPLY* (IMAGEOBJPROP (fetch POBJ of PC)
					       (QUOTE WHENDELETEDFN))
				 (fetch POBJ of PC)
				 (fetch DS of TEXTOBJ)))
		    (\DELETEPIECE PC PCTB PC#)
		    (\FIXDLINES (fetch LINES of TEXTOBJ)
				SEL CURCH# (SUB1 (IPLUS CURCH# PLEN))
				TEXTOBJ)
		    (add (fetch TEXTLEN of TEXTOBJ)
			 (IMINUS PLEN)))
		  (T                                         (* Otherwise, leave it be.)
		     (add PC# \EltsPerPiece]
          [replace CH# of SEL with (replace CHLIM of SEL with (IMIN (IMAX 1 (SUB1 CH#))
								    (fetch TEXTLEN of TEXTOBJ]
          (replace DCH of SEL with 0)
          [replace POINT of SEL with (COND
				       ((ILEQ CH# 1)
					 (QUOTE LEFT))
				       (T (QUOTE RIGHT]
          (TEDIT.UPDATE.SCREEN TEXTOBJ)
          (\FIXSEL SEL TEXTOBJ)
          (\SHOWSEL SEL NIL T])

(EDITMARK.ACCEPTALLFN
  [LAMBDA (TEXTSTREAM TEXTOBJ)                               (* rrb "31-May-84 11:25")
                                                             (* ACCEPT all of the changes in this document -- mark 
							     everything as not new, and REALLY delete the stuff that 
							     is marked deleted.)
                                                             (* set selection to be everything.)
    (TEDIT.SETSEL TEXTSTREAM 1 (fetch (TEXTOBJ TEXTLEN) of (TEXTOBJ TEXTSTREAM))
		  (QUOTE RIGHT)
		  NIL T)
    (EDITMARK.ACCEPTFN TEXTSTREAM TEXTOBJ])

(EDITMARK.DONTKEEPFN
  [LAMBDA (TXTSTRM)                                          (* rrb "23-Apr-84 15:33")
                                                             (* sets edit mode to not keep changes)
    (PUTTEXTOBJPROP (TEXTOBJ TXTSTRM)
		    (QUOTE TEDIT.TENTATIVE)
		    NIL])

(EDITMARK.INSERTFN
  [LAMBDA (CH CH# TXTOBJ INSERTMARK)                         (* rrb "12-Apr-84 13:15")

          (* advice to \INSERTCH which looks for the case of a character being inserted that was previously deleted.
	  In this case the text is restored to it original form.)

                                                             (* should return non-NIL if the insertion has been 
							     done.)
    (COND
      ((GETTEXTOBJPROP TXTOBJ (QUOTE TEDIT.TENTATIVE))
	NIL])

(EDITMARK.KEEPFN
  [LAMBDA (TXTSTRM)                                          (* rrb "23-Apr-84 15:32")
                                                             (* Sets mode to keep edit changes)
    (PUTTEXTOBJPROP (TEXTOBJ TXTSTRM)
		    (QUOTE TEDIT.TENTATIVE)
		    T])

(EDITMARK.CARETLOOKSFN
  [LAMBDA (LOOKS TEXTOBJ)                                    (* rrb "21-May-84 14:34")
    (COND
      ((GETTEXTOBJPROP TEXTOBJ (QUOTE TEDIT.TENTATIVE))      (* if keeping edit changes, style these in new.)
	(create CHARLOOKS using LOOKS CLSTYLE ←(QUOTE EDITMARK.STYLEFN)
				CLUSERINFO ← NIL))
      (T LOOKS])

(EDITMARK.DELETEFN
  [LAMBDA (TEXTOBJ SEL)                                      (* rrb "21-May-84 16:09")

          (* called from ADVICE on \TEDIT.DELETE and replace \TEDIT.DELETE if TEDIT.TENTATIVE property is T.
	  It is mostly cobbled from it. It does not call the whendeletedfn. This is done by EDITMARK.ACCEPTFN which causes 
	  the object to actually go away.)


    (SETQ TEXTOBJ (TEXTOBJ TEXTOBJ))
    (PROG ((PCLST (TEDIT.SELECTED.PIECES TEXTOBJ SEL))
	   (CH# (fetch CH# of SEL))
	   (PC# (\CHTOPCNO (fetch CH# of SEL)
			   (fetch PCTB of TEXTOBJ)))
	   TEXTLEN)
          (\SHOWSEL SEL NIL NIL)
          (\TEDIT.HISTORYADD TEXTOBJ (create TEDITHISTORYEVENT
					     THCH# ← CH#
					     THLEN ←(fetch DCH of SEL)
					     THACTION ←(QUOTE TentativeDelete)
					     THFIRSTPIECE ←(CAR PCLST)
					     THOLDINFO ← PCLST))
          (\TEDIT.MARK.LINES.DIRTY TEXTOBJ CH# (fetch CHLIM of SEL))
          [bind PLEN (CURCH# ← CH#) for PC in PCLST
	     do (SETQ PLEN (fetch PLEN of PC))
		(COND
		  ((fetch PNEW of PC)                        (* This is an inserted piece, and can be deleted ok)
		    (\DELETEPIECE PC (fetch PCTB of TEXTOBJ)
				  PC#)
		    (\FIXDLINES (fetch LINES of TEXTOBJ)
				SEL CURCH# (SUB1 (IPLUS CURCH# PLEN))
				TEXTOBJ)
		    (add (fetch TEXTLEN of TEXTOBJ)
			 (IMINUS PLEN)))
		  (T (replace PLOOKS of PC with (create CHARLOOKS
						   using (fetch PLOOKS of PC)
							 CLSTYLE ←(QUOTE EDITMARK.STYLEFN)
							 CLUSERINFO ←(QUOTE DELETED)))
		     (add CURCH# PLEN)
		     (add PC# \EltsPerPiece]                 (* fix up selection insertion point.)
          (COND
	    ((IGREATERP CH# (SETQ TEXTLEN (fetch TEXTLEN of TEXTOBJ)))
	      (SETQ CH# (ADD1 TEXTLEN)))
	    ((ILESSP CH# 1)
	      (SETQ CH# 1)))
          (replace CH# of SEL with (replace CHLIM of SEL with CH#))
          (replace POINT of SEL with (QUOTE LEFT))
          (replace DCH of SEL with 0)
          (TEDIT.UPDATE.SCREEN TEXTOBJ)
          (\FIXSEL SEL TEXTOBJ)
          (\SHOWSEL SEL NIL T])

(DONTSHOWEDITMARKSFN
  [LAMBDA (TXTSTRM)                                          (* rrb "23-Apr-84 16:16")
                                                             (* switches to a mode in which changes are not shown)
    (PROG ((TXTOBJ (TEXTOBJ TXTSTRM)))
          (RETURN (COND
		    ((GETTEXTOBJPROP TXTOBJ (QUOTE SHOW.EDIT.MARKS))
		      (PUTTEXTOBJPROP TXTOBJ (QUOTE SHOW.EDIT.MARKS)
				      NIL)                   (* reset flag and redisplay the window.)
		      (REDISPLAY.TEDIT.WINDOW TXTOBJ])

(PUTTEXTOBJPROP
  [LAMBDA (TXTOBJ PROP VAL)                                  (* puts a property on a text object property list.)
    (PROG ((TOPLIST (fetch (TEXTOBJ EDITPROPS) of TXTOBJ)))
          (RETURN (COND
		    (TOPLIST (LISTPUT TOPLIST PROP VAL))
		    (T (replace (TEXTOBJ EDITPROPS) of TXTOBJ with (LIST PROP VAL])

(GETTEXTOBJPROP
  [LAMBDA (TXTOBJ PROP)                                      (* rrb "23-Apr-84 15:46")
                                                             (* gets a property on a text object property list.)
    (LISTGET (fetch (TEXTOBJ EDITPROPS) of (TEXTOBJ TXTOBJ))
	     PROP])

(EDITMARK.REDO.DELETEFN
  [LAMBDA (TEXTOBJ EVENT LEN CH# FIRSTPIECE)                 (* rrb "12-Apr-84 11:22")
    (EDITMARK.DELETEFN TEXTOBJ (fetch SEL of TEXTOBJ])

(REDISPLAY.TEDIT.WINDOW
  [LAMBDA (TXTOBJ)                                           (* rrb " 4-May-84 16:50")
                                                             (* recomputes the display information and redisplays the
							     document TXTOBJ.)
    (PROG ((SEL (fetch (TEXTOBJ SEL) of TXTOBJ)))
          (\SHOWSEL SEL NIL NIL)
          (\TEDIT.MARK.LINES.DIRTY TXTOBJ 0 (fetch (TEXTOBJ TEXTLEN) of TXTOBJ))
          (TEDIT.UPDATE.SCREEN TXTOBJ)
          (\FIXSEL SEL TXTOBJ)
          (\SHOWSEL SEL NIL T])

(SHOWEDITMARKSFN
  [LAMBDA (TXTSTRM TXTOBJ)                                   (* rrb " 8-Jun-84 16:17")
                                                             (* switches to a mode in which changes are shown using 
							     edit marks.)
    (PROG ((TXTOBJ (TEXTOBJ TXTSTRM)))
          (RETURN (COND
		    ((GETTEXTOBJPROP TXTOBJ (QUOTE SHOW.EDIT.MARKS)))
		    (T                                       (* set flag for style function to return marked 
							     properties)
		       (PUTTEXTOBJPROP TXTOBJ (QUOTE SHOW.EDIT.MARKS)
				       T)                    (* set style function for new text.)
		       (TEDIT.MAPPIECES TXTOBJ (FUNCTION SETSTYLEIFNEW)
					(FUNCTION EDITMARK.STYLEFN))
                                                             (* redisplay the window)
		       (REDISPLAY.TEDIT.WINDOW TXTOBJ])

(SETSTYLEIFNEW
  [LAMBDA (CH# PIECE PC# STYLEFN)                            (* rrb " 8-Jun-84 16:17")
                                                             (* sets the style of any piece that is new to STYLEFN.
							     Used in cases where editmarking is turned on.)
    (COND
      ((AND (fetch (PIECE PNEW) of PIECE)
	    (NOT (EQ (fetch (CHARLOOKS CLSTYLE) of (fetch (PIECE PLOOKS) of PIECE))
		     STYLEFN)))                              (* new text)
	(replace (CHARLOOKS CLSTYLE) of (fetch (PIECE PLOOKS) of PIECE) with STYLEFN])

(EDITMARK.STYLEFN
  [LAMBDA (LOOKS PC TXTOBJ)                                  (* rrb "12-Apr-84 11:07")
                                                             (* Does the looks manipulation for tentative editing.)
    (COND
      ((GETTEXTOBJPROP TXTOBJ (QUOTE SHOW.EDIT.MARKS))
	(COND
	  [(fetch PNEW of PC)
	    (create CHARLOOKS using LOOKS CLFONT ←(FONTCOPY (fetch CLFONT of LOOKS)
							    (QUOTE WEIGHT)
							    (QUOTE BOLD]
	  ((EQ (QUOTE DELETED)
	       (fetch CLUSERINFO of LOOKS))
	    (create CHARLOOKS using LOOKS CLSTRIKE ← T))
	  (T LOOKS)))
      (T (COND
	   ((EQ (QUOTE DELETED)
		(fetch CLUSERINFO of LOOKS))
	     (create CHARLOOKS using LOOKS CLINVISIBLE ← T))
	   (T LOOKS])

(EDITMARK.UNDO.DELETEFN
  [LAMBDA (TEXTOBJ EVENT LEN CH# FIRSTPIECE)                 (* rrb "12-Apr-84 11:03")
                                                             (* Undo a tentative deletion)
    (PROG ((PCLST (fetch THOLDINFO of EVENT))
	   (PC# (\CHTOPCNO CH# (fetch PCTB of TEXTOBJ)))
	   (PCTB (fetch PCTB of TEXTOBJ))
	   (SEL (fetch SEL of TEXTOBJ)))
          (\SHOWSEL SEL NIL NIL)
          [for PC in PCLST as PCNO from PC# by \EltsPerPiece
	     do (COND
		  ((fetch PNEW of PC)                        (* This is an inserted piece, and can be deleted ok)
		    (\INSERTPIECE PC (\EDITELT PCTB (ADD1 PCNO))
				  TEXTOBJ NIL PCNO)
		    (SETQ PCTB (fetch PCTB of TEXTOBJ))
		    (add (fetch TEXTLEN of TEXTOBJ)
			 (fetch PLEN of PC))
		    (add PCNO \EltsPerPiece))
		  (T (replace PLOOKS of (\EDITELT PCTB (ADD1 PCNO))
			with (create CHARLOOKS using (fetch PLOOKS of PC)
						     CLUSERINFO ← NIL]
          (replace CH# of SEL with CH#)
          (replace CHLIM of SEL with (SUB1 (IPLUS CH# LEN)))
          (replace DCH of SEL with LEN)
          (replace POINT of SEL with (QUOTE RIGHT))
          (\TEDIT.MARK.LINES.DIRTY TEXTOBJ (fetch CH# of SEL)
				   (fetch CHLIM of SEL))
          (replace THACTION of EVENT with (QUOTE TentativeUndeletion))
          (TEDIT.UPDATE.SCREEN TEXTOBJ)
          (\FIXSEL SEL TEXTOBJ)
          (\SHOWSEL SEL NIL T])

(EDITMARK.UNDO.UNDELETEFN
  [LAMBDA (TEXTOBJ EVENT LEN CH# FIRSTPIECE)                 (* rrb "12-Apr-84 11:22")
    (EDITMARK.DELETEFN TEXTOBJ (fetch SEL of TEXTOBJ])

(EDITMARK.UNDOCHANGESFN
  [LAMBDA (TEXTSTREAM TEXTOBJ)                               (* rrb " 8-Jun-84 16:05")
                                                             (* UNDO the changes inside the selection -- delete newly
							     inserted text and restore stuff marked deleted.)
    (SETQ TEXTOBJ (TEXTOBJ TEXTSTREAM))
    (PROG ((PCLST (TEDIT.SELECTED.PIECES TEXTOBJ (fetch SEL of TEXTOBJ)))
	   (CH# (fetch CH# of (fetch SEL of TEXTOBJ)))
	   (PC# (\CHTOPCNO (fetch CH# of (fetch SEL of TEXTOBJ))
			   (fetch PCTB of TEXTOBJ)))
	   (SEL (fetch SEL of TEXTOBJ))
	   (PCTB (fetch PCTB of TEXTOBJ)))
          (\SHOWSEL SEL NIL NIL)                             (* UndoEdit doesn't have a function for actually undoing
							     it yet.)
          (\TEDIT.HISTORYADD TEXTOBJ (create TEDITHISTORYEVENT
					     THCH# ← CH#
					     THLEN ←(fetch DCH of SEL)
					     THACTION ←(QUOTE UndoEdit)
					     THFIRSTPIECE ←(CAR PCLST)
					     THOLDINFO ← PCLST))
          (\TEDIT.MARK.LINES.DIRTY TEXTOBJ (fetch CH# of SEL)
				   (fetch CHLIM of SEL))
          [bind LOOKS PLEN (CURCH# ← CH#) for PC in PCLST
	     do (SETQ LOOKS (fetch PLOOKS of PC))
		(SETQ PLEN (fetch PLEN of PC))
		(COND
		  ((fetch PNEW of PC)                        (* Delete any new text)
                                                             (* call the deletefn if it was an object.)
		    (AND (fetch POBJ of PC)
			 (IMAGEOBJPROP (fetch POBJ of PC)
				       (QUOTE WHENDELETEDFN))
			 (APPLY* (IMAGEOBJPROP (fetch POBJ of PC)
					       (QUOTE WHENDELETEDFN))
				 (fetch POBJ of PC)
				 (fetch DS of TEXTOBJ)))
		    (\DELETEPIECE PC PCTB PC#)
		    (\FIXDLINES (fetch LINES of TEXTOBJ)
				SEL CURCH# (SUB1 (IPLUS CURCH# PLEN))
				TEXTOBJ)
		    (add (fetch TEXTLEN of TEXTOBJ)
			 (IMINUS PLEN)))
		  (T [COND
		       ((EQ (fetch CLUSERINFO of LOOKS)
			    (QUOTE DELETED))                 (* If it was deleted, restore it.)
			 (replace PLOOKS of PC
			    with (create CHARLOOKS using LOOKS CLUSERINFO ← NIL CLSTYLE ← NIL]
		     (add CURCH# PLEN)
		     (add PC# \EltsPerPiece]
          [replace CH# of SEL with (replace CHLIM of SEL with (IMIN (IMAX 1 (SUB1 CH#))
								    (fetch TEXTLEN of TEXTOBJ]
          (replace DCH of SEL with 0)
          [replace POINT of SEL with (COND
				       ((ILEQ CH# 1)
					 (QUOTE LEFT))
				       (T (QUOTE RIGHT]
          (TEDIT.UPDATE.SCREEN TEXTOBJ)
          (\FIXSEL SEL TEXTOBJ)
          (\SHOWSEL SEL NIL T])

(\EDITMARK.\TEDIT.DELETE
  [LAMBDA (SEL STREAM SELOFF)                                (* rrb "25-Apr-84 10:46")
                                                             (* version of \TEDIT.DELETEFN that checks for tentative 
							     deletion. It is movded into the function definition cell
							     of \TEDIT.DELETEFN when EDITMARK is loaded.)
    (COND
      ((GETTEXTOBJPROP STREAM (QUOTE TEDIT.TENTATIVE))
	(EDITMARK.DELETEFN STREAM SEL))
      (T (\OLDTEDIT.DELETE SEL STREAM SELOFF])
)

(ADDTOVAR TEDIT.HISTORY.TYPELST (TentativeDelete EDITMARK.REDO.DELETEFN EDITMARK.UNDO.DELETEFN)
				(TentativeUndeletion PAPERWORKS.REDO.UNDELETEFN 
						     EDITMARK.UNDO.UNDELETEFN))

(ADDTOVAR TEDIT.DEFAULT.PROPS CARETLOOKSFN EDITMARK.CARETLOOKSFN TEDIT.TENTATIVE NIL SHOW.EDIT.MARKS 
					   NIL)
(DECLARE: EVAL@COMPILE 

(RPAQQ \EltsPerPiece 2)

(CONSTANTS (\EltsPerPiece 2))
)

(PUTPROPS \INSERTCH READVICE [NIL (BEFORE NIL (COND ((EDITMARK.INSERTFN CH CH# TEXTOBJ INSERTMARK)
						     (RETURN])
(MOVD? (QUOTE \TEDIT.DELETE)
       (QUOTE \OLDTEDIT.DELETE))
(MOVD (QUOTE \EDITMARK.\TEDIT.DELETE)
      (QUOTE \TEDIT.DELETE))
[TEDIT.ADD.MENUITEM TEDIT.DEFAULT.MENU (QUOTE (Edit% Marks (QUOTE EDITMARK.ACCEPTFN)
							   
						   "throws away the editting change information."
							   (SUBITEMS
							     (Keep% Edits (QUOTE EDITMARK.KEEPFN)
									  
						    "keeps track of the insertion and deletions.")
							     (Don't% Keep% Edits (QUOTE 
									      EDITMARK.DONTKEEPFN)
										 
							"changes to the documents won't be kept.")
							     (Show% Edits (QUOTE SHOWEDITMARKSFN)
									  
					       "Will show the changes to this document as edits.")
							     (Don't% Show% Edits (QUOTE 
									      DONTSHOWEDITMARKSFN)
										 
				       "Will stop showing the changes to this document as edits.")
							     (Accept% Changes
							       (QUOTE EDITMARK.ACCEPTFN)
							       
"throws away the editting change information on the current selection, leaving the text in its newly editted form."
							       (SUBITEMS (Accept% Selected% Changes
									   (QUOTE EDITMARK.ACCEPTFN)
									   
			  "throws away the editting change information on the current selection.")
									 (Accept% ALL% Changes
									   (QUOTE 
									     EDITMARK.ACCEPTALLFN)
									   
				     "clears editting change information on the entire document.")))
							     (Undo% Changes (QUOTE 
									   EDITMARK.UNDOCHANGESFN)
									    
			  "returns the selected text to its PRE-edit state, throwing away edits."]
(PUTPROPS EDITMARK COPYRIGHT ("Xerox Corporation" 1984 1985))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (2612 19190 (EDITMARK.ACCEPTFN 2622 . 5518) (EDITMARK.ACCEPTALLFN 5520 . 6132) (
EDITMARK.DONTKEEPFN 6134 . 6437) (EDITMARK.INSERTFN 6439 . 6954) (EDITMARK.KEEPFN 6956 . 7249) (
EDITMARK.CARETLOOKSFN 7251 . 7609) (EDITMARK.DELETEFN 7611 . 9853) (DONTSHOWEDITMARKSFN 9855 . 10393) 
(PUTTEXTOBJPROP 10395 . 10748) (GETTEXTOBJPROP 10750 . 11059) (EDITMARK.REDO.DELETEFN 11061 . 11246) (
REDISPLAY.TEDIT.WINDOW 11248 . 11804) (SHOWEDITMARKSFN 11806 . 12680) (SETSTYLEIFNEW 12682 . 13291) (
EDITMARK.STYLEFN 13293 . 14073) (EDITMARK.UNDO.DELETEFN 14075 . 15672) (EDITMARK.UNDO.UNDELETEFN 15674
 . 15861) (EDITMARK.UNDOCHANGESFN 15863 . 18658) (\EDITMARK.\TEDIT.DELETE 18660 . 19188)))))
STOP