; LWE 1/18/81 Hack hack hack.
(declare (special $cur$ dc-switch piport %indent dc-switch
vars body form var init label part incr limit
getdeftable $outport$ tlmacros f tmp))
(dv *digits ("0" "1" "2" "3" "4" "5" "6" "7" "8" "9"))
(dv *letters (a b c d e f g h i j k l m n o p q r s t u v w x y z))
(princ (get f 'changes)))))
(%changes (terpri) (princ '<no-file>) (tab 15) (princ %changes)))
(cond ((null %changes) nil)
(setq prop (get f 'changes))
(setq prop (insert fn prop nil t)))
(putprop f prop 'changes))
(setq found (apply 'append found))
(setq %changes (set-of fn %changes (not (memq fn found)))))))))
(eval (cons dc-switch args]
(msg "Enter comment followed by <esc>" (N 1))
(eval (cons 'dc-dskin args]
((eval (cons 'helpfilter (cons (car args) (caddr args))))
(transprint getdefchan)))))
(setq dc-switch 'dc-dskin)
(setq dc-switch 'dc-define)
The new version of dskout (7/26/80) tries to keep backup versions It returns
the setof its arguments that were successfully written If it can not write
a file (typically because of protection restrictions) it offers to (try to)
write a copy to /tmp A file written to /tmp is not considered to have been
successfully written (and changes will not consider it to be up-to-date) )
(cond ((atom (errset (setq p (infile f)) nil))
(msg "creating " (eval 'f) (N 1)))
(msg "old version moved to "
(cond ((not (ttyesno)) (return nil)))))))
(errset (apply (function pp)
" - try to put it on /tmp? (y/n) ")
(setq f (cdr (memq '/ f))))
(cons ffns (eval ffns))))))
" - I give up! " (N 1) ))
(t (msg (eval 'f) " written " (N 1) )))))
(apply (function dskout) (set-of f filelst (get f 'changes)))))
((lambda (%indent) (setq val (eval (car exp)))) (+ 2 %indent))
(setq filelst (insert name filelst nil t))
((not (boundp (concat name 'fns)))
(set (concat name 'fns) nil)))
(prog (x u getdefchan found)
(setq getdefchan (infile (car %%l)))
((eq (tyipeek getdefchan) -1)
((memq (tyipeek getdefchan)
((memq (tyipeek getdefchan)
(setq y (ratom getdefchan)))
(cond (t (comment - what about
(or (setq z (ratom getdefchan))
(apply (cdr (assoc (car x) getdeftable)) (ncons x))))))
(cond ((not (eq (tyi getdefchan) 10)) (zap getdefchan)))
(cond ((or (null getdefprops) (memq p getdefprops))
(dv getdefprops (function value expr fexpr macro))
((defprop lambda (x) (getdefact (cadr x) (cadddr x) x))
((or (null getdefprops) (memq 'comment getdefprops))
(de lambda (x) (getdefact (cadr x) 'expr x))
(df lambda (x) (getdefact (cadr x) 'fexpr x))
(dm lambda (x) (getdefact (cadr x) 'macro x))
(setq lambda (x) (getdefact (cadr x) 'value x))
(dv lambda (x) (getdefact (cadr x) 'value x))
(def lambda (x) (getdefact (cadr x) 'function x))))
; LWE 1/11/81 I am flushing this in favor of a help system everybody
; can use -- the manual printer. From now on, additions to the system
; everybody uses should be made at a sufficiently sedate pace that they
; can be documented by additions to the manual. This is necessary for
; a system to be used by large numbers of people.
; ((lambda (getdefprops dc-switch)
; (cond ((null l) (setq l (ncons 'overview))))
; (setq lasthelp '(@ . 84))
; (for-each i lets (setq files (insert i files nil t)))
; (setq def-comment 'dc-help)
; (concat '/usr/lisp/help/
; ((not (boundp 'lasthelp)) (setq lasthelp (cons '@ 65))))
; (cond ((or (memq 'see l) (memq 'under l))
; (cond ((memq 'under l) '"for explanation of ")
; ((memq 'see l) '"for information related to ")))
; ((neq (car l) (car lasthelp)) (setq lasthelp (cons (car l) 84))))
; (princ '" is obsolete. for replacement see ")
; ((neq (car l) (car lasthelp)) (setq lasthelp (cons (car l) 84))))
; (setq ans (apply (function append) (read getdefchan)))
; (cond ((null ans) (return nil)))
; ((neq lasthelp (car l)) (print (car l)) (princ '": ")))
; (princ '" pointed to by these other helps: ")
; ((neq (car l) (car lasthelp)) (setq lasthelp (cons (car l) 84))))
; ((and (eq (car l) (car lasthelp))
; (memq (cdr lasthelp) '(65 97)))
; ((and (eq (car l) (car lasthelp))
; (memq (cdr lasthelp) '(70 102)))
; ((or (memq 'standard l)
; (memq 'top-level-command l)
; (memq 'break-command l)
; (eq (car lasthelp) (car l)))
; (princ '"display? (all, type, skip, flush) ")
; ((dtpr (setq char (errset (tyi)))) (setq char (car char))))
; ((not (memq char '(65 97 84 116 83 115 70 102)))
; '"type a to see the rest of the help for this word,
; t to see this message and decide again for the next one,
; s to skip this message and decide again for the next one or
; f to skip the rest of the messages for this word.")
; (setq lasthelp (cons (car l) char))
; (return (memq char '(65 97 84 116))))
; (memq (cdr lasthelp) '(65 97 84 116)))
; (setq lasthelp (cons (car l) 84))
(cond ((matchq1 (setq xx (explode x)) (setq yy (explode y)))
(t (*** freelist xx) (*** freelist yy)))))))))
l1 (cond ((eq x y) (return t))
((or (equal y '(@)) (equal x '(@))) (return t))
((or (null x) (null y)) (return nil))
(cond ((cddr ev) (terpri) (tlprint (caddr ev)))))))
(rplacd (cdar history) (ncons val))
(cond ((null x) (car history))
((and (fixp x) (plusp x)) (assoc x history))
((and (fixp x) (minusp x)) (car (Cnth history (minus x)))))))
(cond ((setq exp (copy (cadr (tlgetevent (cadr x)))))
(t (princ '"No such event")))))
(cond ((setq exp (tlgetevent (cadr x)))
(return (ncons (cadr exp))))
(t (princ '"No such event")))))
(cond ((null (cdr x)) (showevents (reverse history)))
((null (setq e1 (tlgetevent (cadr x))))
(princ '"No such event as ")
((null (cddr x)) (showevents (ncons e1)))
((null (setq e2 (tlgetevent (caddr x))))
(princ '"No such event as ")
(t (setq e1 (memq e1 history))
(cond ((setq rest (memq e2 e1))
(cons e2 (reverse (ldiff e1 rest)))))
(ldiff (memq e2 history) e1))))))))))))
l (cond ((null x) (return (reverse ans)))
(setq ans (cons (cadr x) ans))
(t (setq ans (cons (kwote (car x)) ans)) (setq x (cdr x))))
top (cond ((not (boundp 'history)) (setq history nil)))
(princ (add1 (cond (history (caar history)) (t 0))))
((null (setq tlbuffer (lineread)))
(cond ((not (atom (setq cmd (car tlbuffer))))
(setq tlbuffer (cdr tlbuffer))
((setq cmd (assoc cmd tlmacros))
(setq cmd (apply (cdr cmd) (ncons tmp)))
(cond ((atom cmd) (go top))
(t (setq cmd (car cmd)) (go record))))
((and (null (cdr tlbuffer))
(or (numberp (car tlbuffer))
(boundp (car tlbuffer))))
(setq cmd (car tlbuffer))
((or (and (dtpr (getd (car tlbuffer)))
(memq (car (getd (car tlbuffer)))
(and (bcdp (getd (car tlbuffer)))
(eq (getdisc (getd (car tlbuffer)))
(setq cmd (cons (car tlbuffer) (tlquote (cdr tlbuffer))))
(cons (list (add1 (cond (history (caar history)) (t 0))) cmd)
((dtpr (cdr (setq tmp (Cnth history historylength))))
l (tlprint (tleval (tlread)))
; LWE 1/11/81 The following might make this sucker work after resets:
(setq user-top-level 'cmu-top-level)
(putd 'user-top-level (getd 'cmu-top-level))
(setq top-level 'cmu-top-level)
(putd 'top-level (getd 'cmu-top-level))
l (cond ((memq (tyipeek prt) '(27 -1)) (return nil))
(t (tyo (tyi prt)) (go l))))))
l (cond ((memq (tyi prt) '(10 -1)) (return nil)) (t (go l))))))