diff --git a/lispusers/COMPARETEXT.LCOM b/lispusers/COMPARETEXT.LCOM
index d2088fb8..d4839ced 100644
Binary files a/lispusers/COMPARETEXT.LCOM and b/lispusers/COMPARETEXT.LCOM differ
diff --git a/lispusers/comparetext b/lispusers/comparetext
index 6abc40a2..c30a95ef 100644
--- a/lispusers/comparetext
+++ b/lispusers/comparetext
@@ -1,14 +1,13 @@
 (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10)
 
-(FILECREATED "16-Dec-2021 10:57:35" 
-{DSK}<Users>kaplan>Local>medley3.5>my-medley>lispusers>comparetext.;13 37426  
+(FILECREATED "22-Dec-2021 10:37:46" 
+{DSK}<Users>kaplan>Local>medley3.5>my-medley>lispusers>comparetext.;20 39405  
 
-      :CHANGES-TO (VARS COMPARETEXTCOMS)
-                  (FNS IMCOMPARE.MIDDLEBUTTONFN IMCOMPARE.DISPLAY.FILE.DIFFERENCE.GRAPH 
-                       IMCOMPARE.FIND.TEDIT.TEXT.OBJECT)
+      :CHANGES-TO (FNS IMCOMPARE.COLLECT.HASH.CHUNKS COMPARETEXT)
+                  (RECORDS IMCOMPARE.CHUNK)
 
-      :PREVIOUS-DATE "15-Dec-2021 17:00:06" 
-{DSK}<Users>kaplan>Local>medley3.5>my-medley>lispusers>comparetext.;9)
+      :PREVIOUS-DATE "19-Dec-2021 12:45:35" 
+{DSK}<Users>kaplan>Local>medley3.5>my-medley>lispusers>comparetext.;19)
 
 
 (* ; "
@@ -18,9 +17,7 @@ Copyright (c) 1984-1985, 1993, 1998 by Xerox Corporation.
 (PRETTYCOMPRINT COMPARETEXTCOMS)
 
 (RPAQQ COMPARETEXTCOMS
-       ((DECLARE%: EVAL@COMPILE (FILES (LOADCOMP)
-                                       GRAPHER))
-        (FNS COMPARETEXT IMCOMPARE.BOXNODE IMCOMPARE.CHUNKS IMCOMPARE.COLLECT.HASH.CHUNKS 
+       ((FNS COMPARETEXT IMCOMPARE.BOXNODE IMCOMPARE.CHUNKS IMCOMPARE.COLLECT.HASH.CHUNKS 
              IMCOMPARE.DISPLAY.FILE.DIFFERENCE.GRAPH IMCOMPARE.FIND.TEDIT.TEXT.OBJECT IMCOMPARE.HASH
              IMCOMPARE.LEFTBUTTONFN IMCOMPARE.LENGTHEN.ATOM IMCOMPARE.MERGE.CONNECTED.CHUNKS 
              IMCOMPARE.MERGE.UNCONNECTED.CHUNKS IMCOMPARE.MIDDLEBUTTONFN IMCOMPARE.SHOW.DIST 
@@ -29,16 +26,15 @@ Copyright (c) 1984-1985, 1993, 1998 by Xerox Corporation.
         (INITVARS (IMCOMPARE.LAST.NODE NIL)
                (IMCOMPARE.LAST.GRAPH.WINDOW NIL))
         (RECORDS IMCOMPARE.CHUNK IMCOMPARE.SYMB)
-        (FILES GRAPHER)))
-(DECLARE%: EVAL@COMPILE 
-
-(FILESLOAD (LOADCOMP)
-       GRAPHER)
-)
+        (FILES (SYSLOAD)
+               GRAPHER)
+        (DECLARE%: EVAL@COMPILE DONTCOPY (FILES (LOADCOMP)
+                                                GRAPHER))))
 (DEFINEQ
 
 (COMPARETEXT
   [LAMBDA (NEWFILENAME OLDFILENAME HASH.TYPE GRAPH.REGION FILELABELS)
+                                                             (* ; "Edited 22-Dec-2021 10:35 by rmk")
                                                              (* ; "Edited 15-Dec-2021 16:23 by rmk")
                                                              (* ; "Edited 13-Dec-2021 12:21 by rmk")
                                                              (* ; "Edited  8-Nov-2021 08:44 by rmk:")
@@ -56,12 +52,10 @@ Copyright (c) 1984-1985, 1993, 1998 by Xerox Corporation.
              (ERROR "Can't find both files" (LIST NEWFILENAME OLDFILENAME)))
          (IMCOMPARE.CHUNKS (create IMCOMPARE.CHUNK
                                   FILENAME _ NEWFILE
-                                  FILEPTR _ 0
-                                  CHUNKLENGTH _ (GETFILEINFO NEWFILE 'LENGTH))
+                                  FILEPTR _ 0)
                 (create IMCOMPARE.CHUNK
                        FILENAME _ OLDFILE
-                       FILEPTR _ 0
-                       CHUNKLENGTH _ (GETFILEINFO OLDFILE 'LENGTH))
+                       FILEPTR _ 0)
                 HASH.TYPE
                 (if (EQ GRAPH.REGION T)
                     then (create REGION
@@ -89,6 +83,7 @@ Copyright (c) 1984-1985, 1993, 1998 by Xerox Corporation.
 
 (IMCOMPARE.CHUNKS
   [LAMBDA (NEWFILE.SPEC.CHUNK OLDFILE.SPEC.CHUNK HASH.TYPE GRAPH.REGION FILELABELS)
+                                                             (* ; "Edited 18-Dec-2021 13:21 by rmk")
                                                              (* ; "Edited 15-Dec-2021 16:28 by rmk")
                                                              (* ; "Edited 13-Dec-2021 12:32 by rmk")
                                                              (* rmk%: " 8-Sep-84 00:06")
@@ -143,32 +138,45 @@ Copyright (c) 1984-1985, 1993, 1998 by Xerox Corporation.
 
          (* ;; "The file comparison is complete.  Format and display the file difference graph")
 
-         (IMCOMPARE.DISPLAY.FILE.DIFFERENCE.GRAPH NEWFILE.SPEC.CHUNK OLDFILE.CHUNK.LIST HASH.TYPE 
+         (IMCOMPARE.DISPLAY.FILE.DIFFERENCE.GRAPH NEWFILE.SPEC.CHUNK OLDFILE.SPEC.CHUNK HASH.TYPE 
                 GRAPH.REGION NEWFILE.CHUNK.LIST OLDFILE.CHUNK.LIST FILELABELS])
 
 (IMCOMPARE.COLLECT.HASH.CHUNKS
-  [LAMBDA (CHUNK HASH.TYPE)                                  (* ; "Edited 15-Dec-2021 15:40 by rmk")
+  [LAMBDA (CHUNK HASH.TYPE)                                  (* ; "Edited 22-Dec-2021 10:37 by rmk")
                                                              (* ; "Edited 13-Dec-2021 16:32 by rmk")
                                                              (* ; "Edited 23-Dec-98 16:54 by rmk:")
                                                              (* mjs " 8-Jan-84 20:57")
 
-(* ;;; "returns a list of the chunks inside CHUNK as hashed of type HASH.TYPE.  Presumably CHUNK is is higher on the ranking PARA > LINE >.  WORD.  The initial CHUNK covers the whole file, middle-mouse refinement-chunks cover only subsections.")
+(* ;;; "Returns a list of the chunks inside CHUNK as hashed of type HASH.TYPE.  Presumably CHUNK is is higher on the ranking PARA > LINE >.  WORD.  The initial CHUNK covers the whole file, middle-mouse refinement-chunks cover only subsections.")
 
-    (BIND [STREAM _ (OPENSTREAM (fetch (IMCOMPARE.CHUNK FILENAME) of CHUNK)
-                           'INPUT
-                           'OLD
-                           '((TYPE TEXT)
-                             (EOLCONVENTION ANY]
-          (ENDPOS _ (IPLUS (fetch (IMCOMPARE.CHUNK FILEPTR) of CHUNK)
-                           (fetch (IMCOMPARE.CHUNK CHUNKLENGTH) of CHUNK)))
-          (FILENAME _ (fetch (IMCOMPARE.CHUNK FILENAME) of CHUNK))
-       FIRST (SETFILEPTR STREAM (fetch (IMCOMPARE.CHUNK FILEPTR) of CHUNK))
-       WHILE (SETQ CHUNK (IMCOMPARE.HASH STREAM HASH.TYPE ENDPOS FILENAME)) COLLECT CHUNK
-       FINALLY (CLOSEF STREAM])
+    (* ;; "It is overkill to open raw text streams as TEDIT stream.  So we open, test for TEDIT and if so, close and reoopen.  TEDIT may not yet honor external formats other than XCCS for rawtext files.")
+
+    (BIND (FILENAME _ (fetch (IMCOMPARE.CHUNK FILENAME) of CHUNK))
+          STREAM ENDPOS FIRST (SETQ STREAM (OPENSTREAM FILENAME 'INPUT 'OLD))
+                              (CL:WHEN (\TEDIT.FORMATTEDP1 STREAM)
+                                  (CLOSEF STREAM)            (* ; 
+                                               "The OBJECTCHAR is produced in place of image objects")
+                                  [SETQ STREAM (OPENTEXTSTREAM FILENAME NIL NIL NIL
+                                                      `(OBJECTBYTE ,(CHARCODE NULL])
+                              (SETFILEINFO STREAM 'EOL 'ANY)
+                              (CL:UNLESS (fetch (IMCOMPARE.CHUNK CHUNKLENGTH) of CHUNK)
+
+                                  (* ;; 
+                         "For TEDIT files, the character length isn't known until after text-opening")
+
+                                  (REPLACE (IMCOMPARE.CHUNK CHUNKLENGTH) of CHUNK
+                                     WITH (GETFILEINFO STREAM 'LENGTH)))
+                              (SETFILEPTR STREAM (fetch (IMCOMPARE.CHUNK FILEPTR) of CHUNK))
+                              (SETQ ENDPOS (IPLUS (fetch (IMCOMPARE.CHUNK FILEPTR) of CHUNK)
+                                                  (fetch (IMCOMPARE.CHUNK CHUNKLENGTH) of CHUNK)))
+       WHILE (SETQ CHUNK (IMCOMPARE.HASH STREAM HASH.TYPE ENDPOS))
+       COLLECT (REPLACE FILENAME OF CHUNK WITH FILENAME)
+             CHUNK FINALLY (CLOSEF STREAM])
 
 (IMCOMPARE.DISPLAY.FILE.DIFFERENCE.GRAPH
   [LAMBDA (NEWFILE.SPEC.CHUNK OLDFILE.SPEC.CHUNK HASH.TYPE GRAPH.REGION NEWFILE.CHUNK.LIST 
-                 OLDFILE.CHUNK.LIST FILELABELS)              (* ; "Edited 16-Dec-2021 10:48 by rmk")
+                 OLDFILE.CHUNK.LIST FILELABELS)              (* ; "Edited 18-Dec-2021 13:16 by rmk")
+                                                             (* ; "Edited 16-Dec-2021 10:48 by rmk")
                                                              (* ; "Edited 13-Dec-2021 12:19 by rmk")
                                                              (* mjs "11-Jul-85 09:10")
 
@@ -297,7 +305,8 @@ Copyright (c) 1984-1985, 1993, 1998 by Xerox Corporation.
        unless (TEDIT.STREAMCHANGEDP POSS.TOBJ) do (RETURN POSS.TOBJ])
 
 (IMCOMPARE.HASH
-  [LAMBDA (STREAM HASH.TYPE ENDPOS FULLNAME)                 (* ; "Edited 15-Dec-2021 15:58 by rmk")
+  [LAMBDA (STREAM HASH.TYPE ENDPOS)                          (* ; "Edited 19-Dec-2021 09:07 by rmk")
+                                                             (* ; "Edited 15-Dec-2021 15:58 by rmk")
                                                              (* ; "Edited 13-Dec-2021 16:35 by rmk")
                                                              (* ; "Edited 23-Dec-98 16:58 by rmk:")
 
@@ -359,35 +368,44 @@ Copyright (c) 1984-1985, 1993, 1998 by Xerox Corporation.
                     HASHVALUE _ HASHNUM
                     FILEPTR _ STARTPOS
                     CHUNKLENGTH _ (IDIFFERENCE (GETFILEPTR STREAM)
-                                         STARTPOS)
-                    FILENAME _ FULLNAME))])
+                                         STARTPOS)))])
 
 (IMCOMPARE.LEFTBUTTONFN
-  [LAMBDA (GNODE WINDOW)                                 (* mjs " 2-Apr-85 14:21")
+  [LAMBDA (GNODE WINDOW)                                     (* ; "Edited 18-Dec-2021 13:02 by rmk")
+                                                             (* mjs " 2-Apr-85 14:21")
     (if GNODE
-        then (IMCOMPARE.BOXNODE GNODE WINDOW)
-              (PROG ((NODEID (fetch (GRAPHNODE NODEID) of GNODE))
-                     (FILEPTR 1)
-                     (CHUNKLENGTH 0)
-                     (TEDIT.TEXT.OBJECT NIL)
-                     FILE)
-                    (SETQ FILE (fetch (IMCOMPARE.CHUNK FILENAME) of NODEID))
-                    (SETQ FILEPTR (fetch (IMCOMPARE.CHUNK FILEPTR) of NODEID))
-                    (SETQ CHUNKLENGTH (fetch (IMCOMPARE.CHUNK CHUNKLENGTH) of NODEID))
-                    (SETQ TEDIT.TEXT.OBJECT (IMCOMPARE.FIND.TEDIT.TEXT.OBJECT FILE))
-                    (if TEDIT.TEXT.OBJECT
-                        then (TEDIT.SETSEL TEDIT.TEXT.OBJECT (IMAX 1 (IDIFFERENCE FILEPTR 25))
-                                        0
-                                        'LEFT)
-                              (TEDIT.NORMALIZECARET TEDIT.TEXT.OBJECT)
-                              (TEDIT.SETSEL TEDIT.TEXT.OBJECT FILEPTR CHUNKLENGTH 'LEFT)
-                              (TEDIT.NORMALIZECARET TEDIT.TEXT.OBJECT)
-                              (TTY.PROCESS (WINDOWPROP (CAR (fetch (TEXTOBJ \WINDOW) of
-                                                                                         
-                                                                                    TEDIT.TEXT.OBJECT
-                                                                   ))
-                                                  'PROCESS))
-                      else (TEDIT FILE NIL NIL (LIST 'SEL (LIST FILEPTR CHUNKLENGTH])
+        then (LET ((NODEID (fetch (GRAPHNODE NODEID) of GNODE)))
+                  (IF (FIXP (CAR NODEID))
+                      THEN (IMCOMPARE.BOXNODE GNODE WINDOW)
+                           [LET ((FILEPTR 1)
+                                 (CHUNKLENGTH 0)
+                                 (TEDIT.TEXT.OBJECT NIL)
+                                 FILE)
+                                (SETQ FILE (fetch (IMCOMPARE.CHUNK FILENAME) of NODEID))
+                                (SETQ FILEPTR (fetch (IMCOMPARE.CHUNK FILEPTR) of NODEID))
+                                (SETQ CHUNKLENGTH (fetch (IMCOMPARE.CHUNK CHUNKLENGTH) of NODEID))
+                                (SETQ TEDIT.TEXT.OBJECT (IMCOMPARE.FIND.TEDIT.TEXT.OBJECT FILE))
+                                (if TEDIT.TEXT.OBJECT
+                                    then (TEDIT.SETSEL TEDIT.TEXT.OBJECT (IMAX 1 (IDIFFERENCE FILEPTR
+                                                                                        25))
+                                                0
+                                                'LEFT)
+                                         (TEDIT.NORMALIZECARET TEDIT.TEXT.OBJECT)
+                                         (TEDIT.SETSEL TEDIT.TEXT.OBJECT FILEPTR CHUNKLENGTH
+                                                'LEFT)
+                                         (TEDIT.NORMALIZECARET TEDIT.TEXT.OBJECT)
+                                         (TTY.PROCESS (WINDOWPROP (CAR (fetch (TEXTOBJ \WINDOW)
+                                                                          of TEDIT.TEXT.OBJECT))
+                                                             'PROCESS))
+                                  else (TEDIT FILE NIL NIL (LIST 'SEL (LIST FILEPTR CHUNKLENGTH]
+                    ELSEIF (AND (LITATOM NODEID)
+                                (INFILEP NODEID))
+                      THEN 
+                           (* ;; 
+                           "A file name as a column header, do TEDIT on the whole file, no selection")
+
+                           (TEDIT-SEE NODEID)
+                    ELSE (SHOULDNT])
 
 (IMCOMPARE.LENGTHEN.ATOM
   [LAMBDA (X MIN.LENGTH EXTENDER)                            (* ; "Edited 13-Dec-2021 21:18 by rmk")
@@ -561,19 +579,25 @@ Copyright (c) 1984-1985, 1993, 1998 by Xerox Corporation.
 (DECLARE%: EVAL@COMPILE
 
 (RECORD IMCOMPARE.CHUNK (HASHVALUE FILEPTR CHUNKLENGTH FILENAME . OTHERCHUNK)
-                        FILEPTR _ 1 CHUNKLENGTH _ 0)
+                        FILEPTR _ 1)
 
 (RECORD IMCOMPARE.SYMB (NEWCOUNT OLDCOUNT . OLDPTR))
 )
 
-(FILESLOAD GRAPHER)
+(FILESLOAD (SYSLOAD)
+       GRAPHER)
+(DECLARE%: EVAL@COMPILE DONTCOPY 
+
+(FILESLOAD (LOADCOMP)
+       GRAPHER)
+)
 (PUTPROPS COMPARETEXT COPYRIGHT ("Xerox Corporation" 1984 1985 1993 1998))
 (DECLARE%: DONTCOPY
-  (FILEMAP (NIL (1433 36973 (COMPARETEXT 1443 . 3693) (IMCOMPARE.BOXNODE 3695 . 4211) (IMCOMPARE.CHUNKS 
-4213 . 8626) (IMCOMPARE.COLLECT.HASH.CHUNKS 8628 . 10026) (IMCOMPARE.DISPLAY.FILE.DIFFERENCE.GRAPH 
-10028 . 19004) (IMCOMPARE.FIND.TEDIT.TEXT.OBJECT 19006 . 19780) (IMCOMPARE.HASH 19782 . 23904) (
-IMCOMPARE.LEFTBUTTONFN 23906 . 25642) (IMCOMPARE.LENGTHEN.ATOM 25644 . 26346) (
-IMCOMPARE.MERGE.CONNECTED.CHUNKS 26348 . 29844) (IMCOMPARE.MERGE.UNCONNECTED.CHUNKS 29846 . 31801) (
-IMCOMPARE.MIDDLEBUTTONFN 31803 . 34638) (IMCOMPARE.SHOW.DIST 34640 . 35086) (
-IMCOMPARE.UPDATE.SYMBOL.TABLE 35088 . 36971)))))
+  (FILEMAP (NIL (1334 38876 (COMPARETEXT 1344 . 3554) (IMCOMPARE.BOXNODE 3556 . 4072) (IMCOMPARE.CHUNKS 
+4074 . 8592) (IMCOMPARE.COLLECT.HASH.CHUNKS 8594 . 11053) (IMCOMPARE.DISPLAY.FILE.DIFFERENCE.GRAPH 
+11055 . 20136) (IMCOMPARE.FIND.TEDIT.TEXT.OBJECT 20138 . 20912) (IMCOMPARE.HASH 20914 . 25101) (
+IMCOMPARE.LEFTBUTTONFN 25103 . 27545) (IMCOMPARE.LENGTHEN.ATOM 27547 . 28249) (
+IMCOMPARE.MERGE.CONNECTED.CHUNKS 28251 . 31747) (IMCOMPARE.MERGE.UNCONNECTED.CHUNKS 31749 . 33704) (
+IMCOMPARE.MIDDLEBUTTONFN 33706 . 36541) (IMCOMPARE.SHOW.DIST 36543 . 36989) (
+IMCOMPARE.UPDATE.SYMBOL.TABLE 36991 . 38874)))))
 STOP
