Insert news for installed packages only

* lisp/emacs-lisp/package.el (describe-package-1): Check package is
installed and "news" is a regular file.  (Bug#59684)
This commit is contained in:
muffinmad 2022-11-28 23:09:59 +02:00 committed by Philip Kaludercic
parent cc6efa7992
commit 832b013ef0

View file

@ -2696,7 +2696,10 @@ Helper function for `describe-package'."
(signed (if desc (package-desc-signed desc)))
(maintainer (cdr (assoc :maintainer extras)))
(authors (cdr (assoc :authors extras)))
(news (and-let* ((file (expand-file-name "news" pkg-dir))
(news (and-let* (pkg-dir
((not built-in))
(file (expand-file-name "news" pkg-dir))
((file-regular-p file))
((file-readable-p file)))
file)))
(when (string= status "avail-obso")