aboutsummaryrefslogtreecommitdiffstats
path: root/lispref
diff options
context:
space:
mode:
authorRichard M. Stallman1996-10-12 16:10:09 +0000
committerRichard M. Stallman1996-10-12 16:10:09 +0000
commitbe9345cf6f4477fa4a92a95d00e586cc603ba848 (patch)
tree09eada84e400037f04b15b3109ae4314df1bd47b /lispref
parent6af28e9facc179c262d58b1bf20796ea573d14df (diff)
downloademacs-be9345cf6f4477fa4a92a95d00e586cc603ba848.tar.gz
emacs-be9345cf6f4477fa4a92a95d00e586cc603ba848.zip
Explain what major modes can do for imenu and font-lock.
Diffstat (limited to 'lispref')
-rw-r--r--lispref/modes.texi19
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
153Tables}. 153Tables}.
154 154
155@item 155@item
156If the mode handles a language that has a syntax for comments, it should
157set the variables that define the comment syntax. @xref{Options for
158Comments,, Options Controlling Comments, emacs, The GNU Emacs Manual}.
159
160@item
156@cindex abbrev tables in modes 161@cindex abbrev tables in modes
157The mode may have its own abbrev table or may share one with other 162The mode may have its own abbrev table or may share one with other
158related modes. If it has its own abbrev table, it should store this in 163related 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
160Tables}. 165Tables}.
161 166
162@item 167@item
168@vindex font-lock-defaults
169The mode should specify how to do highlighting for Font Lock mode, by
170setting 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
176The mode should specify how Imenu should find the definitions or
177sections of a buffer, by setting up a buffer-local value for the
178variable @code{imenu-generic-expression} or
179@code{imenu-create-index-function}.
180
181@item
163Use @code{defvar} to set mode-related variables, so that they are not 182Use @code{defvar} to set mode-related variables, so that they are not
164reinitialized if they already have a value. (Such reinitialization 183reinitialized if they already have a value. (Such reinitialization
165could discard customizations made by the user.) 184could discard customizations made by the user.)