Skip to content

Commit

Permalink
docs(env): explain how the environment is resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
Walheimat committed Jun 29, 2024
1 parent 7a2b86f commit 56ff88f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ship-mate.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit 56ff88f

Please sign in to comment.