[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/package+vc 878cacc712 2/3: * package-vc.el (package-vc-unpack):
From: |
Philip Kaludercic |
Subject: |
feature/package+vc 878cacc712 2/3: * package-vc.el (package-vc-unpack): Detect TeXinfo manuals |
Date: |
Thu, 11 Aug 2022 07:06:46 -0400 (EDT) |
branch: feature/package+vc
commit 878cacc7127426a51feff28dd323674a7e62a5e0
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>
* package-vc.el (package-vc-unpack): Detect TeXinfo manuals
---
lisp/emacs-lisp/package-vc.el | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/package-vc.el b/lisp/emacs-lisp/package-vc.el
index 0776d2c0a8..5a707e1a60 100644
--- a/lisp/emacs-lisp/package-vc.el
+++ b/lisp/emacs-lisp/package-vc.el
@@ -195,7 +195,17 @@ The output is written out into PKG-FILE."
(package--native-compile-async new-desc))
;; After compilation, load again any files loaded by
;; `activate-1', so that we use the byte-compiled definitions.
- (package--reload-previously-loaded new-desc)))))
+ (package--reload-previously-loaded new-desc)))
+
+ ;; Detect a manual
+ (when (executable-find "install-info")
+ ;; Only proceed if we can find an unambiguous TeXinfo file
+ (let ((texi-files (directory-files pkg-dir t "\\.texi\\'"))
+ (dir-file (expand-file-name "dir" pkg-dir)))
+ (when (length= texi-files 1)
+ (call-process "install-info" nil nil nil
+ (concat "--dir=" dir-file)
+ (car texi-files)))))))
(defun package-vc-sourced-packages-list ()
"Generate a list of packages with VC data."