(FILECREATED "12-Jun-86 15:06:05" {QV}<NOTECARDS>1.3K>RHTPATCH049.;1 2910   

      changes to:  (VARS RHTPATCH049COMS))


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

(PRETTYCOMPRINT RHTPATCH049COMS)

(RPAQQ RHTPATCH049COMS ((* * Change to NCPROGINT)
			  (FNS NCP.NoteCardsParameters)))
(* * Change to NCPROGINT)

(DEFINEQ

(NCP.NoteCardsParameters
  (LAMBDA (NewParams)                                        (* rht: "12-Jun-86 15:04")

          (* * Returns the old value of the Notecards parameters. If NewParams is non-nil then it should be a prop list which
	  will be used to change some or all of the current Notecards parameters. Only those props whose names are valid 
	  Notecards parameters and whose values are permissible values for that name are used. On NC.NoteCardsParameters's 
	  prop list under the parameter name is a list of one or two items. The first is the name of the global var.
	  The second if present, is a function of no args which returns a list of legal values for that parameter.
	  We only do type checking if that function is present.)



          (* * rht 3/20/85: Changed to use new GLOBALPARAMETER record, especially the CheckFn field.)



          (* * rht 6/12/86: Now checks first whether there's a PARAMCHECKFN before apply*'ing it.)


    (PROG (OldParams PropVal ParamCheckFn)
	    (SETQ OldParams (for Param in NC.NoteCardsParameters
				 join (SETQ PropVal (GETPROP (QUOTE NC.NoteCardsParameters)
								   Param))
					(LIST Param (EVAL (COND
								((LISTP PropVal)
								  (fetch (GLOBALPARAMETER 
										   PARAMGLOBALVAR)
								     of PropVal))
								(T PropVal))))))
	    (COND
	      (NewParams (for Params on NewParams by (CDDR NewParams)
			    bind Param NewValue GlobalVar PropVal
			    do (COND
				   ((FMEMB (SETQ Param (CAR Params))
					     NC.NoteCardsParameters)
				     (SETQ NewValue (CADR Params))
				     (SETQ PropVal (GETPROP (QUOTE NC.NoteCardsParameters)
								Param))
				     (SETQ GlobalVar (COND
					 ((LISTP PropVal)
					   (fetch (GLOBALPARAMETER PARAMGLOBALVAR) of PropVal))
					 (T PropVal)))
				     (COND
				       ((OR (ATOM PropVal)
					      (NULL (SETQ ParamCheckFn (fetch (GLOBALPARAMETER
										      PARAMCHECKFN)
									      of PropVal)))
					      (APPLY* ParamCheckFn NewValue))
					 (SET GlobalVar NewValue))
				       (T (NCP.ReportError NewValue 
							     " is not a permissible value for "
							     Param "."))))
				   (T (NCP.ReportError Param " not a Notecards parameter name.")))))
	      )
	    (RETURN OldParams))))
)
(PUTPROPS RHTPATCH049 COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (353 2828 (NCP.NoteCardsParameters 363 . 2826)))))
STOP