changeset 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 65d3768ccb05
children 63dc01de1823
files lispref/modes.texi
diffstat 1 files changed, 19 insertions(+), 0 deletions(-) [+]
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.)