about summary refs log tree commit diff
path: root/emacs/.emacs.d/wpc/wpc-misc.el
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/wpc/wpc-misc.el')
-rw-r--r--emacs/.emacs.d/wpc/wpc-misc.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/emacs/.emacs.d/wpc/wpc-misc.el b/emacs/.emacs.d/wpc/wpc-misc.el
index 5b21ec410892..897f0e56eb12 100644
--- a/emacs/.emacs.d/wpc/wpc-misc.el
+++ b/emacs/.emacs.d/wpc/wpc-misc.el
@@ -13,6 +13,7 @@
 (require 'project)
 (require 'f)
 (require 'dash)
+(require 'constants)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Configuration
@@ -180,10 +181,11 @@
 ;; trim whitespace on save
 (add-hook 'before-save-hook #'delete-trailing-whitespace)
 
-;; call `git secret hide` after saving ~/briefcase/secrets.json
+;; call `git secret hide` after saving secrets.json
 (add-hook 'after-save-hook
           (lambda ()
-            (when (f-equal? (buffer-file-name) "~/briefcase/secrets.json")
+            (when (f-equal? (buffer-file-name)
+                            (f-join constants/briefcase "secrets.json"))
               (shell-command "git secret hide"))))
 
 ;; use tabs instead of spaces
@@ -207,7 +209,7 @@
 (defun project-find-function--briefcase (dir)
   "Find the nearest default.nix file; otherwise, terminate at the .git
   directory."
-  (when (s-starts-with? (getenv "BRIEFCASE") (f-expand dir))
+  (when (s-starts-with? constants/briefcase (f-expand dir))
     (if (f-exists? (f-join dir "default.nix"))
         (cons 'transient dir)
       (project-find-function--briefcase (f-parent dir)))))