I'm using a class classX that accepts class option optionX. Thus, I can write:
\documentclass[optionX]{classX} ...
Now, as I understand it, being a class option, after classX processes this option, optionX is globally defined. All well and good, except that subsequently, for packageY that also accepts optionX (same option name, however semantically unrelated), the two lines
\usepackage{packageY}\usepackage[optionX]{packageY}
both (erroneously) produce the same effect. All would be well if I could undefine optionX before executing \usepackage{packageY}. (At this point I should also note that, lest anyone be worried about how this might affect classX's subsequent performance, there's no need for the slightest concern -- classX has no need of this option remaining defined after executing its class \ProcessOptions).
So, to the heart of my question, would anyone with better TeX\LaTeX knowledge than I, have any idea how to go? FYI, I've tried several of the usual suspects: \let\optionX\@undefined along with several clueless stabs at \let\<prefix>@optionX\@undefined after scouring source2e.pdf.
(JW: sadly I don't think I can hold back for LaTeX3's promised encapsulated namespaces solution. sigh.)
classXhas no need of this option,packageZmight need to know thatclassXwas used with that option. So even when an answer is forthcoming, use with caution! – Andrew Stacey Aug 10 '10 at 15:15