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
commit8ec4b1b63c9e4976988988b0f534bcec77583c79 (patch)
treee4926e44c3c6a3aff8c7532abae5e6c16433c3f8 /elisp/geiser-impl.el
parentc59998e52dec584d17542059c93692cfbd731bbe (diff)
downloadgeiser-8ec4b1b63c9e4976988988b0f534bcec77583c79.tar.gz
geiser-8ec4b1b63c9e4976988988b0f534bcec77583c79.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)))))