Change Modifier Key While Application is frontmost
You could use a private.xml like this with KeyRemap4MacBook:

&lt;?xml version="1.0"?&gt;
&lt;root&gt;
  &lt;appdef&gt;
    &lt;appname&gt;EMACS&lt;/appname&gt;
    &lt;equal&gt;org.gnu.Emacs&lt;/equal&gt;
  &lt;/appdef&gt;
  &lt;item&gt;
    &lt;name&gt;test&lt;/name&gt;
    &lt;identifier&gt;test&lt;/identifier&gt;
    &lt;only&gt;EMACS&lt;/only&gt;
    &lt;autogen&gt;__KeyToKey__ KeyCode::COMMAND_L, KeyCode::CONTROL_L&lt;/autogen&gt;
    &lt;autogen&gt;__KeyToKey__ KeyCode::CONTROL_L, KeyCode::COMMAND_L&lt;/autogen&gt;
    &lt;autogen&gt;__KeyToKey__ KeyCode::COMMAND_R, KeyCode::CONTROL_L&lt;/autogen&gt;
  &lt;/item&gt;
&lt;/root&gt;