4

I have the following text:

Local Variables:
eval: (face-remap-add-relative 'default :family "AR PL KaitiM GB" :foundry "ARPH")
End:

In my document as a code sample. However, whenever I open the document, Emacs reads these lines as file-local variables and tries to apply them... They are neither the first nor the last in the document.

Any trick to prevent Emacs from parsing them?

YoungFrog
  • 3,496
  • 15
  • 27
David S.
  • 395
  • 2
  • 13
  • 1
    I have edited the terminology. The "mode line" is the information at the bottom of each window. These are "file-local variables". They need not be at the end of the file (they usually are, but only by convention). They can be in the first line of the file, but in a quite different format. – phils Jun 28 '16 at 02:54
  • I've retracted my duplicate vote, as YoungFrog's answer provides a solution. [How comment out a variable line in a local variable list](http://emacs.stackexchange.com/questions/15253) is a related question, but not the same thing. – phils Jun 28 '16 at 14:02

1 Answers1

4

If the format of your file allows it, you can use a new page character (insert it with C-q C-l on its own line). Why it works is explained in the manual (info "(emacs) Specifying File Variables"). The relevant bit is quoted here:

Apart from using a ‘-*-’ line, you can define file local variables using a “local variables list” near the end of the file. The start of the local variables list should be no more than 3000 characters from the end of the file, and must be on the last page if the file is divided into pages.

YoungFrog
  • 3,496
  • 15
  • 27