From 2a88c6dc3c36f726275554f1b93e32fd726e415c Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Fri, 8 Nov 2024 11:41:47 -0500 Subject: Do not suggest packages outside of 'fundamental-mode' * lisp/emacs-lisp/package.el (package--autosuggest-find-candidates): Check 'major-mode' before computing suggestions. --- lisp/emacs-lisp/package.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 335a08b2206..f687839f206 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -4618,7 +4618,7 @@ SUG should be an element of `package-autosuggest-database'." "Return a list of suggestions that might be interesting the current buffer. The elements of the returned list will be a subset of the elements of `package--autosuggest-suggested'." - (and package-autosuggest-mode + (and package-autosuggest-mode (eq major-mode 'fundamental-mode) (let (suggetions) (dolist (sug package-autosuggest-database) (when (package--suggestion-applies-p sug) -- cgit v1.2.1