summaryrefslogtreecommitdiff
path: root/elisp/geiser-impl.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-09-26 04:25:13 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-09-26 04:25:13 +0200
commita9c8026ca23ae980e0288b4657567fc586673e3c (patch)
tree7ac4d8fe2fa8fbf6ef8d15baee64ca1b655f5e5e /elisp/geiser-impl.el
parentf4bfd4dbd6e91b60a80be309ffa70b7aeb7870a9 (diff)
downloadgeiser-guile-a9c8026ca23ae980e0288b4657567fc586673e3c.tar.gz
geiser-guile-a9c8026ca23ae980e0288b4657567fc586673e3c.tar.bz2
Letting implementations define their own file pattern matching rules.
Diffstat (limited to 'elisp/geiser-impl.el')
-rw-r--r--elisp/geiser-impl.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/elisp/geiser-impl.el b/elisp/geiser-impl.el
index a85b97b..2fb0828 100644
--- a/elisp/geiser-impl.el
+++ b/elisp/geiser-impl.el
@@ -31,7 +31,7 @@
:type '(repeat symbol)
:group 'geiser-implementation)
-(geiser-custom--defcustom geiser-implementations-alist '(((regexp "\\.ss$") plt))
+(geiser-custom--defcustom geiser-implementations-alist nil
"A map from regular expressions or directories to implementations.
When opening a new file, its full path will be matched against
each one of the regular expressions or directories in this map in order to
@@ -143,9 +143,11 @@ determine its scheme flavour."
(switcher (intern (format "switch-to-%s" name)))
(runner-doc (format "Start a new %s REPL." name))
(switcher-doc (format "Switch to a running %s REPL, or start one." name))
+ (impl-rx (format "\\.\\(%s\\)\\.s\\(l?s|cm\\)$" name))
(ask (make-symbol "ask")))
`(progn
(geiser-impl--define ,load-file-name ',name ',parent ',methods)
+ (geiser-impl--add-to-alist 'regexp ,impl-rx ',name t)
(require 'geiser-repl)
(defun ,runner ()
,runner-doc
@@ -157,8 +159,8 @@ determine its scheme flavour."
(switch-to-geiser ,ask ',name))
(provide ',(geiser-impl--feature name))))))
-(defun geiser-impl--add-to-alist (kind what impl)
- (add-to-list 'geiser-implementations-alist (list (list kind what) impl)))
+(defun geiser-impl--add-to-alist (kind what impl &optional append)
+ (add-to-list 'geiser-implementations-alist (list (list kind what) impl) append))
;;; Trying to guess the scheme implementation: