From 56ff88fdf6b35298fe56d9acfe457bc934d05a57 Mon Sep 17 00:00:00 2001 From: Walheimat Date: Sat, 29 Jun 2024 14:53:38 +0200 Subject: [PATCH] docs(env): explain how the environment is resolved --- ship-mate.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ship-mate.el b/ship-mate.el index edf030a..103ee22 100644 --- a/ship-mate.el +++ b/ship-mate.el @@ -608,7 +608,12 @@ ARG is passed to `ship-mate-command--buffers'." values)))))) (defun ship-mate-environment--current-environment (cmd) - "Get the last environment for CMD or default." + "Get the last environment for CMD or default. + +This is the currently set `compilation-environment' if it's +non-nil. Otherwise it is either the local value of +`ship-mate-environment' of the current CMD or the global +value (corresponding to nil)." (if-let* ((buffer-name (funcall compilation-buffer-name-function nil)) (buffer (get-buffer buffer-name)) (local (buffer-local-value 'compilation-environment buffer)))