Function: package--autosuggest-find-candidates

package--autosuggest-find-candidates is a byte-compiled function defined in package-activate.el.gz.

Signature

(package--autosuggest-find-candidates)

Documentation

Return a list of suggestions that might be interesting for the current buffer.

The elements of the returned list will have the form described in package--suggestion-applies-p.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lisp/package-activate.el.gz
(defun package--autosuggest-find-candidates ()
  "Return a list of suggestions that might be interesting for the current buffer.
The elements of the returned list will have the form described
in `package--suggestion-applies-p'."
    (and (eq major-mode 'fundamental-mode)
         (let ((suggetions '()))
           (when (eq package--autosuggest-database 'unset)
             (setq package--autosuggest-database
                   (with-temp-buffer
                     (insert-file-contents
                      (expand-file-name "package-autosuggest.eld"
                                        data-directory))
                     (read (current-buffer)))))
           (dolist (sug package--autosuggest-database)
             (when (package--suggestion-applies-p sug)
               (push sug suggetions)))
           suggetions)))