(DEFINE-FILE-INFO PACKAGE "INTERLISP" READTABLE "INTERLISP")
(FILECREATED "17-Aug-88 14:18:35" {QV}<IDE>1.4>RARPATCH026.;1 4212   

      changes to%:  (VARS RARPATCH026COMS)
                    (FNS NCP.AddEditParameter)

      previous date%: "16-Aug-88 16:44:53" {QV}<ROGERS>LISP>RARPATCH026.;1)


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

(PRETTYCOMPRINT RARPATCH026COMS)

(RPAQQ RARPATCH026COMS ((* * Patch of patch RARPATCH024. These should go into NCPROGINIT or 
                           NCNEWHACKS)
                        (FNS NCP.AddEditParameter NCP.RemoveEditParameters)))
(* * Patch of patch RARPATCH024. These should go into NCPROGINIT or NCNEWHACKS)

(DEFINEQ

(NCP.AddEditParameter
  [LAMBDA (paramterName variableName initialValue position fetchFN selectFN checkFN afterFN)
                                                             (* ; "Edited 16-Aug-88 15:57 by RAR")

         (* * Adds the parameter name to the list of editable NC paramters.
         If any of the special fns are present, create the appropriate record)

         (* * rar. |8/16/88| Don't add param if it already exisits)

    (DECLARE (GLOBALVARS NC.NoteCardsParameters))
    (LET (insertionPos)
         (if (NOT (FMEMB paramterName NC.NoteCardsParameters))
             then (SET variableName initialValue) 

         (* The position can be a numeric position in the list or a parameter name which 
         the new paramter should be placed after.)

                  [if (AND (NUMBERP position)
                           (IGREATERP position 1))
                      then [RPLACD [NTH NC.NoteCardsParameters (SETQ insertionPos (MIN (LENGTH 
                                                                               NC.NoteCardsParameters
                                                                                              )
                                                                                       (SUB1 position
                                                                                             ]
                                  (CONS paramterName (NTH NC.NoteCardsParameters (ADD1 insertionPos]
                    else (if (FMEMB position NC.NoteCardsParameters)
                             then [RPLACD (FMEMB position NC.NoteCardsParameters)
                                         (CONS paramterName (CDR (FMEMB position 
                                                                        NC.NoteCardsParameters]
                           else                              (* Just add it to the front of the 
                                                             list)
                                (SETQ NC.NoteCardsParameters (CONS paramterName 
                                                                   NC.NoteCardsParameters]
                  (if (OR fetchFN selectFN checkFN afterFN)
                      then (PUTPROP 'NC.NoteCardsParameters paramterName
                                  (create GLOBALPARAMETER
                                         PARAMGLOBALVAR ← variableName
                                         PARAMFETCHFN ← fetchFN
                                         PARAMSELECTIONFN ← selectFN
                                         PARAMCHECKFN ← checkFN
                                         PARAMAFTERCHANGEFN ← afterFN))
                    else 

         (* If there are no special fns, just put the value which should be T or NIL)

                         (PUTPROP 'NC.NoteCardsParameters paramterName variableName])

(NCP.RemoveEditParameters
  [LAMBDA (paramterNames)                                    (* ; "Edited 10-Aug-88 09:46 by RAR")

         (* * Removes paramterNames from the list of editable paramters)

    (DECLARE (GLOBALVARS NC.NoteCardsParameters))
    (for param in (MKLIST paramterNames) do (REMPROP 'NC.NoteCardsParameters param)
                                            (DREMOVE param NC.NoteCardsParameters])
)
(PUTPROPS RARPATCH026 COPYRIGHT ("Xerox Corporation" 1988))
(DECLARE%: DONTCOPY
  (FILEMAP (NIL (715 4129 (NCP.AddEditParameter 725 . 3676) (NCP.RemoveEditParameters 3678 . 4127)))))
STOP