all repos — nixfiles @ 32f0ff25f19c4dd2fae22f4fcb01286beb098808

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

Emacs: Improve nix-emacs check
Alan Pearce alan@alanpearce.eu
Sun, 18 Jun 2017 22:52:10 +0200
commit

32f0ff25f19c4dd2fae22f4fcb01286beb098808

parent

09c2fc0d1d5cb73008278f90c5638da78f141e4c

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

jump to
M emacs/.emacs.d/init.orgemacs/.emacs.d/init.org
@@ -58,8 +58,9 @@ ** Use-package 
 #+BEGIN_SRC emacs-lisp
 (eval-and-compile
+  (require 'seq)
   (defvar nix-emacs (and (string-match "^/nix/store" invocation-directory)
-                         (string-equal emacs-build-system system-name)))
+                         (not (null (seq-some (lambda (dir) (string-match "^/nix/store" dir)) load-path)))))
 
   (setq tls-checktrust t
         gnutls-verify-error t