@code{@var{modename}-mode-map}. Normally the library that defines the
mode sets this variable.
+@xref{Tips for Defining}, for advice about how to write the code to set
+up the mode's keymap variable.
+
@item
@cindex syntax tables in modes
The mode may have its own syntax table or may share one with other
@cindex visited file mode
This function selects the major mode that is appropriate for the
current buffer. It may base its decision on the value of the @w{@samp{-*-}}
-line, on the visited file name (using @code{auto-mode-alist}), or on the
+line, on the visited file name (using @code{auto-mode-alist}), on the
+@w{@samp{#!}} line (using @code{interpreter-mode-alist}), or on the
value of a local variable. However, this function does not look for
the @samp{mode:} local variable near the end of a file; the
@code{hack-local-variables} function does that. @xref{Choosing Modes, ,
@defvar interpreter-mode-alist
This variable specifes major modes to use for scripts that specify a
-command interpreter in an @samp{!#} line. Its value is a list of
+command interpreter in an @samp{#!} line. Its value is a list of
elements of the form @code{(@var{interpreter} . @var{mode})}; for
example, @code{("perl" . perl-mode)} is one element present by default.
The element says to use mode @var{mode} if the file specifies
buffer. When a hook variable is local, it can have local and global
hook functions, and @code{run-hooks} runs all of them.
+This function works by making @code{t} an element of the buffer-local
+value. That serves as a flag to use the hook functions in the default
+value of the hook variable as well as those in the local value. Since
+@code{run-hooks} understands this flag, @code{make-local-hook} works
+with all normal hooks. It works for only some non-normal hooks---those
+whose callers have been updated to understand this meaning of @code{t}.
+
Do not use @code{make-local-variable} directly for hook variables; it is
not sufficient.
@end defun