Skip to content

Commit

Permalink
Add Unset env feature to deactivate propery
Browse files Browse the repository at this point in the history
  • Loading branch information
ArmCorelin authored and necaris committed Oct 5, 2024
1 parent 3c6d3c2 commit fce92e1
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion conda.el
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,19 @@ Set for the lifetime of the process.")
(let ((inhibit-message t))
(message "About to set %s to %s" (car pair) (cdr pair)))
(setenv (format "%s" (car pair)) (format "%s" (cdr pair))))
exports)))
exports))
(let ((unsets (or (conda-env-params-vars-unset params) '())))
(mapc (lambda (arg)
(let ((inhibit-message t))
(message "About to unset %s" arg))
(setenv (format "%s" arg) ""))
unsets))
(let ((sets (or (conda-env-params-vars-set params) '())))
(mapc (lambda (pair)
(let ((inhibit-message t))
(message "About to set %s to %s" (car pair) (cdr pair)))
(setenv (format "%s" (car pair)) (format "%s" (cdr pair))))
sets)))

(defun conda--set-env-gud-pdb-command-name ()
"When in a conda environment, call pdb as \\[python -m pdb]."
Expand Down

0 comments on commit fce92e1

Please sign in to comment.