summaryrefslogtreecommitdiff
path: root/doc/lispref/modes.texi
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2012-01-20 19:15:07 -0800
committerGlenn Morris <rgm@gnu.org>2012-01-20 19:15:07 -0800
commit61086eb66b6a222124f302c197e14021711d29d3 (patch)
treef3ecbaaeddfc5da10659f517ddb1885a6a9eeec1 /doc/lispref/modes.texi
parentdd6f2a637de3c4e91a2633e06344b6a0e3bbac70 (diff)
downloademacs-61086eb66b6a222124f302c197e14021711d29d3.tar.gz
Document inhibit-local-variables-regexps in the lispref.
* doc/lispref/modes.texi (Auto Major Mode): * doc/lispref/variables.texi (File Local Variables): Mention inhibit-local-variables-regexps. * etc/NEWS: Markup.
Diffstat (limited to 'doc/lispref/modes.texi')
-rw-r--r--doc/lispref/modes.texi12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index 5d09b79748e..b3aac231d5b 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -588,6 +588,18 @@ Chosen, emacs, The GNU Emacs Manual}. If @code{enable-local-variables}
is @code{nil}, @code{set-auto-mode} does not check the @w{@samp{-*-}}
line, or near the end of the file, for any mode tag.
+@vindex inhibit-local-variables-regexps
+There are some file types where it is not appropriate to scan the file
+contents for a mode specifier. For example, a tar archive may happen to
+contain, near the end of the file, a member file that has a local
+variables section specifying a mode for that particular file. This
+should not be applied to the containing tar file. Similarly, a tiff
+image file might just happen to contain a first line that seems to
+match the @w{@samp{-*-}} pattern. For these reasons, both these file
+extensions are members of the list @var{inhibit-local-variables-regexps}.
+Add patterns to this list to prevent Emacs searching them for local
+variables of any kind (not just mode specifiers).
+
If @var{keep-mode-if-same} is non-@code{nil}, this function does not
call the mode command if the buffer is already in the proper major
mode. For instance, @code{set-visited-file-name} sets this to