aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLute Kamstra2005-05-12 13:20:56 +0000
committerLute Kamstra2005-05-12 13:20:56 +0000
commit28e7aba4fd2bc5e3178ce4a4358722a327808538 (patch)
tree62b6a72feebe4cb1f5a44982a4ae5b4301fcbbbc
parentd4fb185de92d5c4a27e7b15f94217697eca32cda (diff)
downloademacs-28e7aba4fd2bc5e3178ce4a4358722a327808538.tar.gz
emacs-28e7aba4fd2bc5e3178ce4a4358722a327808538.zip
(Generic Modes): Update.
(Major Modes): Refer to node "Generic Modes".
-rw-r--r--lispref/modes.texi18
1 files changed, 4 insertions, 14 deletions
diff --git a/lispref/modes.texi b/lispref/modes.texi
index 12c4493b36f..4e6085566c4 100644
--- a/lispref/modes.texi
+++ b/lispref/modes.texi
@@ -71,10 +71,9 @@ it is convenient to use @code{define-derived-mode} with a @code{nil}
71parent argument, since it automatically enforces the most important 71parent argument, since it automatically enforces the most important
72coding conventions for you. 72coding conventions for you.
73 73
74@findex define-generic-mode
75 For a very simple programming language major mode that handles 74 For a very simple programming language major mode that handles
76comments and fontification, you can use @code{define-generic-mode} 75comments and fontification, you can use @code{define-generic-mode}.
77in @file{generic.el}. 76@xref{Generic Modes}.
78 77
79 Rmail Edit mode offers an example of changing the major mode 78 Rmail Edit mode offers an example of changing the major mode
80temporarily for a buffer, so it can be edited in a different way (with 79temporarily for a buffer, so it can be edited in a different way (with
@@ -873,7 +872,7 @@ configuration files. To define a generic mode, use the macro
873@code{define-generic-mode}. See the file @file{generic-x.el} for some 872@code{define-generic-mode}. See the file @file{generic-x.el} for some
874examples of the use of @code{define-generic-mode}. 873examples of the use of @code{define-generic-mode}.
875 874
876@defmac define-generic-mode mode comment-list keyword-list font-lock-list auto-mode-list function-list &optional docstring &rest custom-keyword-args 875@defmac define-generic-mode mode comment-list keyword-list font-lock-list auto-mode-list function-list &optional docstring
877This macro creates a new generic mode. The argument @var{mode} (an 876This macro creates a new generic mode. The argument @var{mode} (an
878unquoted symbol) is the major mode command. The optional argument 877unquoted symbol) is the major mode command. The optional argument
879@var{docstring} is the documentation for the mode command. If you do 878@var{docstring} is the documentation for the mode command. If you do
@@ -902,16 +901,7 @@ when Emacs runs the macro expansion.
902 901
903@var{function-list} is a list of functions to call to do some 902@var{function-list} is a list of functions to call to do some
904additional setup. The mode command calls these functions just before 903additional setup. The mode command calls these functions just before
905it runs the mode hook. 904it runs the mode hook variable @code{@var{mode}-hook}.
906
907The optional @var{custom-keyword-args} are pairs of keywords and
908values to include in the generated @code{defcustom} form for the mode
909hook variable @code{@var{mode}-hook}. The default value for the
910@samp{:group} keyword is @var{mode} with the final @samp{-mode} (if
911any) removed. Don't use this default group name unless you have
912written a @code{defgroup} to define that group properly (@pxref{Group
913Definitions}). You can specify keyword arguments without specifying a
914docstring.
915@end defmac 905@end defmac
916 906
917@node Mode Hooks 907@node Mode Hooks