diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-06-19 20:44:32 +0200 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-06-19 20:44:32 +0200 |
commit | 737ef29d17b6d85732c6164f560949d75c5f4c77 (patch) | |
tree | 707d9f95abfd3ff8c5707be3c8475e4461ae5ddf | |
parent | 8b5fc88976f5cd037ed8304bade16a8118e67825 (diff) | |
download | geiser-737ef29d17b6d85732c6164f560949d75c5f4c77.tar.gz geiser-737ef29d17b6d85732c6164f560949d75c5f4c77.tar.bz2 |
New user command to unregister Scheme implementations.
-rw-r--r-- | elisp/geiser-impl.el | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/elisp/geiser-impl.el b/elisp/geiser-impl.el index 767a7cf..4239f1e 100644 --- a/elisp/geiser-impl.el +++ b/elisp/geiser-impl.el @@ -68,7 +68,8 @@ determine its scheme flavour." (add-to-list 'geiser-impl--impls impl))) (defun geiser-impl--unregister (impl) - (setq geiser-impl--impls (remove impl geiser-impl--impls))) + (setq geiser-impl--impls (remove impl geiser-impl--impls)) + (ignore-errors (unload-feature (geiser-impl--impl-feature impl)))) (defvar geiser-impl--default-implementation geiser-impl-default-implementation) @@ -240,7 +241,7 @@ implementation to be used by Geiser.")) "Register a new Scheme implementation." (interactive) (let ((current geiser-impl-installed-implementations) - (impl (geiser-impl--read-impl "New implementation: " nil t))) + (impl (geiser-impl--read-impl "New Scheme implementation: " nil t))) (unless (geiser-impl--register impl) (error "geiser-%s.el not found in load-path" impl)) (when (and (not (memq impl current)) @@ -248,6 +249,17 @@ implementation to be used by Geiser.")) (customize-save-variable 'geiser-impl-installed-implementations (cons impl current))))) +(defun geiser-unregister-implementation () + "Unregister an installed Scheme implementation." + (interactive) + (let* ((current geiser-impl-installed-implementations) + (impl (geiser-impl--read-impl "Forget implementation: " current))) + (geiser-impl--unregister impl) + (when (and (impl current) + (y-or-n-p "Forget permanently using customize? ")) + (customize-save-variable + 'geiser-impl-installed-implementations (remove impl current))))) + ;;; Unload support |