From 30efb277f68a645db3f25022f856ddf0a768f476 Mon Sep 17 00:00:00 2001 From: jao Date: Fri, 16 Apr 2021 16:44:46 +0100 Subject: New public api for registering file extensions --- elisp/geiser-impl.el | 4 ++++ elisp/geiser.el | 7 ++++++- 2 files changed, 10 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3