(register-package package))
package))
+
+;;;###autoload
(defun register-package (package)
"Register PACKAGE in the package registry.
Signal an error if the name or one of the nicknames of PACKAGE
(package-%nicknames package))
package)))
+;;;###autoload
+(defun unregister-package (package)
+ "Unregister PACKAGE from the package registry.
+This removed the name of the package and all its nicknames
+from *package-registry*."
+ (pkg--remove-from-registry (pkg--package-or-lose package)))
+
;;;###autoload
(defun list-all-packages ()
"Return a fresh list of all registered packages."
(cl-pushnew sym (package-%shadowing-symbols package)))))
t)
-
;;;###autoload
(defun shadowing-import (_symbols &optional package)
(setq package (pkg--package-or-default package))
;;;###autoload
(defun use-package (use &optional package)
+ "Add package(s) USE the the use-list of PACKAGE.
+USE may be a package or list of packages or package designators.
+Optional PACKAGE specifies the PACKAGE whose use-list is
+to be changed. If not specified, use the current package.
+Value is t."
(let* ((package (pkg--package-or-default package))
(use (pkg--listify-packages use)))
(setf (package-%use-list package)
;;;###autoload
(defun unuse-package (unuse &optional package)
+ "Remove package(s) UNUSE the the use-list of PACKAGE.
+UNUSE may be a package or list of packages or package designators.
+Optional PACKAGE specifies the PACKAGE whose use-list is
+to be changed. If not specified, use the current package.
+Value is t."
(let* ((package (pkg--package-or-default package))
(unuse (pkg--listify-packages unuse)))
(setf (package-%use-list package)
;;;###autoload
(defun in-package* (package)
- "Switch to PACKAGE with completion."
+ "Switch current package to PACKAGE with completion."
(interactive (list (completing-read "Package to switch to: "
*package-registry*
nil t)))