From 93d47973453becb715c4f5c7aa293eb2c30d25c9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerd=20M=C3=B6llmann?= Date: Thu, 27 Oct 2022 10:50:51 +0200 Subject: [PATCH] Allow experimenting with in-package * lisp/emacs-lisp/pkg.el (in-package*): New interactive function. --- lisp/emacs-lisp/pkg.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lisp/emacs-lisp/pkg.el b/lisp/emacs-lisp/pkg.el index 044a56a5e2c..f20d51e721e 100644 --- a/lisp/emacs-lisp/pkg.el +++ b/lisp/emacs-lisp/pkg.el @@ -540,6 +540,15 @@ Value is the renamed package object." unuse)) t)) +;;;###autoload +(defun in-package* (package) + "Switch to PACKAGE with completion." + (interactive (list (completing-read "Package to switch to: " + *package-registry* + nil t))) + (let ((package (pkg--package-or-lose package))) + (setf *package* package))) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; defpackage ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -- 2.39.2