From: Glenn Morris <rgm@gnu.org>
To: PEDRO ANDRES ARANDA GUTIERREZ <pedroa.aranda@telefonica.com>
Cc: 22166@debbugs.gnu.org
Subject: bug#22166: 24.5; Mixing up Local Variables declarations
Date: Mon, 14 Dec 2015 11:57:19 -0500 [thread overview]
Message-ID: <sxfuz5otn4.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <5EF560DE-459F-44D9-A400-1EB96FF1218C@telefonica.com> (PEDRO ANDRES ARANDA GUTIERREZ's message of "Mon, 14 Dec 2015 12:30:04 +0000")
PEDRO ANDRES ARANDA GUTIERREZ wrote:
> <--- cut here
> #include <stdio.h>
>
> int main(int argc,char **argv)
> {
> printf("\
> %%%% Local Variables:\n\
> %%%% mode: LaTeX\n\
> %%%% TeX-PDF-mode: t\n\
> %%%% TeX-master: \"main\"\n\
> %%%% End:\n\
> ")
> }
> <--- cut here
>
> The mode is changed from C mode to LaTEX mode and that should not
> happen.
That's the correct, documented behavior (see "set-auto-mode" in the
Elisp manual). Local Variables lines may have prefixes and suffixes, and
"mode:" override auto-mode-alist. You'll have to disguise the Local
Variables section if you don't want Emacs to act on it in this case. Eg
you could write it out in two chunks, or simply add
/*
^L
/*
at the very end of the file, since Emacs only searches in the last
"page" for Local Variables.
next prev parent reply other threads:[~2015-12-14 16:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-14 12:30 bug#22166: 24.5; Mixing up Local Variables declarations PEDRO ANDRES ARANDA GUTIERREZ
2015-12-14 16:57 ` Glenn Morris [this message]
2015-12-15 11:48 ` PEDRO ANDRES ARANDA GUTIERREZ
2015-12-17 2:01 ` Glenn Morris
2015-12-17 6:29 ` PEDRO ANDRES ARANDA GUTIERREZ
2015-12-19 10:39 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sxfuz5otn4.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=22166@debbugs.gnu.org \
--cc=pedroa.aranda@telefonica.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.