about summary refs log tree commit diff
path: root/emacs/.emacs.d/wpc/constants.el
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-08-25T13·19+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-08-25T13·19+0100
commit8eed16dc671f49e8ffcf51557b06a65720bd40d7 (patch)
treebb41112bc520b89b25b4965cf75a4530281b7456 /emacs/.emacs.d/wpc/constants.el
parent21ce27b0ca948ddab2206baf36707d00822e5206 (diff)
Replace calls to (getenv "BRIEFCASE") with constants/briefcase
I would prefer to define constants/briefcase in terms of `(getenv "BRIEFCASE")`
and assert that `(f-exists? (getenv "BRIEFCASE"))`, in one location:
constants.el
Diffstat (limited to 'emacs/.emacs.d/wpc/constants.el')
-rw-r--r--emacs/.emacs.d/wpc/constants.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/emacs/.emacs.d/wpc/constants.el b/emacs/.emacs.d/wpc/constants.el
index e29430841552..50b6cf8882de 100644
--- a/emacs/.emacs.d/wpc/constants.el
+++ b/emacs/.emacs.d/wpc/constants.el
@@ -13,19 +13,24 @@
 (require 'prelude)
 (require 'f)
 
+(prelude/assert (f-exists? (getenv "BRIEFCASE")))
+
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Configuration
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
+(defconst constants/briefcase
+  (getenv "BRIEFCASE")
+  "Path to my monorepo, which various parts of my configuration rely on.")
+
 ;; TODO: Consider merging `ui.el' and `misc.el' because those are the only
 ;; current consumers of these constants, and I'm unsure if the indirection that
 ;; globally defined constants introduces is worth it.
 
-(defconst constants/current-project "~/briefcase"
+(defconst constants/current-project
+  constants/briefcase
   "Variable holding the directory for my currently active project.")
 
-(prelude/assert (f-directory? constants/current-project))
-
 (defconst constants/mouse-kbds
   '([mouse-1] [down-mouse-1] [drag-mouse-1] [double-mouse-1] [triple-mouse-1]
     [mouse-2] [down-mouse-2] [drag-mouse-2] [double-mouse-2] [triple-mouse-2]