diff options
author | jao <jao@gnu.org> | 2021-04-16 16:44:46 +0100 |
---|---|---|
committer | jao <jao@gnu.org> | 2021-04-16 16:44:46 +0100 |
commit | 30efb277f68a645db3f25022f856ddf0a768f476 (patch) | |
tree | a28a6ad9cff771d20da483abffe19440c55a8e15 | |
parent | c5a9aae4d30ea6dbf2d8af4dd1cc35a839686a00 (diff) | |
download | geiser-30efb277f68a645db3f25022f856ddf0a768f476.tar.gz geiser-30efb277f68a645db3f25022f856ddf0a768f476.tar.bz2 |
New public api for registering file extensions
-rw-r--r-- | elisp/geiser-impl.el | 4 | ||||
-rw-r--r-- | elisp/geiser.el | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/elisp/geiser-impl.el b/elisp/geiser-impl.el index babe617..b67c6bf 100644 --- a/elisp/geiser-impl.el +++ b/elisp/geiser-impl.el @@ -239,6 +239,10 @@ switcher (switch-to-NAME), and provides geiser-NAME." (add-to-list 'geiser-implementations-alist (list (list kind what) impl) append)) +(defun geiser-implementation-extension (impl ext) + "Add to `geiser-implementations-alist' an entry for extension EXT." + (geiser-impl--add-to-alist 'regexp (format "\\.%s$" ext) impl t)) + ;;; Trying to guess the scheme implementation: diff --git a/elisp/geiser.el b/elisp/geiser.el index ce1a0d5..a1a5549 100644 --- a/elisp/geiser.el +++ b/elisp/geiser.el @@ -105,7 +105,12 @@ (autoload 'geiser-mode--maybe-activate "geiser-mode") ;;;###autoload -(autoload 'geiser-activate-implementation "geiser-impl") +(autoload 'geiser-activate-implementation "geiser-impl" + "Register the given implementation as active.") + +;;;###autoload +(autoload 'geiser-implementation-extension "geiser-impl" + "Register a file extension as handled by a given implementation.") ;;;###autoload (mapc (lambda (group) |