Google
 

Trailing-Edge - PDP-10 Archives - -
There are no other files named in the archive.
(FILECREATED "26-JUL-78 20:49:25" <LISPUSERS>LISPUSERSHELP.;14 3815   


     changes to:  LISPUSERSHELP

     previous date: "10-JUL-78 16:05:59" <LISPUSERS>LISPUSERSHELP.;13
)


(PRETTYCOMPRINT LISPUSERSHELPCOMS)

(RPAQQ LISPUSERSHELPCOMS ((FNS LISPUSERSHELP DO?)
			  (VARS ?CHARS)
			  (P (LOAD? (QUOTE <LISPUSERS>WHOIS.COM)
				    LDFLG))
			  (LOCALVARS . T)))
(DEFINEQ

(LISPUSERSHELP
  (LAMBDA (X)                           (* lmm "26-JUL-78 20:37")
    (PROG (VAL DOC)
          (MAPC (WHEREIS X (QUOTE FNS)
			 T)
		(FUNCTION (LAMBDA (FL)
		    (AND (SETQ DOC (INFILEP (PACK* "<LISPUSERS>" FL 
						   ".TTY")))
			 (SETQ VAL (OR (WHOIS X DOC)
				       VAL))))))
          (RETURN VAL))))

(DO?
  (LAMBDA (FILE RDTBL LST)              (* lmm " 7-APR-78 01:24")
    (PROG (C TAIL FORM FN TEM LN)
          (SETQ C (PEEKC FILE))
          (COND
	    ((NULL (AND (EQ FILE T)
			(FMEMB C ?CHARS)
			(SETQ TAIL
			  (COND
			    ((AND (READLINEP)
				  (SETQ LN LINE)
				  LISPXFLG
				  (OR (EQ (INREADMACROP)
					  1)
				      (NOT (CAR LST))))

          (* Says you are arguments to a functio in apply format, and 
	  either at top level (the inreadmacrop) or one level down but 
	  havent typed a functionname, e.g. typing FOO 
	  (A B (? -
	  would tell you about FOO)))


			      (SETQ FORM (CONS (SETQ FN (CAR LINE))
					       (CAR LST)))
                                        (* For ?= purposes.)
			      LINE)
			    (T (SETQ FORM (CAR LST)))))))
                                        (* False alarm.)
	      (RETURN (TCONC LST
			     (COND
			       ((OR (SYNTAXP (SETQ C (CHCON1 C))
					     (QUOTE SEPR)
					     RDTBL)
				    (SYNTAXP C (QUOTE BREAK)
					     RDTBL))
                                        (* would have been separated 
					anyway.)
				 (QUOTE ?))
			       (T (PACK (LIST (QUOTE ?)
					      (READ FILE RDTBL))))))))
	    ((EQ C (QUOTE %
))
	      (AND
		(XNLSETQ
		  (SETQ TEM
		    (COND
		      ((AND (NEQ LAST? (SETQ LAST? (CAR TAIL)))
			    LST
			    (CDR FORM)
			    (FNCHECK (CAR FORM)
				     T NIL T TAIL))

          (* User typed ? after supplying some arguments, so only give 
	  him info about that argument.)


			(HELPSYS (LENGTH FORM)
				 (QUOTE ARGS)
				 (CAR FORM)
				 (QUOTE FD)))
		      (T (OR (HELPSYS (CAR TAIL)
				      (AND (FNTYP (CAR TAIL))
					   (QUOTE FD)))
			     (LISPUSERSHELP (CAR TAIL))))))
		  NOBREAK)
		(NULL TEM)
		(PRIN1 (QUOTE "unavailable subject.
")
		       T)))
	    ((AND (EQ (SETQ TEM (READ FILE RDTBL))
		      (QUOTE =))
		  (EQ (PEEKC FILE)
		      (QUOTE %
)))
	      (ERSETQ (PROGN (DO?= TAIL FORM)
			     (TERPRI FILE))))
	    ((AND (EQ (NTHCHAR TEM 1)
		      (QUOTE ^))
		  (EQ (PEEKC FILE)
		      (QUOTE %
)))
	      (ERSETQ (APPLY* (FUNCTION PF)
			      (CAR FORM)
			      (AND (IGREATERP (NCHARS TEM)
					      1)
				   (MKATOM (SUBSTRING TEM 2 -1))))))
	    (T (RETURN (TCONC LST (PACK (LIST (QUOTE ?)
					      TEM))))))
          (AND (CDDR LST)
	       (FRPLACD LST (FLAST LST)))
                                        (* remove the ?)
          (TERPRI T)
          (AND FN (PRIN2 FN T T))
          (AND LN (MAPRINT (CDR LN)
			   T " " " " NIL (FUNCTION (LAMBDA (X)
			       (PRIN2 X T T)))))
          (AND LST (MAPRINT (CAR LST)
			    T "(" " " NIL (FUNCTION (LAMBDA (X)
				(PRIN2 X T T)))))
                                        (* tell the user where he is)
          (RETURN LST))))
)

(RPAQQ ?CHARS (%
 = ^))
(LOAD? (QUOTE <LISPUSERS>WHOIS.COM)
       LDFLG)
(DECLARE: DOEVAL@COMPILE DONTCOPY

(LOCALVARS . T)
)
(DECLARE: DONTCOPY
  (FILEMAP (NIL (392 3650 (LISPUSERSHELP 404 . 746) (DO? 750 . 3647)))))
STOP