summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authormuffinmad <andreyk.mad@gmail.com>2022-11-28 23:09:59 +0200
committerPhilip Kaludercic <philipk@posteo.net>2022-11-30 20:27:41 +0100
commit832b013ef041b13a55f9ccf6e1eca617f605753c (patch)
tree9cfccc1a6e4d3b641b0df6b24c82eba1baab2e75 /lisp
parentcc6efa7992ce0ef0a43118a992a5f18ff912ff86 (diff)
downloademacs-832b013ef041b13a55f9ccf6e1eca617f605753c.tar.gz
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)
Diffstat (limited to 'lisp')
-rw-r--r--lisp/emacs-lisp/package.el5
1 files changed, 4 insertions, 1 deletions
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")