You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"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.")
(* ;; "Edited 3-Dec-2021 15:35 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")
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
634
(* ; "Edited 22-Oct-2021 16:58 by rmk:")
635
635
(* ; "Edited 27-Sep-2018 22:04 by rmk:")
636
636
(* ; "Edited 31-Mar-2000 17:13 by rmk:")
637
637
(* ; "Edited 17-Jul-89 11:13 by jtm:")
638
638
(* ; "18-JUL-78 21:11")
639
639
640
-
(* ;; "Inserts or replaces previous edit date. This retains multiple edits (at least one day apart or by different editor) unless *REPLACE-OLD-EDIT-DATES*. Note that the new date doesn't show up within the current SEDIT session, you have to exit and re-edit to see it.")
640
+
(* ;; "Inserts or replaces previous edit date. This retains multiple edits (at least one day apart or by different editor) unless *REPLACE-OLD-EDIT-DATES*. Note that the new date doesn't show up within the current SEDIT session, you have to exit and re-edit to see it.")
641
641
642
642
(CL:WHEN (AND INITIALS (LISTP EXPR)
643
643
(LISTP (CDR EXPR)))
644
644
(PROG (E)
645
645
646
-
(* ;; "Normalize out the colon, add it back if needed.")
646
+
(* ;; "Normalize out the colon, add it back if needed.")
(* ;; "This is a previous date with this author. 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.")
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
733
734
-
[IF (OR (NULL (CAR PARSE))
735
-
(IGREATERP (IDIFFERENCE (IDATE)
736
-
(IDATE (CAR PARSE)))
737
-
(TIMES 24 3600)))
734
+
[IF (NULL (CAR PARSE))
738
735
THEN
739
-
(* ;; "If no date, must have been %"INITIALS: xxx%" and we definitely want to upgraded to the Edited... format")
736
+
(* ;; "If no date but %"INITIALS: xxx%", we definitely want to upgraded to the Edited... initials: xxx format")
737
+
738
+
(/RPLACA E (EDITDATE (CAR E)
739
+
INITLS
740
+
(CADDR PARSE)))
741
+
ELSEIF (IGREATERP (IDIFFERENCE (IDATE)
742
+
(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.")
740
747
741
-
(/ATTACH (EDITDATE NIL INITLS (CADDR PARSE))
748
+
(/ATTACH (EDITDATE NIL INITLS)
742
749
E)
743
750
ELSE
744
-
(* ;; "Same author, within a day. ")
751
+
(* ;;
752
+
"Same author, within a day. Just change the date, keep the REST.")
745
753
746
-
(/RPLACA E (EDITDATE NIL INITLS (CADDR PARSE]
754
+
(/RPLACA E (EDITDATE (CAR E)
755
+
INITLS
756
+
(CADDR PARSE]
747
757
ELSE
748
-
(* ;;
749
-
"Not a previous date, or not one with this author. Add a new one.")
750
758
751
-
(/ATTACH (EDITDATE NIL INITLS (CADDR PARSE))
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.")
760
+
761
+
(/ATTACH (EDITDATE NIL INITLS)
752
762
E))
753
763
ELSE
754
764
(* ;; "Need a new date, didn't even see %"<initials: xxx%"")
[LAMBDA (COMMENT RESTOK) (* ; "Edited 4-Dec-2021 10:39 by rmk")
771
+
[LAMBDA (COMMENT RESTOK) (* ; "Edited 8-Dec-2021 18:24 by rmk")
772
+
773
+
(* ;; "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")
762
775
763
776
(* ;;; "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).")
764
777
765
-
(* ;;; "If RESTOK, this also parses strings with additional stuff after the <initials> (%"Edited by <initials>: xxx%") and strings that appear to begin with initials but don't have a date (<initials>: xxx). In those cases the return is a triple (DATE INITIALS REST), where DATE may be NIL. ")
778
+
(* ;;; "If RESTOK, this also parses strings with additional stuff after the INITLS (%"Edited by <initials>: xxx%") and strings that appear to begin with initials but don't have a date (<initials>: xxx). In those cases the return is a triple (DATE INITIALS REST), where DATE may be NIL. ")
0 commit comments