]>
git.proxmox.com Git - ceph.git/blob - ceph/src/script/fix_modeline.pl
6 my $header = `cat doc
/modeline
.txt
`;
8 # strip existing modeline
10 $new =~ s/^\/\/ \-\*\- ([^\n]+) \-\*\-([^\n]*)\n//s; # emacs
11 $new =~ s/^\/\/ vim: ([^\n]*)\n//s; # vim;
12 $new =~ s/^\/\/ \-\*\- ([^\n]+) \-\*\-([^\n]*)\n//s; # emacs
13 $new =~ s/^\/\/ vim: ([^\n]*)\n//s; # vim;
14 $new =~ s/^\/\/ \-\*\- ([^\n]+) \-\*\-([^\n]*)\n//s; # emacs
15 $new =~ s/^\/\/ vim: ([^\n]*)\n//s; # vim;
18 $new = $header . $new;
25 system "diff $fn $fn.new";
26 rename "$fn.new", $fn;