Auto update 'eat-term-shell-integration-directory'
* eat.el: Auto update 'eat-term-shell-integration-directory' if not modified.
This commit is contained in:
parent
b3c81c3078
commit
e6a7deafd0
1 changed files with 17 additions and 8 deletions
25
eat.el
25
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."
|
||||
|
|
Loading…
Add table
Reference in a new issue