Files
.emacs.d/core/siren-core-env.el
Jim Myhrberg fe6a4e7ce5 fix(elisp): add lexical-binding comment to all files to suppress new Emacs 31 warnings
I've set `lexical-binding` to `nil` in all Emacs Lisp files to suppress
the warnings introduced in Emacs 31 requiring all elisp files to have a
`lexical-binding` comment.

This retains the default behavior of dynamic binding when no
`lexical-binding` comment is present. With it set to `t` across the
board, various things break, and fixing those is a task for another day.
2025-06-29 12:23:03 +01:00

38 lines
1.2 KiB
EmacsLisp

;;; siren-core-env.el --- jimeh's Emacs Siren: Environment variable setup. -*- lexical-binding: nil; -*-
;;; Commentary:
;; Setup for various environment variables to ensure external programs are
;; available.
;;; Code:
(use-package exec-path-from-shell
:custom
(exec-path-from-shell-variables '("PATH"
"MANPATH"
"TMPDIR"
"KUBECONFIG"
"GOPRIVATE"
"LSP_USE_PLISTS"
"RUST_BACKTRACE"
"MallocNanoZone"))
(exec-path-from-shell-arguments '("-l"))
(exec-path-from-shell-check-startup-files nil)
(exec-path-from-shell-debug nil)
:config
(when (memq window-system '(mac ns x pgtk))
(exec-path-from-shell-initialize)))
;; Set temporary-file-directory to match TMPDIR environment variable
(let ((tmpdir (getenv "TMPDIR")))
(when (and tmpdir (not (string-blank-p tmpdir)))
(setq temporary-file-directory tmpdir)))
;; Add bin directory within emacs configuration dir to `exec-path'.
(add-to-list 'exec-path (expand-file-name "bin" siren-dir))
(provide 'siren-core-env)
;;; siren-core-env.el ends here