On 2007-02-16, Kevin Rodgers <kevin.d.rodgers@gmail.com> wrote:
Tyler Smith wrote:
I put the modified function in scratch and c-x c-e to run it, and now
the function works as I want. How do I get the modifed code to run
automatically? I tried putting it in .emacs but that doesn't work.
That indicates that the original function definition is loaded after
your .emacs file, probably because the reftex library isn't actually
loaded until some reftex command is used (i.e. autoloaded).
You could either explicitly load reftex before you redefine the
function:
(require 'reftex)
(defun reftex-do-citation ...)
Or defer the function redefinition until after reftex has been loaded:
(eval-after-load "reftex" '(defun reftex-do-citation ...))
Neither of those seems to work :( I tried adding a hook as well, but
that also didn't work:
(add-hook 'reftex-mode-hook 'reftex-do-citation)