summaryrefslogtreecommitdiff
path: root/elisp/geiser-impl.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-08-23 02:59:09 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-08-23 02:59:09 +0200
commit11e52e18251f6c2c5a9c7c37bbd4a1787e84b282 (patch)
treeed13358da3c97dd90849327ee4b531c5a176390e /elisp/geiser-impl.el
parentc5b6f124e8197c4e20278fb3f24086ee56f0e529 (diff)
downloadgeiser-chez-11e52e18251f6c2c5a9c7c37bbd4a1787e84b282.tar.gz
geiser-chez-11e52e18251f6c2c5a9c7c37bbd4a1787e84b282.tar.bz2
Fixes for all byte-compilation warnings.
Diffstat (limited to 'elisp/geiser-impl.el')
-rw-r--r--elisp/geiser-impl.el58
1 files changed, 30 insertions, 28 deletions
diff --git a/elisp/geiser-impl.el b/elisp/geiser-impl.el
index 32acade..840d0c1 100644
--- a/elisp/geiser-impl.el
+++ b/elisp/geiser-impl.el
@@ -59,10 +59,39 @@ determine its scheme flavour."
:group 'geiser-impl)
+;;; Auxiliary functions:
+(defsubst geiser-impl--sym (imp name)
+ (intern (format "geiser-%s-%s" imp name)))
+
+(defsubst geiser-impl--boundp (imp name)
+ (boundp (geiser-impl--sym imp name)))
+
+(defsubst geiser-impl--fboundp (imp name)
+ (fboundp (geiser-impl--sym imp name)))
+
+(defsubst geiser-impl--impl-feature (impl)
+ (intern (format "geiser-%s" impl)))
+
+(defun geiser-impl--value (imp name &optional fun)
+ (let ((sym (geiser-impl--sym imp name)))
+ (unless (or (and (not fun) (boundp sym))
+ (and fun (fboundp sym)))
+ (error "Unbound %s '%s' in Geiser Scheme implementation %s"
+ (if fun "function" "variable") sym imp))
+ (if fun (symbol-function sym) (symbol-value sym))))
+
+(defsubst geiser-impl--call-if-bound (imp name &rest args)
+ (when (geiser-impl--fboundp imp name)
+ (apply (geiser-impl--value imp name t) args)))
+
+
;;; Registering implementations:
(defvar geiser-impl--impls nil)
+(make-variable-buffer-local
+ (defvar geiser-impl--implementation nil))
+
(defun geiser-impl--register (impl)
(when (and (not (memq impl geiser-impl--impls))
(require (geiser-impl--impl-feature impl) nil t))
@@ -91,9 +120,6 @@ determine its scheme flavour."
;;; Installing Scheme implementations:
-(make-variable-buffer-local
- (defvar geiser-impl--implementation nil))
-
(defvar geiser-impl--impl-prompt-history nil)
(defun geiser-impl--read-impl (&optional prompt impls non-req)
@@ -114,30 +140,6 @@ determine its scheme flavour."
(geiser-impl--install-vars impl)
(geiser-impl--register impl)))
-(defsubst geiser-impl--sym (imp name)
- (intern (format "geiser-%s-%s" imp name)))
-
-(defsubst geiser-impl--boundp (imp name)
- (boundp (geiser-impl--sym imp name)))
-
-(defsubst geiser-impl--fboundp (imp name)
- (fboundp (geiser-impl--sym imp name)))
-
-(defsubst geiser-impl--impl-feature (impl)
- (intern (format "geiser-%s" impl)))
-
-(defun geiser-impl--value (imp name &optional fun)
- (let ((sym (geiser-impl--sym imp name)))
- (unless (or (and (not fun) (boundp sym))
- (and fun (fboundp sym)))
- (error "Unbound %s '%s' in Geiser Scheme implementation %s"
- (if fun "function" "variable") sym imp))
- (if fun (symbol-function sym) (symbol-value sym))))
-
-(defsubst geiser-impl--call-if-bound (imp name &rest args)
- (when (geiser-impl--fboundp imp name)
- (apply (geiser-impl--value imp name t) args)))
-
(defsubst geiser-impl--module-function (impl)
(geiser-impl--sym impl "get-module"))
@@ -259,7 +261,7 @@ implementation to be used by Geiser."))
(let* ((current geiser-impl-installed-implementations)
(impl (geiser-impl--read-impl "Forget implementation: " current)))
(geiser-impl--unregister impl)
- (when (and (impl current)
+ (when (and impl
(y-or-n-p "Forget permanently using customize? "))
(customize-save-variable
'geiser-impl-installed-implementations (remove impl current)))))