Function: package--user-selected-p
package--user-selected-p is a byte-compiled function defined in
package.el.gz.
Signature
(package--user-selected-p PKG)
Documentation
Return non-nil if PKG is a package was installed by the user.
PKG is a package name.
This looks into package-selected-packages, populating it first
if it is still empty.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/package.el.gz
(defun package--user-selected-p (pkg)
"Return non-nil if PKG is a package was installed by the user.
PKG is a package name.
This looks into `package-selected-packages', populating it first
if it is still empty."
(unless (consp package-selected-packages)
(package--save-selected-packages (package--find-non-dependencies)))
(memq pkg package-selected-packages))