all repos — nixfiles @ bd70cf69863edb293f2cf4a14275327ea411fdcf

System and user configuration, managed by nix and home-manager

Emacs: don't initialise *init-file* when user-init-file is not set
Alan Pearce alan@alanpearce.co.uk
Sat, 22 Jun 2013 10:04:20 +0100
commit

bd70cf69863edb293f2cf4a14275327ea411fdcf

parent

3b77cea165c47d617035c3fb622aaa9cfcc3bcaa

1 files changed, 4 insertions(+), 1 deletions(-)

jump to
M emacs/init.elemacs/init.el
@@ -47,7 +47,10 @@ (defun env/recheck-location ()   (interactive)
   (setq env/location (env/get-location)))
 
-(defvar *init-file* (expand-file-name "init.el" (file-name-directory (file-truename user-init-file)))
+(defvar *init-file*
+  (when user-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