emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs/doc/lispref modes.texi


From: Chong Yidong
Subject: [Emacs-diffs] emacs/doc/lispref modes.texi
Date: Sat, 28 Mar 2009 13:49:57 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      09/03/28 13:49:57

Modified files:
        doc/lispref    : modes.texi 

Log message:
        (Derived Modes): Note that define-derive-mode sets the mode-class
        property.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/doc/lispref/modes.texi?cvsroot=emacs&r1=1.12&r2=1.13

Patches:
Index: modes.texi
===================================================================
RCS file: /sources/emacs/emacs/doc/lispref/modes.texi,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- modes.texi  28 Mar 2009 13:38:55 -0000      1.12
+++ modes.texi  28 Mar 2009 13:49:57 -0000      1.13
@@ -738,7 +738,7 @@
 one.  An easy way to do this is to use @code{define-derived-mode}.
 
 @defmac define-derived-mode variant parent name docstring address@hidden 
address@hidden
-This construct defines @var{variant} as a major mode command, using
+This macro defines @var{variant} as a major mode command, using
 @var{name} as the string form of the mode name.  @var{variant} and
 @var{parent} should be unquoted symbols.
 
@@ -776,6 +776,12 @@
 evaluates the forms in @var{body} after setting up all its usual
 overrides, just before running the mode hooks.
 
+If @var{parent} has a address@hidden @code{mode-class} symbol
+property, then @code{define-derived-mode} sets the @code{mode-class}
+property of @var{variant} to the same value.  This ensures, for
+example, that if @var{parent} is a special mode, then @var{variant} is
+also a special mode (@pxref{Major Mode Conventions}).
+
 You can also specify @code{nil} for @var{parent}.  This gives the new
 mode no parent.  Then @code{define-derived-mode} behaves as described
 above, but, of course, omits all actions connected with @var{parent}.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]