diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-05-11 07:54:19 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-05-11 07:54:19 +0000 |
commit | 37442d52629699d89ef62d315d35efbc0facec21 (patch) | |
tree | 9a628dce9299a88717fc402055910fb432a0b326 /opcode.pl | |
parent | 24801a4b9a14a56208916a537c4c237993c25186 (diff) | |
download | perl-37442d52629699d89ef62d315d35efbc0facec21.tar.gz |
Include vim/emacs modelines in generated files to open them
in read-only mode. Make vi modelines compatible with non-vim
vi versions.
p4raw-id: //depot/perl@24445
Diffstat (limited to 'opcode.pl')
-rwxr-xr-x | opcode.pl | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -37,7 +37,8 @@ while (<DATA>) { $i = 0; print <<"END"; -/* +/* -*- buffer-read-only: t -*- + * * opcode.h * * Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, @@ -61,7 +62,8 @@ print <<"END"; END print ON <<"END"; -/* +/* -*- buffer-read-only: t -*- + * * opnames.h * * Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, by Larry Wall and others @@ -136,7 +138,6 @@ print <<END; END_EXTERN_C #endif /* !PERL_GLOBAL_STRUCT_INIT */ - END # Emit function declarations. @@ -300,6 +301,9 @@ if (keys %OP_IS_FILETEST) { print ON ")\n\n"; } +print OC "/* ex: set ro: */\n"; +print ON "/* ex: set ro: */\n"; + close OC or die "Error closing opcode.h: $!"; close ON or die "Error closing opnames.h: $!"; @@ -318,7 +322,8 @@ open PPSYM, ">$pp_sym_new" or die "Error creating $pp_sym_new: $!"; binmode PPSYM; print PP <<"END"; -/* !!!!!!! DO NOT EDIT THIS FILE !!!!!!! +/* -*- buffer-read-only: t -*- + !!!!!!! DO NOT EDIT THIS FILE !!!!!!! This file is built by opcode.pl from its data. Any changes made here will be lost! */ @@ -326,6 +331,7 @@ print PP <<"END"; END print PPSYM <<"END"; +# -*- buffer-read-only: t -*- # # !!!!!!! DO NOT EDIT THIS FILE !!!!!!! # This file is built by opcode.pl from its data. Any changes made here @@ -349,6 +355,8 @@ for (@ops) { print PP "PERL_PPDEF(Perl_pp_$_)\n"; print PPSYM "Perl_pp_$_\n"; } +print PP "\n/* ex: set ro: */\n"; +print PPSYM "\n# ex: set ro:\n"; close PP or die "Error closing pp_proto.h: $!"; close PPSYM or die "Error closing pp.sym: $!"; |