undefine BIND

Sorry. I don't. Eliminating the bind option is definitely something I wouldn't implement for myself.

Look at the :VLR-xrefSubcommandBindItem event and
coordinate that with :vlr-command-ended event and/or
other events to undo the actions of the previous command /subcommand. From the help files concerning the event above:
"The BIND subcommand of XREF was invoked, or a pre-existing xref is being bound. Note that the BIND subcommand is interactive and triggers multiple events."

In general, a reactor can not be used to interrupt a command in progress.

Though it may be difficult/impossible to cancel/undo the effects of the bind subcommand, it would be easy to undo the entire effects of the xref command that included a bind operation.. I wouldn't, however, want to be the drafter dominated in such a fashion though.

A polite alert reminder would be the method of choice for me. Something informative and polite but firm might help. Something like. "Continue this bind operation and I forsee pink slips in your future. >:-("

Does that help? ;-)

..
 
Something like:

(vlr-remove-all)
(setq nobindreact (vlr-xref-reactor nil '((:vlr-xrefsubcommandbinditem . dontbindme)))) (setq nobindcmdr (vlr-command-reactor nil '((:vlr-commandended . nobindcmd))))

(defun dontbindme (r l)
(vlr-add nobindcmdr)
(vlr-remove nobindreact)
(alert "Please undo this operation when it finishes"))

(defun nobindcmd (r l)
(vlr-add nobindreact)
(vlr-remove nobindcmdr)
(alert "Execute the undo code")
)

(vlr-remove nobindcmdr)
 

Latest threads

Back
Top