GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Perl::Critic::Policy::Editor::RequireEmacsFileVariables(3) User Contributed Perl Documentation Perl::Critic::Policy::Editor::RequireEmacsFileVariables(3)

Perl::Critic::Policy::Editor::RequireEmacsFileVariables - Per-file editor settings.

This policy is part of Perl::Critic::More, a bleeding edge supplement to Perl::Critic.

Many text editors know how to find magic strings in files that indicate settings that work best for that file. For example, the file can indicate that it expects four-character indentation.

In emacs, this magic string is called "File Variables". There are two syntaxes: "-*- ... -*-" (single-line) and "Local Variables:\n...\nEnd:" (multi-line). Both syntaxes allow leading and trailing text on the line.

The single-line syntax must be used on the first line of the file to be recognized, or on the second line if the first line is a shebang. The following examples are explicitly allowed by Perl:

   #!perl -w -*- cperl -*-
   #!perl -w # -*- cperl -*-
   #!perl # -*- cperl -*-

The multi-line syntax must be used "in the last page" (that is, after the last formfeed) at the end of the file. As of Emacs21, the "end of the file" is hard-coded to be the last 3000 bytes of the file (in the hack-local-variables function in files.el). In this syntax, each line must begin and end with the same prefix/suffix pair. That pair is defined by the text before and after the "Local Variables:" string.

Perl::Critic::Policy::Editor::RequireViModeline

<http://www.gnu.org/software/emacs/manual/html_node/File-Variables.html>

In Emacs, you can view the "File Variables" info node by typing: "Help-key", "i", "g", "(emacs)File Variables" (where "Help-key" is often "C-h" or "F1".)

Alternatively, you can execute the following elisp: (info "(emacs)File Variables")

Chris Dolan <cdolan@cpan.org>

Michael Wolf <MichaelRWolf@att.net>

Copyright (c) 2006-2008 Chris Dolan

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module.

2022-04-09 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.