From 832b013ef041b13a55f9ccf6e1eca617f605753c Mon Sep 17 00:00:00 2001 From: muffinmad Date: Mon, 28 Nov 2022 23:09:59 +0200 Subject: [PATCH] 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) --- lisp/emacs-lisp/package.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 8e7c34da383..f10dc915721 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -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") -- 2.39.5