title: Emacs "Query replace regexp" Replaces with ALL CAPS
body: <p>Using GNU Emacs 24.3.1, with the following text:</p>
  
  <pre><code>switch (input)
  {
  case ThisEnum::Type::UNDEFINED:
     UNDEFINED = 0,
     break;
     .
     .
     .
  }
  </code></pre>
  
  <p>Why does Emacs turn this</p>
  
  <pre><code>Query replace regexp (default \([[:alpha:]]*\) = .*,$ -&gt; retval = ThatEnum::Type::\1;):
  </code></pre>
  
  <p>into this</p>
  
  <pre><code>Query replacing \([[:alpha:]]*\) = .*,$ with RETVAL = THATENUM::TYPE::UNDEFINED;: (? for help)
  </code></pre>