home *** CD-ROM | disk | FTP | other *** search
- ; bakquote.l - backquote macro definition
- ; copyright (c) 1985, 1986 by David Morein.
- ;
- ; revision history:
- ; rewritten by D. Morein 4/1/86 to cure depth related problems.
- ; modified by Art Goldhammer 2/13/86 to work at lower levels in a list.
- ; created by D. Morein 11/28/84
- ;
- ; note - this is an initialization file, see the manual for more info.
- ;
- ; set up system hooks:
- ;
- (status /sys/const/back_quote_hook '_backquote)
- (status /sys/const/comma_hook '_comma)
- (status /sys/const/comma_at_hook '_comma-at)
- ;
- (def _backquote (nlambda (s)
- (backquote1 s)))
- ;
- (def _backquote1 (lambda (e)
- (cond ((or (atom e) (null e)) e)
- ((and (consp (car e)) (eq (caar e) 'comma))
- (cons
- (eval (cadar e))
- (_backquote1 (cdr e))))
- ((and (consp (car e)) (eq (caar e) 'comma-at))
- (append (eval (cadar e)) (_backquote1 (cdr e))))
- (t (cons
- (_backquote1 (car e))
- (_backquote1 (cdr e)))))))
- ;