(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP")
(FILECREATED "20-Oct-88 11:10:07" {QV}<NOTECARDS>1.3LNEXT>RARPATCH045.;1 5644   

      changes to%:  (FNS NCP.ForgetNoteFileName NCP.RememberNoteFileName NC.NoticeNoteFileName 
                         NCP.OpenNoteFile NC.OpenNoteFile NC.ProcessNoteFileNotFoundError)
                    (VARS RARPATCH045COMS)

      previous date%: "20-Oct-88 10:56:34" {QV}<ROGERS>LISP>RARPATCH045.;1)


(* "
Copyright (c) 1988 by Xerox Corporation.  All rights reserved.
")

(PRETTYCOMPRINT RARPATCH045COMS)

(RPAQQ RARPATCH045COMS (
                        (* ;; "Allow Notefiles to be %"UnNoticable%".")

                        
                        (* ;; "New Function for  NCPROGINT")

                        (FNS NCP.ForgetNoteFileName NCP.RememberNoteFileName)
                        
                        (* ;; "Changed in NCDATABASE")

                        (FNS NC.NoticeNoteFileName)))



(* ;; "Allow Notefiles to be %"UnNoticable%".")




(* ;; "New Function for  NCPROGINT")

(DEFINEQ

(NCP.ForgetNoteFileName
  [LAMBDA (NoteFileOrFileName)                               (* ; "Edited 20-Oct-88 11:04 by RAR")

    (* ;; "Remove this notefile from the NoticedNoteFile list (menu).")

    (LET [(noteFileObj (if (type? NoteFile NoteFileOrFileName)
                           then NoteFileOrFileName
                         else (NC.NoteFileFromFileName FullFileName]
         (if noteFileObj
             then (NC.RemoveNoteFileName NoteFileOrFileName)
                  (NCP.NoteFileProp noteFileObj 'UnNoticable T])

(NCP.RememberNoteFileName
  [LAMBDA (NoteFileOrFileName)                               (* ; "Edited 20-Oct-88 11:04 by RAR")

    (* ;; "Add this notefile to the NoticedNoteFile list (menu).")

    (LET [(noteFileObj (if (type? NoteFile NoteFileOrFileName)
                           then NoteFileOrFileName
                         else (NC.NoteFileFromFileName FullFileName]
         (if noteFileObj
             then (NCP.NoteFileProp noteFileObj 'UnNoticable NIL)
                  (NC.NoticeNoteFileName NoteFileOrFileName])
)



(* ;; "Changed in NCDATABASE")

(DEFINEQ

(NC.NoticeNoteFileName
  [LAMBDA (NoteFileOrFileName)                               (* ; "Edited 20-Oct-88 10:57 by RAR")

         (* * pmi 5/14/87%: Created to keep track of noticed NoteFiles)

         (* * pmi 5/21/87%: Now creates a menu item bitmap for this notefile.)

         (* * pmi 8/13/87%: Overhauled stuff for menu of noticed notefiles.)

         (* * pmi 12/18/87%: Changed the global var NC.NoticedNoteFileNames to 
         NCP.NoticedNoteFileNames to make it available in the programmer's interface.)

    (* ;; "rar.  10/20/88 Added check to see if Notefile is marked as %"UnNoticable%" and shouldn't appear in the menu.")

    (DECLARE (GLOBALVARS NCP.NoticedNoteFileNames NC.NoticedNoteFilesMenu))
    (LET (FullFileName NoteFile)
         (if (type? NoteFile NoteFileOrFileName)
             then (SETQ FullFileName (fetch (NoteFile FullFileName) of NoteFileOrFileName))
                  (SETQ NoteFile NoteFileOrFileName)
           else (SETQ FullFileName (FULLNAME NoteFileOrFileName))
                (SETQ NoteFile (NC.NoteFileFromFileName FullFileName)))

         (* * If the filename is a valid file, add it to the list of noticed files.
         If the filename is not a valid file, remove it from the list of noticed files.
         If the resulting list is empty, set it to NIL
         (DREMOVE can't set a list to NIL))

         (if FullFileName
             then 
                  (* ;; 
                  "If the notefile has not been marked as %"UnNoticable%", then add it to the menu")

                  (if (NOT (NCP.NoteFileProp NoteFile 'UnNoticable))
                      then (if NCP.NoticedNoteFileNames
                               then (MERGEINSERT FullFileName NCP.NoticedNoteFileNames T)
                             else (SETQ NCP.NoticedNoteFileNames (MERGEINSERT FullFileName 
                                                                        NCP.NoticedNoteFileNames T)))
                           (SELECTQ (GETPROP FullFileName 'LastKnownStatus)
                               (OPEN (if (NULL (NC.NoteFileOpenP NoteFile))
                                         then (PUTPROP FullFileName 'LastKnownStatus 'CLOSED)
                                              (SETQ NC.NoticedNoteFilesMenu NIL)))
                               (CLOSED (if (NC.NoteFileOpenP NoteFile)
                                           then (PUTPROP FullFileName 'LastKnownStatus 'OPEN)
                                                (SETQ NC.NoticedNoteFilesMenu NIL)))
                               (PROGN (if (NC.NoteFileOpenP NoteFile)
                                          then (PUTPROP FullFileName 'LastKnownStatus 'OPEN)
                                        else (PUTPROP FullFileName 'LastKnownStatus 'CLOSED))
                                      (SETQ NC.NoticedNoteFilesMenu NIL))) 

         (* * Constuct menu items for this notefile.)

                           (NC.CreateNoteFileMenuItems FullFileName))
           else (if (DREMOVE NoteFileOrFileName NCP.NoticedNoteFileNames)
                  else (SETQ NCP.NoticedNoteFileNames NIL])
)
(PUTPROPS RARPATCH045 COPYRIGHT ("Xerox Corporation" 1988))
(DECLARE%: DONTCOPY
  (FILEMAP (NIL (1081 2238 (NCP.ForgetNoteFileName 1091 . 1661) (NCP.RememberNoteFileName 1663 . 2236)) 
(2278 5561 (NC.NoticeNoteFileName 2288 . 5559)))))
STOP