summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--emacs/init.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/emacs/init.el b/emacs/init.el
index 1c224b4..f880cb3 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -41,6 +41,9 @@ Values: `desktop', `server', `laptop'")
   (interactive)
   (setq env/location (env/get-location)))
 
+(defvar *init-file* (expand-file-name "init.el" (file-name-directory (file-truename user-init-file)))
+  "Where the emacs init file really is, passing through symlinks.")
+
 ;;;; Package Management
 (eval-and-compile
   (setq package-archives '(("gnu"       . "http://elpa.gnu.org/packages/")
@@ -466,7 +469,7 @@ Values: `desktop', `server', `laptop'")
 
 (bind-key "C-c i" #'ucs-insert)
 
-(set-register ?e `(file . ,user-init-file))
+(set-register ?e `(file . ,*init-file*))
 
 ;; Enable narrowing functions C-x n
 (put 'narrow-to-defun  'disabled nil)
@@ -919,7 +922,7 @@ Also returns nil if pid is nil."
 
 (defun init-imenu (p)
   (interactive "P")
-  (find-file-existing "~/dotfiles/emacs/init.el")
+  (find-file-existing *init-file*)
   (widen)
   (helm-imenu)
   (if p (init-narrow-to-section)))