|
1 | 1 | (DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP" BASE 10) |
2 | 2 |
|
3 | | -(FILECREATED " 8-Dec-2021 18:25:33" |
4 | | -{DSK}<Users>kaplan>Local>medley3.5>my-medley>sources>EDITINTERFACE.;29 47473 |
| 3 | +(FILECREATED "19-Jan-2022 23:09:02" |
| 4 | +{DSK}<Users>kaplan>Local>medley3.5>my-medley>sources>EDITINTERFACE.;34 47559 |
5 | 5 |
|
6 | | - :CHANGES-TO (FNS EDITDATE? EDITDATE) |
| 6 | + :CHANGES-TO (FNS FIXEDITDATE EDITDATE?) |
7 | 7 |
|
8 | | - :PREVIOUS-DATE " 8-Dec-2021 16:11:23" |
9 | | -{DSK}<Users>kaplan>Local>medley3.5>my-medley>sources>EDITINTERFACE.;27) |
| 8 | + :PREVIOUS-DATE "19-Jan-2022 10:22:03" |
| 9 | +{DSK}<Users>kaplan>Local>medley3.5>my-medley>sources>EDITINTERFACE.;31) |
10 | 10 |
|
11 | 11 |
|
12 | 12 | (* ; " |
@@ -109,7 +109,7 @@ Copyright (c) 1986-1988, 1990-1991 by Venue & Xerox Corporation. |
109 | 109 | (DEFGLOBALVAR XCL::ED-LAST-INFO NIL |
110 | 110 | "used in ED to stash last call info so (ED NIL) will restart last edit") |
111 | 111 |
|
112 | | -(CL:DEFUN ED (CL::NAME CL::OPTIONS) (* ; "Edited 5-Jul-88 16:03 by woz") |
| 112 | +(CL:DEFUN ED (CL::NAME CL::OPTIONS) (* ; "Edited 5-Jul-88 16:03 by woz") |
113 | 113 |
|
114 | 114 | (* ;;; "Standard Common Lisp editor entry. CLtL say's ED does something reasonable when passed a pathname. We coerce name into something that might be the name of something with an IL:FILES definition, & try to edit that. Then save call info in ED-LAST-INFO, so (ED) will start last edit over again.") |
115 | 115 |
|
@@ -627,13 +627,11 @@ Copyright (c) 1986-1988, 1990-1991 by Venue & Xerox Corporation. |
627 | 627 | OLDATE INITLS]) |
628 | 628 |
|
629 | 629 | (FIXEDITDATE |
630 | | - [LAMBDA (EXPR) |
| 630 | + [LAMBDA (EXPR) (* ; "Edited 19-Jan-2022 23:08 by rmk") |
631 | 631 |
|
632 | 632 | (* ;; "Edited 8-Dec-2021 16:11 by rmk: Updated to add dates to the initial undated comments that begins with current-editor initials, to provide a kind of dated change-log capability.") |
633 | | - (* ; "Edited 3-Dec-2021 15:03 by rmk") |
634 | | - (* ; "Edited 22-Oct-2021 16:58 by rmk:") |
635 | | - (* ; "Edited 27-Sep-2018 22:04 by rmk:") |
636 | | - (* ; "Edited 31-Mar-2000 17:13 by rmk:") |
| 633 | + (* ; "Edited 27-Sep-2018 22:04 by rmk:") |
| 634 | + (* ; "Edited 31-Mar-2000 17:13 by rmk:") |
637 | 635 | (* ; "Edited 17-Jul-89 11:13 by jtm:") |
638 | 636 | (* ; "18-JUL-78 21:11") |
639 | 637 |
|
@@ -722,56 +720,57 @@ Copyright (c) 1986-1988, 1990-1991 by Venue & Xerox Corporation. |
722 | 720 | ELSEIF (SETQ PARSE (EDITDATE? (CAR E) |
723 | 721 | T)) |
724 | 722 | THEN |
725 | | - (* ;; "Attach the new timestamp at the beginning of E, provided the new date is either more than a day later than the previous one or by a different editor.") |
| 723 | + (* ;; "If edited by the same editor within a day, then update the previous timestamp rather than cluttering with a new one. Presumably this is the next event in the same longer editing session, and it avoids stacking up uninformative dates from in-and-out editing during a session. ") |
726 | 724 |
|
727 | | - (* ;; "If edited by the same editor within a day, then update the previous timestamp rather than just leaving the original time. Presumably this is the next event in the same longer editing session, and it avoids stacking up uninformative dates from in-and-out editing during a session. ") |
728 | | - |
729 | | - (IF (STRING.EQUAL INITLS (CADR PARSE)) |
| 725 | + (IF [AND (STRING.EQUAL INITLS (CADR PARSE)) |
| 726 | + (ILEQ (IDIFFERENCE (IDATE) |
| 727 | + (IDATE (CAR PARSE))) |
| 728 | + (CONSTANT (TIMES 24 3600] |
730 | 729 | THEN |
731 | 730 |
|
732 | | - (* ;; "Another edit by the same author. If not dated but contains a rest, then upgrade the rest comment with a date Otherwise,If more than a day later, add a new date. If less than a day, assume we are in essentially the same session, and update (CAR E) to the current time.") |
733 | | - |
734 | | - [IF (NULL (CAR PARSE)) |
735 | | - THEN |
736 | | - (* ;; "If no date but %"INITIALS: xxx%", we definitely want to upgraded to the Edited... initials: xxx format") |
| 731 | + (* ;; "Same edit session with the same author: update the last previous timestamp. If the (CAR PARSE) is NIL, we are looking at an initialed comment that becomes a timestamp, and we convert it. If just after this we see another timestamp for the same session, we take that out.") |
737 | 732 |
|
738 | | - (/RPLACA E (EDITDATE (CAR E) |
739 | | - INITLS |
740 | | - (CADDR PARSE))) |
741 | | - ELSEIF (IGREATERP (IDIFFERENCE (IDATE) |
| 733 | + (/RPLACA E (EDITDATE (CAR E) |
| 734 | + INITLS |
| 735 | + (CADDR PARSE))) |
| 736 | + (CL:WHEN [AND (SETQ PARSE (EDITDATE? (CADR E) |
| 737 | + T)) |
| 738 | + (NULL (CADDR PARSE)) |
| 739 | + (STRING.EQUAL INITLS (CADR PARSE)) |
| 740 | + (ILEQ (IDIFFERENCE (IDATE) |
742 | 741 | (IDATE (CAR PARSE))) |
743 | | - (TIMES 24 3600)) |
744 | | - THEN |
745 | | - (* ;; |
746 | | - "If we aren't upgrading, then we don't want to propagate the previous REST.") |
747 | | - |
748 | | - (/ATTACH (EDITDATE NIL INITLS) |
749 | | - E) |
750 | | - ELSE |
751 | | - (* ;; |
752 | | - "Same author, within a day. Just change the date, keep the REST.") |
753 | | - |
754 | | - (/RPLACA E (EDITDATE (CAR E) |
755 | | - INITLS |
756 | | - (CADDR PARSE] |
| 742 | + (CONSTANT (TIMES 24 3600] |
| 743 | + (/RPLACD E (CDDR E))) |
757 | 744 | ELSE |
| 745 | + (* ;; |
| 746 | + "Different edit sequence, attach a new timestamp in front of any old ones.") |
758 | 747 |
|
759 | | - (* ;; "Not a previous date, or not one with this author. Add a new one. If rmk is editing and sees an lmm: rest, we don't want to attribute that rest to rmk in the new one.") |
| 748 | + (/ATTACH (EDITDATE NIL INITLS (CADDR PARSE)) |
| 749 | + E)) |
760 | 750 |
|
761 | | - (/ATTACH (EDITDATE NIL INITLS) |
762 | | - E)) |
| 751 | + (* ;; "If the new date has an upgraded comment-level, update all of the previous dates so that they align on the left instead of the right.") |
| 752 | + |
| 753 | + (CL:UNLESS (EQ (CADR (CAR E)) |
| 754 | + ';) |
| 755 | + (FOR PREV (NEWTYPE _ (CADR (CAR E))) IN (CDR E) |
| 756 | + WHILE (EDITDATE? PREV T) UNTIL (EQ (CADR PREV) |
| 757 | + NEWTYPE) |
| 758 | + DO (/RPLACA (CDR PREV) |
| 759 | + NEWTYPE))) |
763 | 760 | ELSE |
764 | | - (* ;; "Need a new date, didn't even see %"<initials: xxx%"") |
| 761 | + (* ;; |
| 762 | + "First edit: we didn't see an old date to compare with or smash, not even an initials: xxx form.") |
765 | 763 |
|
766 | 764 | (/ATTACH (EDITDATE NIL INITLS) |
767 | 765 | E))) |
768 | 766 | (RETURN EXPR)))]) |
769 | 767 |
|
770 | 768 | (EDITDATE? |
771 | | - [LAMBDA (COMMENT RESTOK) (* ; "Edited 8-Dec-2021 18:24 by rmk") |
| 769 | + [LAMBDA (COMMENT RESTOK) (* ; "Edited 19-Jan-2022 22:49 by rmk") |
| 770 | + (* ; "Edited 8-Dec-2021 18:24 by rmk") |
772 | 771 |
|
773 | 772 | (* ;; "Edited 6-Dec-2021 16:04 by rmk: Return will have date/initial, initial/rest, or date/initial/rest. Always an initial and something, or NIL.") |
774 | | - (* ; "Edited 4-Dec-2021 10:39 by rmk") |
| 773 | + (* ; "Edited 4-Dec-2021 10:39 by rmk") |
775 | 774 |
|
776 | 775 | (* ;;; "This determines whether this is a dated or initialed comment that is potentially reusable in the current context. Unless RESTOK, this only recognizes modern-format configurations of the form %"Edited <date> by <initials>%", and returns a parsed pair (DATE INITIALS).") |
777 | 776 |
|
@@ -818,12 +817,14 @@ Copyright (c) 1986-1988, 1990-1991 by Venue & Xerox Corporation. |
818 | 817 | (CL:WHEN (SETQ REST (SUBSTRING STRING (ADD1 IENDPOS))) |
819 | 818 | (SETQ REST (CL:STRING-TRIM `(#\Space) |
820 | 819 | REST))) |
821 | | - (IF (IGREATERP (NCHARS REST) |
822 | | - 0) |
823 | | - THEN |
824 | | - (* ;; "Could be %"<initials>: abc%" to be upgraded with a date") |
| 820 | + (IF (AND REST (IGREATERP (NCHARS REST) |
| 821 | + 0)) |
| 822 | + THEN (CL:WHEN RESTOK |
| 823 | + |
| 824 | + (* ;; "Could be %"<initials>: abc%" , we fill in the date") |
825 | 825 |
|
826 | | - (CL:WHEN RESTOK (LIST DATE I REST)) |
| 826 | + (LIST (DATE (DATEFORMAT NO.SECONDS)) |
| 827 | + I REST)) |
827 | 828 | ELSEIF DATE |
828 | 829 | THEN |
829 | 830 | (* ;; "If we saw just initials") |
@@ -928,11 +929,11 @@ Copyright (c) 1986-1988, 1990-1991 by Venue & Xerox Corporation. |
928 | 929 | ) |
929 | 930 | (PUTPROPS EDITINTERFACE COPYRIGHT ("Venue & Xerox Corporation" 1986 1987 1988 1990 1991)) |
930 | 931 | (DECLARE%: DONTCOPY |
931 | | - (FILEMAP (NIL (4086 10381 (ED 4086 . 10381)) (10383 14359 (INSTALL-PROTOTYPE-DEFN 10383 . 14359)) ( |
932 | | -14360 31143 (EDITDEF.FNS 14370 . 15706) (EDITF 15708 . 16588) (EDITFB 16590 . 17438) (EDITFNS 17440 . |
933 | | -18760) (EDITLOADFNS? 18762 . 22562) (EDITMODE 22564 . 24574) (EDITP 24576 . 25087) (EDITV 25089 . |
934 | | -25728) (DC 25730 . 26411) (DF 26413 . 27455) (DP 27457 . 28541) (DV 28543 . 29115) (EDITPROP 29117 . |
935 | | -29336) (EF 29338 . 29667) (EP 29669 . 29852) (EV 29854 . 30033) (EDITE 30035 . 30913) (EDITL 30915 . |
936 | | -31141)) (31493 46618 (NEW/EDITDATE 31503 . 31725) (FIXEDITDATE 31727 . 39874) (EDITDATE? 39876 . 43363 |
937 | | -) (EDITDATE 43365 . 44621) (SETINITIALS 44623 . 46616))))) |
| 932 | + (FILEMAP (NIL (4089 10388 (ED 4089 . 10388)) (10390 14366 (INSTALL-PROTOTYPE-DEFN 10390 . 14366)) ( |
| 933 | +14367 31150 (EDITDEF.FNS 14377 . 15713) (EDITF 15715 . 16595) (EDITFB 16597 . 17445) (EDITFNS 17447 . |
| 934 | +18767) (EDITLOADFNS? 18769 . 22569) (EDITMODE 22571 . 24581) (EDITP 24583 . 25094) (EDITV 25096 . |
| 935 | +25735) (DC 25737 . 26418) (DF 26420 . 27462) (DP 27464 . 28548) (DV 28550 . 29122) (EDITPROP 29124 . |
| 936 | +29343) (EF 29345 . 29674) (EP 29676 . 29859) (EV 29861 . 30040) (EDITE 30042 . 30920) (EDITL 30922 . |
| 937 | +31148)) (31500 46704 (NEW/EDITDATE 31510 . 31732) (FIXEDITDATE 31734 . 39753) (EDITDATE? 39755 . 43449 |
| 938 | +) (EDITDATE 43451 . 44707) (SETINITIALS 44709 . 46702))))) |
938 | 939 | STOP |
0 commit comments