[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Need some help with converting to the Rel7 command processor
I have the following code in the rel6 version of my system. It defines a new
argument type for commands that's similar to :enumeration but determines the
set of choices "at run time".
1;;; A modified version.
0 1;;; An element type.
0 1;;; Similar to enumeration, but the possibilites are computed at parse time,
0 1;;; not at compile time.
0 1;;;
0 1;;; The info supplied to the type specification is a symbol,
0 1;;; which at parse time should be bound to an alist of (string . value)
0 1;;; from which a completed choice will be made.
0 (eval-when (eval compile load)
(si:define-cp-type :element-of
(:parser () (parse-element-of-choice arg si:info))
(:unparser () (car (rassq element-of (eval si:info))))
(:completer () (parse-element-of-choice si:*cp-token* si:info t))
(:partial-complete-p () t)
(:prompt () (with-output-to-string (s)
(si:print-english-list s "~A" (mapcar #'car (eval si:info)))))
(:help () (si:cp-possibilities-help si:stream arg (mapcar #'car (eval si:info))))
(:info-maker () (car si:raw-info)))
(defun 2PARSE-ELEMENT-OF-CHOICE0 (arg info &optional modify)
(si:parse-enumeration-choice
arg
(si:form-completion-table (eval info) nil '(#/-))
modify))
)
My problem is that the command processor has been changed a lot. I can't
figure out which, if any, of the functions in CP: corresponded to the old
SI:DEFINE-CP-TYPE. I've looked through the release notes and documentation
and don't see either mention of the change (I'm not sure this function was
previously documented) nor how to accomplish the same functionality in Genera.
Does anybody have any suggestions?
Thanks,
Mark Shirley