(DEFINE-FILE-INFO READTABLE "XCL" PACKAGE "INTERLISP")
(FILECREATED "16-May-90 12:03:44" |{DSK}<usr>local>lde>lispcore>sources>ARGLIST.;2| 5353   

      |changes| |to:|  (VARS ARGLISTCOMS)

      |previous| |date:| " 3-Dec-86 22:19:56" |{DSK}<usr>local>lde>lispcore>sources>ARGLIST.;1|)


; Copyright (c) 1986, 1990 by Venue & Xerox Corporation.  All rights reserved.

(PRETTYCOMPRINT ARGLISTCOMS)

(RPAQQ ARGLISTCOMS ((FNS PRINT-ARGLIST)))
(DEFINEQ

(print-arglist
  (lambda (args actuals file left)                           (* \; "Edited 25-Nov-86 16:16 by lmm")
    (prog (type remargs)
          (or left (setq left 0))
          
          (* |;;| "Prints args to fn, mastching up with ACTUALS, if supplied.  Do this in a way that lets us keep track of where we are")

          (|if| (and args (nlistp args))
              |then| (setq args (list '&nrest args)))
          (cond
             (actuals (cond
                         ((cdr actuals)
                          (tab 0 0 file))
                         (t (prin1 " " file)))
                    (|bind| mode |while| actuals
                       |do| (cond
                               ((null args)
                                (tab 0 0 file)
                                (prin1 "...+" file))
                               ((nlistp args)
                                (tab 0 0 file)
                                (prin1 " . " file)
                                (prin2 args file)
                                (setq args))
                               (t (selectq (car args)
                                      ((&rest &body) 
                                           (tab 0 0 file)
                                           (prin2 (|pop| args)
                                                  file)
                                           (prin1 " " file)
                                           (prin2 (|pop| args)
                                                  file)
                                           (progn (tab 15 1 file)
                                                  (prin1 "= " file))
                                           (prin2 actuals file)
                                           (setq actuals)
                                           (terpri file)
                                           (return))
                                      (&rest (tab 0 0 file)
                                             (prin1 ". " file)
                                             (prin2 (|pop| args)
                                                    file)
                                             (progn (tab 15 1 file)
                                                    (prin1 "= " file))
                                             (prin2 actuals file)
                                             (setq actuals)
                                             (terpri file)
                                             (return))
                                      (&allow-other-keys 
                                           (spaces 1 file)
                                           (prin2 (|pop| args)
                                                  file)
                                           (terpri file)
                                           (go $$iterate))
                                      (&optional (prin2 (setq mode (|pop| args))
                                                        file)
                                                 (prin1 " " file)
                                                 (prin2 (|pop| args)
                                                        file))
                                      (&key (|while| args |do| (prin1 " " file)
                                                               (prin2 (|pop| args)
                                                                      file))
                                            (|while| actuals
                                               |do| (progn (tab 15 1 file)
                                                           (prin1 "= " file))
                                                    (prin2 (|pop| actuals)
                                                           file)
                                                    (prin1 " " file)
                                                    (prin2 (|pop| actuals)
                                                           file)
                                                    (terpri file))
                                            (return))
                                      (prin2 (|pop| args)
                                             file))))
                            (progn (tab 15 1 file)
                                   (prin1 "= " file))
                            (prin2 (car actuals)
                                   file)
                            (setq actuals (cdr actuals))
                            (terpri file))))
          (|while| args |do| (prin2 (|pop| args)
                                    file)
                             (and args (prin1 " " file))))))
)
(PUTPROPS ARGLIST COPYRIGHT ("Venue & Xerox Corporation" 1986 1990))
(DECLARE\: DONTCOPY
  (FILEMAP (NIL (454 5261 (PRINT-ARGLIST 464 . 5259)))))
STOP
