diff --git a/Makefile b/Makefile index f5cedf1..cc509b1 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,23 @@ html: eat.html pdf: eat.pdf -terminfo: e/eat-mono e/eat-color eat-256color e/eat-truecolor +terminfo: eat.ti + test -d terminfo || mkdir terminfo + env TERMINFO=./terminfo $(TIC) -x eat.ti +# We don't know which directory was created, it depend on the +# case-sensitivity of the file-system. So make sure both are created. + test -d terminfo/e || mkdir terminfo/e + test -d terminfo/65 || mkdir terminfo/65 + if test terminfo/e/eat-mono -nt terminfo/65/eat-mono ; \ + then \ + cp terminfo/e/eat-mono terminfo/e/eat-color \ + terminfo/e/eat-256color terminfo/e/eat-truecolor \ + terminfo/65 ; \ + else \ + cp terminfo/65/eat-mono terminfo/65/eat-color \ + terminfo/65/eat-256color terminfo/65/eat-truecolor \ + terminfo/e ; \ + fi check: eat.el $(EMACS) -batch -l eat.el -l eat-tests.el \ @@ -49,9 +65,6 @@ changelog: eat.elc: eat.el $(EMACS) -batch --eval '(byte-compile-file "eat.el")' -e/eat-mono e/eat-color eat-256color e/eat-truecolor: eat.ti - env TERMINFO=. $(TIC) -x eat.ti - eat.info: eat.texi gpl.texi fdl.texi $(TEXI2INFO) eat.texi diff --git a/README.org b/README.org index 9d17135..d1f670f 100644 --- a/README.org +++ b/README.org @@ -90,7 +90,8 @@ put something like the following in your init file: (quelpa '(eat :fetcher git :url "/home/akib/projects/emacs-eat" :files ("*.el" ("term" "term/*.el") "*.texi" - "*.ti" ("e" "e/*") + "*.ti" ("terminfo/e" "terminfo/e/*") + ("terminfo/65" "terminfo/65/*") ("integration" "integration/*") (:exclude ".dir-locals.el" "*-tests.el")))) #+end_src diff --git a/eat.el b/eat.el index a933883..8db6ae5 100644 --- a/eat.el +++ b/eat.el @@ -339,20 +339,26 @@ 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--terminfo-path nil + "Path to directory where Terminfo databases are installed.") + (defvar eat--shell-integration-path nil "Path to directory where shell integration scripts are installed.") +(setq eat--install-path + (copy-sequence (file-name-directory + (or load-file-name buffer-file-name)))) + (defvar eat-term-terminfo-directory) (defvar eat-term-shell-integration-directory) -(let ((old-install-path eat--install-path) +(let ((old-terminfo-path eat--terminfo-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)))) + (setq eat--terminfo-path + (expand-file-name "terminfo" eat--install-path)) (setq eat--shell-integration-path (expand-file-name "integration" eat--install-path)) - (defcustom eat-term-terminfo-directory eat--install-path + (defcustom eat-term-terminfo-directory eat--terminfo-path "Directory where required terminfo databases can be found. This value is used by terminal programs to find the terminfo databases @@ -360,8 +366,6 @@ that describe the capabilities of the terminal." :type 'directory :group 'eat-term) - (defvar eat--term-shell-integration-directory) - (defcustom eat-term-shell-integration-directory eat--shell-integration-path "Directory where Eat shell integration scripts can be found. @@ -372,8 +376,8 @@ This value is exposed to terminal programs as :group 'eat-ui :group 'eat-eshell) - (when (eq eat-term-terminfo-directory old-install-path) - (setq eat-term-terminfo-directory eat--install-path)) + (when (eq eat-term-terminfo-directory old-terminfo-path) + (setq eat-term-terminfo-directory eat--terminfo-path)) (when (eq eat-term-shell-integration-directory old-shell-integration-path) (setq eat-term-shell-integration-directory diff --git a/e/eat-256color b/terminfo/65/eat-256color similarity index 100% rename from e/eat-256color rename to terminfo/65/eat-256color diff --git a/e/eat-color b/terminfo/65/eat-color similarity index 100% rename from e/eat-color rename to terminfo/65/eat-color diff --git a/e/eat-mono b/terminfo/65/eat-mono similarity index 100% rename from e/eat-mono rename to terminfo/65/eat-mono diff --git a/e/eat-truecolor b/terminfo/65/eat-truecolor similarity index 100% rename from e/eat-truecolor rename to terminfo/65/eat-truecolor diff --git a/terminfo/e/eat-256color b/terminfo/e/eat-256color new file mode 100644 index 0000000..dda98bd Binary files /dev/null and b/terminfo/e/eat-256color differ diff --git a/terminfo/e/eat-color b/terminfo/e/eat-color new file mode 100644 index 0000000..53ed6a6 Binary files /dev/null and b/terminfo/e/eat-color differ diff --git a/terminfo/e/eat-mono b/terminfo/e/eat-mono new file mode 100644 index 0000000..5d4b98b Binary files /dev/null and b/terminfo/e/eat-mono differ diff --git a/terminfo/e/eat-truecolor b/terminfo/e/eat-truecolor new file mode 100644 index 0000000..c2c86b9 Binary files /dev/null and b/terminfo/e/eat-truecolor differ