Whenever I write a hyphenated word inside \mathit or \mathbf or whatever ...
\mathit{long-variable-name}
... I always intend for the hyphens to be hyphens, not minus signs. There is a webpage giving several workarounds for this (http://www.logic.at/staff/salzer/etc/mhyphen/), but I would like a proper solution where I don't have to write monstrosities like
\mathit{long\mhyphen{}variable\myhyphen{}name}
My vision is to redefine the \mathit command (and its cousins) so that when - appears in its argument, it is automatically replaced with whatever command is necessary to produce a hyphen.
Is this possible?
Might doing so cause problems? I mean, do people ever put a whole formula inside
\mathit? ('Cause then you would want the-to produce a minus.)

\textit. BTW: long function names should be typeset upright not italic. – daleif Aug 15 '14 at 15:06{rm,it,tt,sf,sl,bf}x{math/nonmath}is just too many fonts to have in one document. (And I'm never sure whether to write $42$ or just 42; if it's the same font then I don't have to worry!) – John Wickerson Aug 15 '14 at 15:31