comparison lisp/emacs-lisp/backquote.el @ 1234:9ca8c55f9ae5

Dox Fix
author Christopher Zaborsky <rogue@erratum.com>
date Sun, 27 Sep 1992 17:30:03 +0000
parents 213978acbc1e
children ab73b8d8243c
comparison
equal deleted inserted replaced
1233:e795fe80b14e 1234:9ca8c55f9ae5
147 ;;; if I'm in some sort of a routine building a maker and I switch 147 ;;; if I'm in some sort of a routine building a maker and I switch
148 ;;; gears, it seemed to me easier to jump into some other state and 148 ;;; gears, it seemed to me easier to jump into some other state and
149 ;;; glue what I've already done to the end, than to to prepare that 149 ;;; glue what I've already done to the end, than to to prepare that
150 ;;; something and go back to put things together. 150 ;;; something and go back to put things together.
151 (defun bq-make-maker (form) 151 (defun bq-make-maker (form)
152 "Given one argument, a `mostly quoted' object, produces a maker. 152 "Given argument FORM, a `mostly quoted' object, produces a maker.
153 See backquote.el for details" 153 See backquote.el for details"
154 (let ((tailmaker (quote nil)) (qc 0) (ec 0) (state nil)) 154 (let ((tailmaker (quote nil)) (qc 0) (ec 0) (state nil))
155 (mapcar 'bq-iterative-list-builder (reverse form)) 155 (mapcar 'bq-iterative-list-builder (reverse form))
156 (and state 156 (and state
157 (cond ((eq state 'quote) 157 (cond ((eq state 'quote)
193 ;;; use five possible values of state (although someday I'll add 193 ;;; use five possible values of state (although someday I'll add
194 ;;; nconcto the possible values of state). 194 ;;; nconcto the possible values of state).
195 ;;; This maintains the invariant that (cons state tailmaker) is the 195 ;;; This maintains the invariant that (cons state tailmaker) is the
196 ;;; maker for the elements of the tail we've eaten so far. 196 ;;; maker for the elements of the tail we've eaten so far.
197 (defun bq-iterative-list-builder (form) 197 (defun bq-iterative-list-builder (form)
198 "Called by `bq-make-maker'. Adds a new item form to tailmaker, 198 "Adds a new item form to tailmaker changing state if need be, so tailmaker
199 changing state if need be, so tailmaker and state constitute a recipe 199 and state constitute a recipe for making the list so far. Called by
200 for making the list so far." 200 `bq-make-maker'."
201 (cond ((atom form) 201 (cond ((atom form)
202 (funcall (bq-cadr (assq state bq-quotefns)) form)) 202 (funcall (bq-cadr (assq state bq-quotefns)) form))
203 ((memq (car form) backquote-unquote) 203 ((memq (car form) backquote-unquote)
204 (funcall (bq-cadr (assq state bq-evalfns)) (bq-cadr form))) 204 (funcall (bq-cadr (assq state bq-evalfns)) (bq-cadr form)))
205 ((memq (car form) backquote-splice) 205 ((memq (car form) backquote-splice)