From 67f727855895050aca3bcf37066e804dc8f307de Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Thu, 14 Jul 2022 16:06:12 +0200 Subject: Define autoloads how that is normally done - Avoid defining autoload definitions in a central location. Instead add autoload cookies to the forms/definitions that should be autoloaded, in the locations where the actual definitions are located. - Do this for `geiser-mode', `turn-on-geiser-mode', `geiser-mode--maybe-activate' (including adding that to `scheme-mode-hook'), `geiser', `geiser-connect', `geiser-connect-local' and `geiser-repl-switch'. - Also do this for `run-geiser', even though it is only an obsolete function alias for `geiser', which might make it desirable to drop the autoload altogether. Some unusual autoload definitions remain in "geiser.el", see below. - One issue with defining autoloads in a central location is that it is easy to forget to remove such autoloads when the real definition is removed. No longer autoload `geiser-version' because since [1: 847d2ad] there no longer exists a proper definition of that function. - No longer autoload `geiser-unload', `geiser-reload' and `turn-off-geiser-mode', because they are only useful if Geiser has already been loaded, at which point any autoloaded definitions are no longer relevant. However, - Keep autoloading `geiser-activate-implementation' and `geiser-implementation-extension', even though I doubt that this is actually useful. - Keep using `custom-add-load' to specify dependencies of Custom groups and keep autoloading that. I don't know if this is actually necessary, and while it seems really weird, it might served a legit purpose, that I am not aware of. 1: 2020-07-19 847d2ad4c6da462c26c50af1ef7d9cd697f3a5d2 scheme and autotools removals --- elisp/geiser.el | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) (limited to 'elisp/geiser.el') diff --git a/elisp/geiser.el b/elisp/geiser.el index abcdb94..2790a82 100644 --- a/elisp/geiser.el +++ b/elisp/geiser.el @@ -51,53 +51,12 @@ ;;; Code: -;;; Locations: ;;;###autoload (defconst geiser-elisp-dir (file-name-directory (or load-file-name buffer-file-name)) "Directory containing Geiser's Elisp files.") - -;;; Autoloads: - -;;;###autoload -(autoload 'geiser-unload "geiser-reload" "Unload all Geiser code." t) - -;;;###autoload -(autoload 'geiser-reload "geiser-reload" "Reload Geiser code." t) - -;;;###autoload -(autoload 'geiser "geiser-repl" "Start a Geiser REPL." t) - -;;;###autoload -(autoload 'run-geiser "geiser-repl" "Start a Geiser REPL." t) - -;;;###autoload -(autoload 'geiser-connect "geiser-repl" - "Start a Geiser REPL connected to a remote server." t) - -;;;###autoload -(autoload 'geiser-connect-local "geiser-repl" - "Start a Geiser REPL connected to a remote server over a Unix-domain socket." - t) - -;;;###autoload -(autoload 'geiser-repl-switch "geiser-repl" - "Switch to a running one Geiser REPL." t) - -;;;###autoload -(autoload 'geiser-mode "geiser-mode" - "Minor mode adding Geiser REPL interaction to Scheme buffers." t) - -;;;###autoload -(autoload 'turn-on-geiser-mode "geiser-mode" - "Enable Geiser's mode (useful in Scheme buffers)." t) - -;;;###autoload -(autoload 'turn-off-geiser-mode "geiser-mode" - "Disable Geiser's mode (useful in Scheme buffers)." t) - (autoload 'geiser-activate-implementation "geiser-impl" "Register the given implementation as active.") @@ -120,14 +79,5 @@ geiser-implementation geiser-xref)) - -;;; Setup: - -;;;###autoload -(autoload 'geiser-mode--maybe-activate "geiser-mode") - -;;;###autoload -(add-hook 'scheme-mode-hook #'geiser-mode--maybe-activate) - (provide 'geiser) ;;; geiser.el ends here -- cgit v1.2.3