From: Philip Kaludercic Date: Thu, 11 Aug 2022 10:40:17 +0000 (+0200) Subject: * package-vc.el (package-vc-unpack): Detect TeXinfo manuals X-Git-Tag: emacs-29.0.90~1616^2~307^2~95 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=878cacc7127426a51feff28dd323674a7e62a5e0;p=emacs.git * package-vc.el (package-vc-unpack): Detect TeXinfo manuals --- 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."