mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-04-27 16:51:06 -07:00
Mark 'package-autosuggest-database' as private
* admin/scrape-elpa.el (scrape-elpa): * etc/package-autosuggest.eld: * lisp/emacs-lisp/package.el (package-autosuggest-database) (package--autosuggest-suggested, package--suggestion-applies-p) (package--autosuggest-find-candidates) (package--autosuggest-install-and-enable): Rename constant name to add double-dash.
This commit is contained in:
parent
c4dc5bc766
commit
3a3a9e21c1
3 changed files with 7 additions and 7 deletions
|
|
@ -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!
|
||||
|
|
|
|||
|
|
@ -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!
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue