diff --git a/admin/scrape-elpa.el b/admin/scrape-elpa.el index bf3846c0fcb..f2b5439d082 100644 --- a/admin/scrape-elpa.el +++ b/admin/scrape-elpa.el @@ -39,7 +39,7 @@ Please review the results before updating the autosuggest database!" (find-file (expand-file-name "package-autosuggest.eld" data-directory)) (erase-buffer) (lisp-data-mode) - (insert ";; The contents of this file are loaded into `package-autosuggest-database' + (insert ";; The contents of this file are loaded into `package--autosuggest-database' ;; and were automatically generate by scraping ELPA for auto-loaded ;; code using the `scrape-elpa' command. Please avoid updating this ;; file manually! diff --git a/etc/package-autosuggest.eld b/etc/package-autosuggest.eld index cf8b8288e27..ba27252f0da 100644 --- a/etc/package-autosuggest.eld +++ b/etc/package-autosuggest.eld @@ -1,4 +1,4 @@ -;; The contents of this file are loaded into `package-autosuggest-database' +;; The contents of this file are loaded into `package--autosuggest-database' ;; and were automatically generate by scraping ELPA for auto-loaded ;; code using the `scrape-elpa' command. Please avoid updating this ;; file manually! diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 6c2f3772d3c..d283bcbc4ae 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -4532,7 +4532,7 @@ The list is displayed in a buffer named `*Packages*'." ;;;; Autosuggest -(defconst package-autosuggest-database +(defconst package--autosuggest-database (eval-when-compile (with-temp-buffer (insert-file-contents @@ -4573,14 +4573,14 @@ the existence of a suggestion." (defvar package--autosuggest-suggested '() "List of packages that have already been suggested. The elements of this list should be a subset of elements from -`package-autosuggest-database'. Suggestions found in this list will not +`package--autosuggest-database'. Suggestions found in this list will not count as suggestions (e.g. if `package-autosuggest-style' is set to `mode-line', a suggestion found in here will inhibit `package-autosuggest-mode' from displaying a hint in the mode line).") (defun package--suggestion-applies-p (sug) "Check if a suggestion SUG is applicable to the current buffer. -SUG should be an element of `package-autosuggest-database'." +SUG should be an element of `package--autosuggest-database'." (pcase sug (`(,(or (pred (lambda (e) (assq e package--autosuggest-suggested))) (pred package-installed-p)) @@ -4611,14 +4611,14 @@ The elements of the returned list will be a subset of the elements of `package--autosuggest-suggested'." (and package-autosuggest-mode (eq major-mode 'fundamental-mode) (let (suggetions) - (dolist (sug package-autosuggest-database) + (dolist (sug package--autosuggest-database) (when (package--suggestion-applies-p sug) (push sug suggetions))) suggetions))) (defun package--autosuggest-install-and-enable (sug) "Install and enable a package suggestion PKG-ENT. -SUG should be an element of `package-autosuggest-database'." +SUG should be an element of `package--autosuggest-database'." (let ((buffers-to-update '())) (dolist (buf (buffer-list)) (with-current-buffer buf