Emacs: Define a function which loads the file where the function itself is defined
- by damd
I'm refactoring a bit in my Emacs set up and have come to the conclusion that I want to use a different init file than the default one. So basically, in my ~/.emacs file, I have this:
(load "/some/directory/init.el")
Up until now, that's been working just fine. However, now I want to redefine an old command that I've used for ages, which opens my init file:
(defun conf ()
"Open a buffer with the user init file."
(interactive)
(find-file user-init-file))
As you can see, this will open ~/.emacs no matter what I do. I want it to open /some/directory/init.el, or wherever the conf command itself is defined.
How would I do that?