emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/buffer-env 5f4e2258ff 04/12: Add buffer-env-reset


From: ELPA Syncer
Subject: [elpa] externals/buffer-env 5f4e2258ff 04/12: Add buffer-env-reset
Date: Mon, 28 Feb 2022 15:57:26 -0500 (EST)

branch: externals/buffer-env
commit 5f4e2258ffb7f8176fae1dc8d1a6c8e3ae0aab13
Author: Augusto Stoffel <arstoffel@gmail.com>
Commit: Augusto Stoffel <arstoffel@gmail.com>

    Add buffer-env-reset
---
 buffer-env.el | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/buffer-env.el b/buffer-env.el
index 1e2228f82c..b84bdac59f 100644
--- a/buffer-env.el
+++ b/buffer-env.el
@@ -35,7 +35,8 @@
 ;; direnv and it's not possible to use direnv-specific features in the
 ;; .envrc scripts.  On the plus side, it's possible to configure the
 ;; package to support other environment setup methods, such as .env
-;; files or Python virtualenvs.
+;; files or Python virtualenvs.  The package Readme includes some
+;; examples.
 
 ;; The usual way to activate this package is by including the
 ;; following in your init file:
@@ -162,5 +163,12 @@ When called interactively, ask for a FILE."
              (buffer-name)
              file)))
 
+;;;###autoload
+(defun buffer-env-reset ()
+  "Reset this buffer's process environment to the global values."
+  (interactive)
+  (kill-local-variable 'process-environment)
+  (kill-local-variable 'exec-path))
+
 (provide 'buffer-env)
 ;;; buffer-env.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]