title: Add a TeX symbol in the Emacs init file
body: <p>I am trying to add the following code to my <code>.emacs</code> init file:</p>
  
  <pre><code>(TeX-add-symbols '("eqref" TeX-arg-ref))
  </code></pre>
  
  <p>But I cannot get it to work. I get the following error when running <code>emacs t.tex</code> (<code>t.tex</code> is here a sample text file) from the command line:</p>
  
  <pre><code>Warning (initialization): An error occurred while loading `.emacs':
  Symbol's function definition is void: TeX-add-symbols
  </code></pre>
  
  <p>I am using GNU Emacs version 23.3.1 on Ubuntu 12.04. My <code>.emacs</code> init file looks like</p>
  
  <pre><code>(setq TeX-auto-parse t)
  (setq TeX-electric-escape t)
  (setq reftex-label-alist '((nil ?e nil "~\\eqref{%s}" nil nil)))
  (add-hook 'LaTeX-mode-hook 'turn-on-reftex)
  (setq reftex-plug-into-AUCTeX t)
  (TeX-add-symbols '("eqref" TeX-arg-ref))
  </code></pre>
  
  <p>If I enter <code>ESC-:</code> (i.e. running the command <code>eval-expression</code>) and enter
  <code>(TeX-add-symbols '("eqref" TeX-arg-ref))</code> at the prompt it works fine. (That is after running this, I can enter <code>\eqref</code> in the buffer and it works as expected.. But this is not a good solution, having to enter this code manually each time I edit a file.. That is the reason why I try to set it up in the <code>.emacs</code> file..)</p>
  
  <p><strong>Background information for this question:</strong></p>
  
  <p>I have a problem with using the AucTeX style <code>amsmath.el</code>.. it seems that it is not loaded properly on my machine.. For more information, see <a href="https://tex.stackexchange.com/questions/118640/using-eqref-with-reftex">Using \eqref with RefTeX</a>.</p>