From: Gerd Möllmann Date: Thu, 27 Oct 2022 08:50:51 +0000 (+0200) Subject: Allow experimenting with in-package X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=93d47973453becb715c4f5c7aa293eb2c30d25c9;p=emacs.git Allow experimenting with in-package * lisp/emacs-lisp/pkg.el (in-package*): New interactive function. --- 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 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;