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

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

[nongnu] elpa/eat e6a7deafd0 5/7: Auto update 'eat-term-shell-integratio


From: ELPA Syncer
Subject: [nongnu] elpa/eat e6a7deafd0 5/7: Auto update 'eat-term-shell-integration-directory'
Date: Wed, 7 Dec 2022 04:58:42 -0500 (EST)

branch: elpa/eat
commit e6a7deafd0c57dc9cd4ed93f4b3e3b3293f33af7
Author: Akib Azmain Turja <akib@disroot.org>
Commit: Akib Azmain Turja <akib@disroot.org>

    Auto update 'eat-term-shell-integration-directory'
    
    * eat.el: Auto update 'eat-term-shell-integration-directory' if
    not modified.
---
 eat.el | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/eat.el b/eat.el
index 9068964716..d9cc29d158 100644
--- a/eat.el
+++ b/eat.el
@@ -322,13 +322,18 @@ This value is used by terminal programs to identify the 
terminal."
 (defvar eat--install-path nil
   "Path to directory where Eat is installed.")
 
+(defvar eat--shell-integration-path nil
+  "Path to directory where shell integration scripts are installed.")
+
 (defvar eat-term-terminfo-directory)
 (defvar eat-term-shell-integration-directory)
-(let ((old-install-path eat--install-path))
+(let ((old-install-path eat--install-path)
+      (old-shell-integration-path eat--shell-integration-path))
   (setq eat--install-path
-        (copy-sequence
-         (file-name-directory (or load-file-name
-                                  buffer-file-name))))
+        (copy-sequence (file-name-directory
+                        (or load-file-name buffer-file-name))))
+  (setq eat--shell-integration-path
+        (expand-file-name "integration" eat--install-path))
 
   (defcustom eat-term-terminfo-directory eat--install-path
     "Directory where required terminfo databases can be found.
@@ -338,8 +343,10 @@ that describe the capabilities of the terminal."
     :type 'directory
     :group 'eat-term)
 
+  (defvar eat--term-shell-integration-directory)
+
   (defcustom eat-term-shell-integration-directory
-    (expand-file-name "integration" eat--install-path)
+    eat--shell-integration-path
     "Directory where Eat shell integration scripts can be found.
 
 This value is exposed to terminal programs as
@@ -349,9 +356,11 @@ This value is exposed to terminal programs as
     :group 'eat-eshell)
 
   (when (eq eat-term-terminfo-directory old-install-path)
-    (setq eat-term-terminfo-directory eat--install-path
-          eat-term-shell-integration-directory
-          (expand-file-name "integration" eat--install-path))))
+    (setq eat-term-terminfo-directory eat--install-path))
+  (when (eq eat-term-shell-integration-directory
+            old-shell-integration-path)
+    (setq eat-term-shell-integration-directory
+          eat--shell-integration-path)))
 
 (defcustom eat-term-inside-emacs (format "%s,eat" emacs-version)
   "Value for the `INSIDE_EMACS' environment variable."



reply via email to

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