diff lispref/modes.texi @ 16432:6f58503776e5

Explain what major modes can do for imenu and font-lock.
author Richard M. Stallman <rms@gnu.org>
date Sat, 12 Oct 1996 16:10:09 +0000
parents bfe1d6597f08
children 8ed8412c1ce7
line wrap: on
line diff
--- a/lispref/modes.texi	Sat Oct 12 16:08:08 1996 +0000
+++ b/lispref/modes.texi	Sat Oct 12 16:10:09 1996 +0000
@@ -153,6 +153,11 @@
 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 @@
 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.)