summary refs log tree commit diff stats
path: root/emacs
diff options
context:
space:
mode:
authorAlan Pearce2017-09-01 20:37:00 +0200
committerAlan Pearce2017-09-01 20:37:00 +0200
commitbfdf0f4afb759fecbc6d374dadf1b522f70f9e54 (patch)
tree41b298f26331646d2cabe0c6125deafdcd5c1d4b /emacs
parent554583649c15cb783b637523f97252e2e036782e (diff)
downloadnixfiles-bfdf0f4afb759fecbc6d374dadf1b522f70f9e54.tar.lz
nixfiles-bfdf0f4afb759fecbc6d374dadf1b522f70f9e54.tar.zst
nixfiles-bfdf0f4afb759fecbc6d374dadf1b522f70f9e54.zip
Emacs: Fix daemon startup error
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/main.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/emacs/.emacs.d/main.el b/emacs/.emacs.d/main.el
index eb8259ed..1b4bff36 100644
--- a/emacs/.emacs.d/main.el
+++ b/emacs/.emacs.d/main.el
@@ -60,8 +60,11 @@
 ;; #+BEGIN_SRC emacs-lisp
 (eval-and-compile
   (require 'seq)
-  (defvar nix-emacs (and (string-match "^/nix/store" invocation-directory)
-                         (not (null (seq-some (lambda (dir) (string-match "^/nix/store" dir)) load-path)))))
+  (defun is-nix-emacs ()
+    (and invocation-directory
+         (string-match "^/nix/store" invocation-directory)
+         (not (null (seq-some (lambda (dir) (string-match "^/nix/store" dir)) load-path)))))
+  (defvar nix-emacs (is-nix-emacs))
 
   (setq tls-checktrust t
         gnutls-verify-error t