title: Setting auto-mode-alist in emacs
body: <p>I notice that the current auto-mode-alist entries all end with a single quote, for example</p>
  
  <pre><code> ("\\.java\\'" . java-mode)
  </code></pre>
  
  <p>What is the purpose of the single quote.  I would have expected to see</p>
  
  <pre><code> ("\\.java$" . java-mode)
  </code></pre>
  
  <p>The reason I ask is that I am trying to get files with names matching regexp </p>
  
  <pre><code>^twiki\.corp.* 
  </code></pre>
  
  <p>to open in org-mode.  I have tried the following without success:</p>
  
  <pre><code>(add-to-list 'auto-mode-alist '("^twiki\\.corp" . org-mode))
  (add-to-list 'auto-mode-alist '("\\'twiki\\.corp" . org-mode))
  </code></pre>
  
  <p>The following works:</p>
  
  <pre><code>(add-to-list 'auto-mode-alist '("twiki\\.corp" . org-mode))
  </code></pre>
  
  <p>but is not quite what I want since file names with twiki.corp embedded in them will be opened in org-mode.</p>