aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Porter2023-05-12 20:11:01 -0700
committerJim Porter2023-07-01 12:03:56 -0700
commit77f13edab0fdb9eee25cf75f88c2dbfa4a7ee31b (patch)
tree467a2ac74ba1445f8a1804440991e72e7c0c2eca
parentf2981a1681d34b145753296e506f4c3ca7cba359 (diff)
downloademacs-77f13edab0fdb9eee25cf75f88c2dbfa4a7ee31b.tar.gz
emacs-77f13edab0fdb9eee25cf75f88c2dbfa4a7ee31b.zip
Correct the Eshell documentation about how to write new modules
* doc/misc/eshell.texi (Writing a module): Fix the documentation. 'eshell-defgroup' doesn't exist anymore.
-rw-r--r--doc/misc/eshell.texi30
1 files changed, 17 insertions, 13 deletions
diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi
index 001c96a0bea..bb1ee99ffc0 100644
--- a/doc/misc/eshell.texi
+++ b/doc/misc/eshell.texi
@@ -2117,23 +2117,27 @@ This section is not yet written.
2117@node Writing a module 2117@node Writing a module
2118@section Writing a module 2118@section Writing a module
2119 2119
2120An Eshell module is defined the same as any other library but one requirement: the 2120An Eshell module is defined the same as any other library but with two
2121module must define a Customize@footnote{@xref{Customization, , , 2121additional requirements: first, the module's source file should be
2122elisp, The Emacs Lisp Reference Manual}.} 2122named @file{em-@var{name}.el}; second, the module must define an
2123group using @code{eshell-defgroup} (in place of @code{defgroup}) with 2123autoloaded Customize group (@pxref{Customization, , , elisp, The Emacs
2124@code{eshell-module} as the parent group.@footnote{If the module has 2124Lisp Reference Manual}) with @code{eshell-module} as the parent group.
2125no user-customizable options, then there is no need to define it as an 2125In order to properly autoload this group, you should wrap its
2126Eshell module.} You also need to load the following as shown: 2126definition with @code{progn} as follows:
2127 2127
2128@example 2128@example
2129(eval-when-compile 2129;;;###autoload
2130 (require 'cl-lib) 2130(progn
2131 (require 'esh-mode) 2131(defgroup eshell-my-module nil
2132 (require 'eshell)) 2132 "My module lets you do very cool things in Eshell."
2133 2133 :tag "My module"
2134(require 'esh-util) 2134 :group 'eshell-module))
2135@end example 2135@end example
2136 2136
2137Even if you don't have any Customize options in your module, you
2138should still define the group so that Eshell can include your module
2139in the Customize interface for @code{eshell-modules-list}.
2140
2137@node Bugs and ideas 2141@node Bugs and ideas
2138@chapter Bugs and ideas 2142@chapter Bugs and ideas
2139@cindex reporting bugs and ideas 2143@cindex reporting bugs and ideas