How to patch a package

I have a document that uses symbols both from the marvosym package as well as the eurosym package. There are two commands that clash and I get an error message (due to \newcommand being used and leading to the error Command \EUR already defined.).

What is the appropriate way to patch a package? What I have done - in the meantime - was to modify the marvosym.sty file and to place it in the document directory.

-
Surely, you don't mean to tell us that one of the packages tries to redefine \newcommand, do you? Anyhow, I can load both packages without any conflict. And both of them are old (eurosym is from 1998, marvosym from 2006). What version are yours? –  Harald Hanche-Olsen Nov 12 '10 at 19:39
@Harald I do get the error Command \EUR already defined' (and have modified the question to make it clearer). The packages are from new distributions Marvosym from 2006 and eurosym as you mentioned 1998. –  Yiannis Lazarides Nov 12 '10 at 19:55
Ah, now I see. marvosym.sty uses \newcommand, but eurosym.sty uses \def to define \EUR. I had loaded marvosym first, so I never saw the conflict. –  Harald Hanche-Olsen Nov 12 '10 at 20:44

To just avoid the error, you could declare the affected macro to be undefined:

\usepackage{eurosym}
\let\EUR\undefined
\usepackage{marvosym}


If you would like to use symbols of both package with originally equal name, you could use the savesym package.

\usepackage{savesym}
\usepackage{eurosym}
\savesymbol{EUR}
\usepackage{marvosym}
\restoresymbol{marvosym}{EUR}
...
\EUR\ vs. \marvosymEUR


-
@ Stefan, thanks never thought of using \let\EUR\undefined –  Yiannis Lazarides Nov 12 '10 at 19:58
\let\EUR\relax would work as well. –  Stefan Kottwitz Nov 12 '10 at 20:04
@Stephan I just came across the \AtBeginPackage macro and I thought I would add this as a comment \AtBeginPackage{marvosym}{\let\EUR\relax} for completeness. –  Yiannis Lazarides Nov 16 '10 at 12:08
Just an obvious note of caution: \savesymbol` fails for commands with optional arguments. It thus can't be used 'out of the box'. –  Ahmed Musa Mar 13 '11 at 5:54