From 878cacc7127426a51feff28dd323674a7e62a5e0 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Thu, 11 Aug 2022 12:40:17 +0200 Subject: [PATCH] * 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 0776d2c0a8e..5a707e1a600 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." -- 2.39.5