diff options
| author | Luc Teirlinck | 2005-05-29 14:44:08 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2005-05-29 14:44:08 +0000 |
| commit | 01f52a8797d5da496d96561f7003e2ef69c1eb0b (patch) | |
| tree | e929d2770ed4b334e88a343fb4984b782be1fe4c | |
| parent | cad2b41461c2b773f4297aad9e90aa7dab1550df (diff) | |
| download | emacs-01f52a8797d5da496d96561f7003e2ef69c1eb0b.tar.gz emacs-01f52a8797d5da496d96561f7003e2ef69c1eb0b.zip | |
(Major Mode Conventions): A derived mode only needs to put the call to
the parent mode inside `delay-mode-hooks'.
| -rw-r--r-- | lispref/modes.texi | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lispref/modes.texi b/lispref/modes.texi index 488265b0b68..c8152705439 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi | |||
| @@ -437,10 +437,8 @@ The major mode command may start by calling some other major mode | |||
| 437 | command (called the @dfn{parent mode}) and then alter some of its | 437 | command (called the @dfn{parent mode}) and then alter some of its |
| 438 | settings. A mode that does this is called a @dfn{derived mode}. The | 438 | settings. A mode that does this is called a @dfn{derived mode}. The |
| 439 | recommended way to define one is to use @code{define-derived-mode}, | 439 | recommended way to define one is to use @code{define-derived-mode}, |
| 440 | but this is not required. Such a mode should use | 440 | but this is not required. Such a mode should call the parent mode |
| 441 | @code{delay-mode-hooks} around its entire body (including the call to | 441 | command inside a @code{delay-mode-hooks} form. (Using |
| 442 | the parent mode command) @emph{except} for the final call to | ||
| 443 | @code{run-mode-hooks}, which runs the derived mode's hook. (Using | ||
| 444 | @code{define-derived-mode} does this automatically.) @xref{Derived | 442 | @code{define-derived-mode} does this automatically.) @xref{Derived |
| 445 | Modes}, and @ref{Mode Hooks}. | 443 | Modes}, and @ref{Mode Hooks}. |
| 446 | 444 | ||