From bc1828265c226fa3b5267eca2c3d3f08bedfe627 Mon Sep 17 00:00:00 2001 From: Jim Porter Date: Sun, 19 May 2024 22:01:31 -0700 Subject: [PATCH 2/4] Use 'esh-module-autoload' for Eshell modules' defgroups This will let modules define their own, regular autoloads, independent of the core Eshell machinery for defining modules. * lisp/eshell/em-alias.el (em-alias): * lisp/eshell/em-banner.el (em-banner): * lisp/eshell/em-basic.el (em-basic): * lisp/eshell/em-cmpl.el (em-cmpl): * lisp/eshell/em-dirs.el (em-dirs): * lisp/eshell/em-elecslash.el (em-elecslash): * lisp/eshell/em-extpipe.el: * lisp/eshell/em-glob.el (em-glob): * lisp/eshell/em-hist.el (em-hist): * lisp/eshell/em-ls.el (em-ls): * lisp/eshell/em-pred.el (em-pred): * lisp/eshell/em-prompt.el (em-prompt): * lisp/eshell/em-rebind.el (em-rebind): * lisp/eshell/em-script.el (em-script): * lisp/eshell/em-smart.el (em-smart): * lisp/eshell/em-term.el (em-term): * lisp/eshell/em-tramp.el (em-tramp): * lisp/eshell/em-unix.el (em-unix): * lisp/eshell/em-xtra.el (em-xtra): Use 'esh-module-autoload'. * lisp/eshell/esh-module.el ("esh-module-loaddefs"): Load this instead of "esh-groups". * .gitignore: Change esh-groups.el to esh-module-loaddefs.el --- .gitignore | 2 +- lisp/eshell/em-alias.el | 7 +------ lisp/eshell/em-banner.el | 7 +------ lisp/eshell/em-basic.el | 7 +------ lisp/eshell/em-cmpl.el | 7 +------ lisp/eshell/em-dirs.el | 7 +------ lisp/eshell/em-elecslash.el | 7 +------ lisp/eshell/em-extpipe.el | 2 +- lisp/eshell/em-glob.el | 7 +------ lisp/eshell/em-hist.el | 7 +------ lisp/eshell/em-ls.el | 7 +------ lisp/eshell/em-pred.el | 7 +------ lisp/eshell/em-prompt.el | 7 +------ lisp/eshell/em-rebind.el | 7 +------ lisp/eshell/em-script.el | 7 +------ lisp/eshell/em-smart.el | 7 +------ lisp/eshell/em-term.el | 7 +------ lisp/eshell/em-tramp.el | 7 +------ lisp/eshell/em-unix.el | 7 +------ lisp/eshell/em-xtra.el | 7 +------ lisp/eshell/esh-module.el | 2 +- 21 files changed, 21 insertions(+), 111 deletions(-) diff --git a/.gitignore b/.gitignore index 1557c085fad..52d328a9357 100644 --- a/.gitignore +++ b/.gitignore @@ -128,7 +128,7 @@ lisp/cedet/semantic/wisent/js-wy.el lisp/cedet/semantic/wisent/python-wy.el lisp/cedet/srecode/srt-wy.el lisp/cedet/semantic/grammar-wy.el -lisp/eshell/esh-groups.el +lisp/eshell/esh-module-loaddefs.el lisp/finder-inf.el lisp/leim/ja-dic/ leim/small-ja-dic-option diff --git a/lisp/eshell/em-alias.el b/lisp/eshell/em-alias.el index 832e14418d0..d12b382d885 100644 --- a/lisp/eshell/em-alias.el +++ b/lisp/eshell/em-alias.el @@ -92,7 +92,7 @@ (require 'esh-mode) -;;;###autoload +;;;###esh-module-autoload (progn (defgroup eshell-alias nil "Command aliases allow for easy definition of alternate commands." @@ -268,9 +268,4 @@ eshell-fix-bad-commands (eshell-parse-command alias)))))))))) (provide 'em-alias) - -;; Local Variables: -;; generated-autoload-file: "esh-groups.el" -;; End: - ;;; em-alias.el ends here diff --git a/lisp/eshell/em-banner.el b/lisp/eshell/em-banner.el index e6dcbb24475..626624c7bfe 100644 --- a/lisp/eshell/em-banner.el +++ b/lisp/eshell/em-banner.el @@ -44,7 +44,7 @@ (require 'esh-util) (require 'esh-mode) -;;;###autoload +;;;###esh-module-autoload (progn (defgroup eshell-banner nil "This sample module displays a welcome banner at login. @@ -82,9 +82,4 @@ eshell-banner-initialize (eshell-interactive-print msg)))) (provide 'em-banner) - -;; Local Variables: -;; generated-autoload-file: "esh-groups.el" -;; End: - ;;; em-banner.el ends here diff --git a/lisp/eshell/em-basic.el b/lisp/eshell/em-basic.el index 6ec53ef9412..82cddd7385f 100644 --- a/lisp/eshell/em-basic.el +++ b/lisp/eshell/em-basic.el @@ -58,7 +58,7 @@ (require 'esh-opt) (require 'esh-util) -;;;###autoload +;;;###esh-module-autoload (progn (defgroup eshell-basic nil "The \"basic\" code provides a set of convenience functions which @@ -225,9 +225,4 @@ pcomplete/eshell-mode/eshell-debug (while (pcomplete-here '("error" "form" "process")))) (provide 'em-basic) - -;; Local Variables: -;; generated-autoload-file: "esh-groups.el" -;; End: - ;;; em-basic.el ends here diff --git a/lisp/eshell/em-cmpl.el b/lisp/eshell/em-cmpl.el index 201beb5071d..4c79f7b187a 100644 --- a/lisp/eshell/em-cmpl.el +++ b/lisp/eshell/em-cmpl.el @@ -76,7 +76,7 @@ (eval-when-compile (require 'cl-lib)) -;;;###autoload +;;;###esh-module-autoload (progn (defgroup eshell-cmpl nil "This module provides a programmable completion function bound to @@ -518,9 +518,4 @@ eshell--complete-commands-list (define-obsolete-function-alias 'eshell-pcomplete #'completion-at-point "27.1") (provide 'em-cmpl) - -;; Local Variables: -;; generated-autoload-file: "esh-groups.el" -;; End: - ;;; em-cmpl.el ends here diff --git a/lisp/eshell/em-dirs.el b/lisp/eshell/em-dirs.el index 07063afc286..a3d1a349540 100644 --- a/lisp/eshell/em-dirs.el +++ b/lisp/eshell/em-dirs.el @@ -47,7 +47,7 @@ (require 'ring) (require 'esh-opt) -;;;###autoload +;;;###esh-module-autoload (progn (defgroup eshell-dirs nil "Directory navigation involves changing directories, examining the @@ -599,9 +599,4 @@ eshell-write-last-dir-ring 'no-message)))))))) (provide 'em-dirs) - -;; Local Variables: -;; generated-autoload-file: "esh-groups.el" -;; End: - ;;; em-dirs.el ends here diff --git a/lisp/eshell/em-elecslash.el b/lisp/eshell/em-elecslash.el index 93eadcfe1ff..60f2c6e4039 100644 --- a/lisp/eshell/em-elecslash.el +++ b/lisp/eshell/em-elecslash.el @@ -32,7 +32,7 @@ (require 'esh-mode) ;; This makes us an option when customizing `eshell-modules-list'. -;;;###autoload +;;;###esh-module-autoload (progn (defgroup eshell-elecslash nil "Electric forward slash in remote Eshells. @@ -108,9 +108,4 @@ eshell-electric-forward-slash (insert "/"))))) (provide 'em-elecslash) - -;; Local Variables: -;; generated-autoload-file: "esh-groups.el" -;; End: - ;;; esh-elecslash.el ends here diff --git a/lisp/eshell/em-extpipe.el b/lisp/eshell/em-extpipe.el index 057eead9297..4c92653a3a3 100644 --- a/lisp/eshell/em-extpipe.el +++ b/lisp/eshell/em-extpipe.el @@ -36,7 +36,7 @@ (eval-when-compile (require 'files-x)) -;;;###autoload +;;;###esh-module-autoload (progn (defgroup eshell-extpipe nil "Native shell pipelines. diff --git a/lisp/eshell/em-glob.el b/lisp/eshell/em-glob.el index 89a40151d00..36e4f90aed2 100644 --- a/lisp/eshell/em-glob.el +++ b/lisp/eshell/em-glob.el @@ -53,7 +53,7 @@ (require 'esh-module) (require 'esh-util) -;;;###autoload +;;;###esh-module-autoload (progn (defgroup eshell-glob nil "This module provides extended globbing syntax, similar what is used @@ -417,9 +417,4 @@ eshell-glob-entries (eshell-glob-entries rdir globs only-dirs))))) (provide 'em-glob) - -;; Local Variables: -;; generated-autoload-file: "esh-groups.el" -;; End: - ;;; em-glob.el ends here diff --git a/lisp/eshell/em-hist.el b/lisp/eshell/em-hist.el index 21029eae1bc..22d7723943a 100644 --- a/lisp/eshell/em-hist.el +++ b/lisp/eshell/em-hist.el @@ -60,7 +60,7 @@ (require 'esh-opt) (require 'esh-mode) -;;;###autoload +;;;###esh-module-autoload (progn (defgroup eshell-hist nil "This module provides command history management." @@ -1068,9 +1068,4 @@ em-hist-unload-function (remove-hook 'kill-emacs-hook 'eshell-save-some-history)) (provide 'em-hist) - -;; Local Variables: -;; generated-autoload-file: "esh-groups.el" -;; End: - ;;; em-hist.el ends here diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el index 62ad7ff72a1..82d4b01393f 100644 --- a/lisp/eshell/em-ls.el +++ b/lisp/eshell/em-ls.el @@ -32,7 +32,7 @@ (require 'esh-proc) (require 'esh-cmd) -;;;###autoload +;;;###esh-module-autoload (progn (defgroup eshell-ls nil "This module implements the \"ls\" utility fully in Lisp. @@ -956,9 +956,4 @@ em-ls-unload-function (eshell-ls-disable-in-dired)) (provide 'em-ls) - -;; Local Variables: -;; generated-autoload-file: "esh-groups.el" -;; End: - ;;; em-ls.el ends here diff --git a/lisp/eshell/em-pred.el b/lisp/eshell/em-pred.el index c3997dc72c3..0be262641ea 100644 --- a/lisp/eshell/em-pred.el +++ b/lisp/eshell/em-pred.el @@ -48,7 +48,7 @@ (require 'esh-mode) -;;;###autoload +;;;###esh-module-autoload (progn (defgroup eshell-pred nil "This module allows for predicates to be applied to globbing @@ -576,9 +576,4 @@ eshell-split-members lst)))) (provide 'em-pred) - -;; Local Variables: -;; generated-autoload-file: "esh-groups.el" -;; End: - ;;; em-pred.el ends here diff --git a/lisp/eshell/em-prompt.el b/lisp/eshell/em-prompt.el index 3662c1fa895..b6556d29544 100644 --- a/lisp/eshell/em-prompt.el +++ b/lisp/eshell/em-prompt.el @@ -29,7 +29,7 @@ (require 'esh-mode) (require 'text-property-search) -;;;###autoload +;;;###esh-module-autoload (progn (defgroup eshell-prompt nil "This module provides command prompts, and navigation between them, @@ -231,9 +231,4 @@ eshell-bol-ignoring-prompt (move-beginning-of-line arg))) (provide 'em-prompt) - -;; Local Variables: -;; generated-autoload-file: "esh-groups.el" -;; End: - ;;; em-prompt.el ends here diff --git a/lisp/eshell/em-rebind.el b/lisp/eshell/em-rebind.el index c6ee1a329b6..aad65f66f41 100644 --- a/lisp/eshell/em-rebind.el +++ b/lisp/eshell/em-rebind.el @@ -25,7 +25,7 @@ (require 'esh-mode) -;;;###autoload +;;;###esh-module-autoload (progn (defgroup eshell-rebind nil "This module allows for special keybindings that only take effect @@ -250,9 +250,4 @@ eshell-delchar-or-maybe-eof (eshell-delete-backward-char (- arg))))) (provide 'em-rebind) - -;; Local Variables: -;; generated-autoload-file: "esh-groups.el" -;; End: - ;;; em-rebind.el ends here diff --git a/lisp/eshell/em-script.el b/lisp/eshell/em-script.el index 066063c4cc2..254a11ea114 100644 --- a/lisp/eshell/em-script.el +++ b/lisp/eshell/em-script.el @@ -25,7 +25,7 @@ (require 'esh-mode) -;;;###autoload +;;;###esh-module-autoload (progn (defgroup eshell-script nil "This module allows for the execution of files containing Eshell @@ -115,9 +115,4 @@ eshell/. (put 'eshell/. 'eshell-no-numeric-conversions t) (provide 'em-script) - -;; Local Variables: -;; generated-autoload-file: "esh-groups.el" -;; End: - ;;; em-script.el ends here diff --git a/lisp/eshell/em-smart.el b/lisp/eshell/em-smart.el index 91fe02e5545..670b956476d 100644 --- a/lisp/eshell/em-smart.el +++ b/lisp/eshell/em-smart.el @@ -70,7 +70,7 @@ (require 'esh-mode) -;;;###autoload +;;;###esh-module-autoload (progn (defgroup eshell-smart nil "This module combines the facility of normal, modern shells with @@ -303,9 +303,4 @@ em-smart-unload-hook (remove-hook 'window-configuration-change-hook #'eshell-smart-scroll)) (provide 'em-smart) - -;; Local Variables: -;; generated-autoload-file: "esh-groups.el" -;; End: - ;;; em-smart.el ends here diff --git a/lisp/eshell/em-term.el b/lisp/eshell/em-term.el index 8f29e2d8509..2f8c06a0baa 100644 --- a/lisp/eshell/em-term.el +++ b/lisp/eshell/em-term.el @@ -36,7 +36,7 @@ (require 'esh-ext) (require 'term) -;;;###autoload +;;;###esh-module-autoload (progn (defgroup eshell-term nil "This module causes visual commands (e.g., `vi') to be executed by @@ -330,9 +330,4 @@ eshell-term-sentinel ; (use-local-map term-old-mode-map)) (provide 'em-term) - -;; Local Variables: -;; generated-autoload-file: "esh-groups.el" -;; End: - ;;; em-term.el ends here diff --git a/lisp/eshell/em-tramp.el b/lisp/eshell/em-tramp.el index efb37225651..cfc8a47327e 100644 --- a/lisp/eshell/em-tramp.el +++ b/lisp/eshell/em-tramp.el @@ -35,7 +35,7 @@ ;; There are no items in this custom group, but eshell modules (ab)use ;; custom groups. -;;;###autoload +;;;###esh-module-autoload (progn (defgroup eshell-tramp nil "This module defines commands that use Tramp in a way that is @@ -152,9 +152,4 @@ eshell/doas (put 'eshell/doas 'eshell-no-numeric-conversions t) (provide 'em-tramp) - -;; Local Variables: -;; generated-autoload-file: "esh-groups.el" -;; End: - ;;; em-tramp.el ends here diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index 855efa26033..7f976d22681 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el @@ -38,7 +38,7 @@ (require 'esh-mode) (require 'pcomplete) -;;;###autoload +;;;###esh-module-autoload (progn (defgroup eshell-unix nil "This module defines many of the more common UNIX utilities as @@ -1096,9 +1096,4 @@ eshell-diff-window-config (define-obsolete-function-alias 'eshell-diff-quit #'ignore "30.1") (provide 'em-unix) - -;; Local Variables: -;; generated-autoload-file: "esh-groups.el" -;; End: - ;;; em-unix.el ends here diff --git a/lisp/eshell/em-xtra.el b/lisp/eshell/em-xtra.el index a62073e2183..0a032395fd3 100644 --- a/lisp/eshell/em-xtra.el +++ b/lisp/eshell/em-xtra.el @@ -28,7 +28,7 @@ ;; There are no items in this custom group, but eshell modules (ab)use ;; custom groups. -;;;###autoload +;;;###esh-module-autoload (progn (defgroup eshell-xtra nil "This module defines some extra alias functions which are entirely @@ -85,9 +85,4 @@ 'eshell/ff (defalias 'eshell/gf #'find-grep-dired) (provide 'em-xtra) - -;; Local Variables: -;; generated-autoload-file: "esh-groups.el" -;; End: - ;;; em-xtra.el ends here diff --git a/lisp/eshell/esh-module.el b/lisp/eshell/esh-module.el index 88221638e16..db808f8597a 100644 --- a/lisp/eshell/esh-module.el +++ b/lisp/eshell/esh-module.el @@ -38,7 +38,7 @@ eshell-module ;; `eshell-modules-list'. We use "(progn (defgroup ..." in each file ;; to force the autoloader into including the entire defgroup, rather ;; than an abbreviated version. -(load "esh-groups" nil 'nomessage) +(load "esh-module-loaddefs" nil 'nomessage) ;;; User Variables: -- 2.25.1