Perhaps I'm confused but you don't defun a reactor. You defun a reactor callback. For vlr-editor reactors, callback functions should be defined with 2 arguments (the reactor itself that is calling the function and information that relates to the reactor. The best way to learn about what information is passed to callback function monitoring a specific event is to use vlr-trace reactions. For example:
(vlr-editor-reactor nil '((:vlr-commandended . vlr-trace-reaction)))
Using that as context and looking at vlide's trace window after the line command ends, you would see a display like
; Reaction: :VLR-commandEnded; argument list: (#<VLR-Editor-Reactor> ("LINE"))
To get to your specific question each reactor can store any information you want to work with in it DATA argument.
For a callback function to get that data, it should use vlr-data. To store data, it should use VLR-Data-Set
For example, given the above and using a callback defined as
(defun cmdendcback (R L)
(setq myinfo (vlr-data R)) ;to get information from reactor data.
(vlr-data-set R L);to save the last command ended list.
)
The only global I save is the return value from the construction of the reactor.
(IF (NULL myeditorreactor)
(SETQ myeditorreactor (VLR-EDITOR-REACTOR '("just starting")
'((:VLR-COMMANDENDED . cmdendcback )))))
Architect, Registered NC, VA, SC, & GA.