aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2009-03-28 13:49:57 +0000
committerChong Yidong2009-03-28 13:49:57 +0000
commitc986813b273acbeec45cb03210e51644d048235b (patch)
tree027072a56a3a5ed9fef21dedd8f798afa50b5c89
parent31c9eebb5aeba0e15554b3cf904b4f04102ff7ce (diff)
downloademacs-c986813b273acbeec45cb03210e51644d048235b.tar.gz
emacs-c986813b273acbeec45cb03210e51644d048235b.zip
(Derived Modes): Note that define-derive-mode sets the mode-class
property.
-rw-r--r--doc/lispref/modes.texi8
1 files changed, 7 insertions, 1 deletions
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 4fa843e6743..cd923e8fe4d 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -738,7 +738,7 @@ documentation of the major mode.
738one. An easy way to do this is to use @code{define-derived-mode}. 738one. An easy way to do this is to use @code{define-derived-mode}.
739 739
740@defmac define-derived-mode variant parent name docstring keyword-args@dots{} body@dots{} 740@defmac define-derived-mode variant parent name docstring keyword-args@dots{} body@dots{}
741This construct defines @var{variant} as a major mode command, using 741This macro defines @var{variant} as a major mode command, using
742@var{name} as the string form of the mode name. @var{variant} and 742@var{name} as the string form of the mode name. @var{variant} and
743@var{parent} should be unquoted symbols. 743@var{parent} should be unquoted symbols.
744 744
@@ -776,6 +776,12 @@ In addition, you can specify how to override other aspects of
776evaluates the forms in @var{body} after setting up all its usual 776evaluates the forms in @var{body} after setting up all its usual
777overrides, just before running the mode hooks. 777overrides, just before running the mode hooks.
778 778
779If @var{parent} has a non-@code{nil} @code{mode-class} symbol
780property, then @code{define-derived-mode} sets the @code{mode-class}
781property of @var{variant} to the same value. This ensures, for
782example, that if @var{parent} is a special mode, then @var{variant} is
783also a special mode (@pxref{Major Mode Conventions}).
784
779You can also specify @code{nil} for @var{parent}. This gives the new 785You can also specify @code{nil} for @var{parent}. This gives the new
780mode no parent. Then @code{define-derived-mode} behaves as described 786mode no parent. Then @code{define-derived-mode} behaves as described
781above, but, of course, omits all actions connected with @var{parent}. 787above, but, of course, omits all actions connected with @var{parent}.