(FILECREATED " 6-Nov-86 16:46:16" {QV}<NOTECARDS>1.3K>NEXT>RHTPATCH138.;1 2451   

      changes to:  (VARS RHTPATCH138COMS)
		   (FNS NCP.DocumentParameters))


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

(PRETTYCOMPRINT RHTPATCH138COMS)

(RPAQQ RHTPATCH138COMS ((* * fix for document parameters weirdness reported by Tad.)
			  (* * Change to NCPROGINT)
			  (FNS NCP.DocumentParameters)))
(* * fix for document parameters weirdness reported by Tad.)

(* * Change to NCPROGINT)

(DEFINEQ

(NCP.DocumentParameters
  (LAMBDA (NewProps)                                         (* rht: " 6-Nov-86 16:46")

          (* * Returns the old value of the MakeDocument default parameters. If NewProps is non-nil then it should be a prop 
	  list which will be used to change some or all of the current MakeDocument parameters. Only those props whose names 
	  are valid MakeDocument parameters and whose values are permissible values for that name are used.)



          (* * rht 11/6/86: No longer checks for valid link label since that requires a notefile. Also returns just a 
	  proplist of the params that user can change.)


    (DECLARE (GLOBALVARS NC.MakeDocParameters))
    (LET ((OldParams (for ParamThing in NC.MakeDocParameters unless (EQ (CAR ParamThing)
										(QUOTE --DONE--))
			join (LIST (CAR ParamThing)
				       (GETPROP (QUOTE NC.MakeDocParameters)
						  (CAR ParamThing))))))
         (if NewProps
	     then (for Params on NewProps by (CDDR NewProps) bind Param NewValue 
									      LegalValues
		       do (SETQ Param (CAR Params))
			    (COND
			      ((NULL (SETQ LegalValues (CDR (FASSOC Param 
									    NC.MakeDocParameters))))
				(NCP.ReportError Param " not a document parameter name."))
			      ((OR (AND (FMEMB (SETQ NewValue (CADR Params))
						     LegalValues)
					    (NEQ NewValue (QUOTE Select)))
				     (AND (LISTP NewValue)
					    (FMEMB (QUOTE Select)
						     LegalValues)))
				(PUTPROP (QUOTE NC.MakeDocParameters)
					   Param NewValue))
			      (T (NCP.ReportError NewValue " is not a permissible value for " Param 
						    ".")))))
     OldParams)))
)
(PUTPROPS RHTPATCH138 COPYRIGHT ("Xerox Corporation" 1986))
(DECLARE: DONTCOPY
  (FILEMAP (NIL (524 2369 (NCP.DocumentParameters 534 . 2367)))))
STOP