Mercurial > emacs
comparison 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 |
comparison
equal
deleted
inserted
replaced
16431:65d3768ccb05 | 16432:6f58503776e5 |
---|---|
151 related modes. If it has its own syntax table, it should store this in | 151 related modes. If it has its own syntax table, it should store this in |
152 a variable named @code{@var{modename}-mode-syntax-table}. @xref{Syntax | 152 a variable named @code{@var{modename}-mode-syntax-table}. @xref{Syntax |
153 Tables}. | 153 Tables}. |
154 | 154 |
155 @item | 155 @item |
156 If the mode handles a language that has a syntax for comments, it should | |
157 set the variables that define the comment syntax. @xref{Options for | |
158 Comments,, Options Controlling Comments, emacs, The GNU Emacs Manual}. | |
159 | |
160 @item | |
156 @cindex abbrev tables in modes | 161 @cindex abbrev tables in modes |
157 The mode may have its own abbrev table or may share one with other | 162 The mode may have its own abbrev table or may share one with other |
158 related modes. If it has its own abbrev table, it should store this in | 163 related modes. If it has its own abbrev table, it should store this in |
159 a variable named @code{@var{modename}-mode-abbrev-table}. @xref{Abbrev | 164 a variable named @code{@var{modename}-mode-abbrev-table}. @xref{Abbrev |
160 Tables}. | 165 Tables}. |
166 | |
167 @item | |
168 @vindex font-lock-defaults | |
169 The mode should specify how to do highlighting for Font Lock mode, by | |
170 setting up a buffer-local value for the variable | |
171 @code{font-lock-defaults}. | |
172 | |
173 @item | |
174 @vindex imenu-generic-expression | |
175 @vindex imenu-create-index-function | |
176 The mode should specify how Imenu should find the definitions or | |
177 sections of a buffer, by setting up a buffer-local value for the | |
178 variable @code{imenu-generic-expression} or | |
179 @code{imenu-create-index-function}. | |
161 | 180 |
162 @item | 181 @item |
163 Use @code{defvar} to set mode-related variables, so that they are not | 182 Use @code{defvar} to set mode-related variables, so that they are not |
164 reinitialized if they already have a value. (Such reinitialization | 183 reinitialized if they already have a value. (Such reinitialization |
165 could discard customizations made by the user.) | 184 could discard customizations made by the user.) |