diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-10-12 16:10:09 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-10-12 16:10:09 +0000 |
commit | 63bc3ab1958830b1f3eb4dcee0bd89c6ea819b2e (patch) | |
tree | 75075304cc0ffefa76f2688ec5f3e6be8c83f35f /lispref | |
parent | e3df10c895cf15b41e1d0653cf8c26c662f923e8 (diff) | |
download | emacs-63bc3ab1958830b1f3eb4dcee0bd89c6ea819b2e.tar.gz |
Explain what major modes can do for imenu and font-lock.
Diffstat (limited to 'lispref')
-rw-r--r-- | lispref/modes.texi | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lispref/modes.texi b/lispref/modes.texi index 10c71d00993..dda63c9c0e5 100644 --- a/lispref/modes.texi +++ b/lispref/modes.texi @@ -153,6 +153,11 @@ a variable named @code{@var{modename}-mode-syntax-table}. @xref{Syntax Tables}. @item +If the mode handles a language that has a syntax for comments, it should +set the variables that define the comment syntax. @xref{Options for +Comments,, Options Controlling Comments, emacs, The GNU Emacs Manual}. + +@item @cindex abbrev tables in modes The mode may have its own abbrev table or may share one with other related modes. If it has its own abbrev table, it should store this in @@ -160,6 +165,20 @@ a variable named @code{@var{modename}-mode-abbrev-table}. @xref{Abbrev Tables}. @item +@vindex font-lock-defaults +The mode should specify how to do highlighting for Font Lock mode, by +setting up a buffer-local value for the variable +@code{font-lock-defaults}. + +@item +@vindex imenu-generic-expression +@vindex imenu-create-index-function +The mode should specify how Imenu should find the definitions or +sections of a buffer, by setting up a buffer-local value for the +variable @code{imenu-generic-expression} or +@code{imenu-create-index-function}. + +@item Use @code{defvar} to set mode-related variables, so that they are not reinitialized if they already have a value. (Such reinitialization could discard customizations made by the user.) |