emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/pkg 93d4797345: Allow experimenting with in-package


From: Gerd Moellmann
Subject: feature/pkg 93d4797345: Allow experimenting with in-package
Date: Thu, 27 Oct 2022 04:51:22 -0400 (EDT)

branch: feature/pkg
commit 93d47973453becb715c4f5c7aa293eb2c30d25c9
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>

    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 044a56a5e2..f20d51e721 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
 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]