Skip to content

Commit

Permalink
Replace common Emacs file-local variables with dir-locals
Browse files Browse the repository at this point in the history
An empty cpan/.dir-locals.el stops Emacs using the core defaults for
code imported from CPAN.

Committer's work:

To keep t/porting/cmp_version.t and t/porting/utils.t happy, $VERSION needed
to be incremented in many files, including throughout dist/PathTools.

perldelta entry for module updates.

Add two Emacs control files to MANIFEST; re-sort MANIFEST.

For: RT #124119.
  • Loading branch information
ilmari authored and jkeenan committed Mar 23, 2015
1 parent 5390239 commit abec5be
Show file tree
Hide file tree
Showing 107 changed files with 43 additions and 539 deletions.
5 changes: 5 additions & 0 deletions .dir-locals.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
;; Default settings for all except cpan/
((nil . ((indent-tabs-mode . nil))) ; all modes
(cperl-mode . ((cperl-indent-level 4)))
(c-mode . ((c-indentation-style . bsd)
(c-basic-offset . 4))))
2 changes: 2 additions & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,7 @@ cpan/Digest/t/digest.t See if Digest extensions work
cpan/Digest/t/file.t See if Digest extensions work
cpan/Digest/t/lib/Digest/Dummy.pm See if Digest extensions work
cpan/Digest/t/security.t See if Digest extensions work
cpan/.dir-locals.el Emacs control file
cpan/Encode/bin/enc2xs Encode module generator
cpan/Encode/bin/encguess guess character encodings of files
cpan/Encode/bin/piconv iconv by perl
Expand Down Expand Up @@ -2852,6 +2853,7 @@ Cross/warp Cross-compilation
cv.h Code value header
cygwin/cygwin.c Additional code for Cygwin port
deb.c Debugging routines
.dir-locals.el Emacs control file
dist/Attribute-Handlers/Changes Attribute::Handlers
dist/Attribute-Handlers/demo/demo2.pl Attribute::Handlers demo
dist/Attribute-Handlers/demo/demo3.pl Attribute::Handlers demo
Expand Down
5 changes: 0 additions & 5 deletions Porting/bisect-runner.pl
Original file line number Diff line number Diff line change
Expand Up @@ -3495,9 +3495,4 @@ sub apply_fixups {
}
}
# Local variables:
# cperl-indent-level: 4
# indent-tabs-mode: nil
# End:
#
# ex: set ts=8 sts=4 sw=4 et:
5 changes: 0 additions & 5 deletions Porting/bisect.pl
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,4 @@ END
=cut

# Local variables:
# cperl-indent-level: 4
# indent-tabs-mode: nil
# End:
#
# ex: set ts=8 sts=4 sw=4 et:
5 changes: 0 additions & 5 deletions Porting/new-perldelta.pl
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,4 @@

notify_success();

# Local variables:
# cperl-indent-level: 4
# indent-tabs-mode: nil
# End:
#
# ex: set ts=8 sts=4 sw=4 et:
5 changes: 0 additions & 5 deletions Porting/pod_lib.pl
Original file line number Diff line number Diff line change
Expand Up @@ -665,9 +665,4 @@ sub get_pod_metadata {

1;

# Local variables:
# cperl-indent-level: 4
# indent-tabs-mode: nil
# End:
#
# ex: set ts=8 sts=4 sw=4 et:
5 changes: 0 additions & 5 deletions Porting/pod_rules.pl
Original file line number Diff line number Diff line change
Expand Up @@ -225,9 +225,4 @@ sub do_unix {
process($_, $Build{$_}, main->can("do_$_"), $Test && ++$test, $Verbose)
foreach sort keys %Build;

# Local variables:
# cperl-indent-level: 4
# indent-tabs-mode: nil
# End:
#
# ex: set ts=8 sts=4 sw=4 et:
6 changes: 0 additions & 6 deletions XSUB.h
Original file line number Diff line number Diff line change
Expand Up @@ -714,11 +714,5 @@ Rethrows a previously caught exception. See L<perlguts/"Exception Handling">.
#endif /* _INC_PERL_XSUB_H */ /* include guard */

/*
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*
* ex: set ts=8 sts=4 sw=4 et:
*/
6 changes: 0 additions & 6 deletions av.c
Original file line number Diff line number Diff line change
Expand Up @@ -1022,11 +1022,5 @@ Perl_av_iter_p(pTHX_ AV *av) {
}

/*
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*
* ex: set ts=8 sts=4 sw=4 et:
*/
6 changes: 0 additions & 6 deletions av.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,5 @@ Perl equivalent: C<my @array;>.
#define newAV() MUTABLE_AV(newSV_type(SVt_PVAV))

/*
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*
* ex: set ts=8 sts=4 sw=4 et:
*/
6 changes: 0 additions & 6 deletions caretx.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,5 @@ Perl_set_caret_X(pTHX) {
}

/*
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*
* ex: set ts=8 sts=4 sw=4 et:
*/
6 changes: 0 additions & 6 deletions cop.h
Original file line number Diff line number Diff line change
Expand Up @@ -1266,11 +1266,5 @@ See L<perlcall/LIGHTWEIGHT CALLBACKS>.
multicall_cop = CvSTART(cv); \
} STMT_END
/*
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*
* ex: set ts=8 sts=4 sw=4 et:
*/
2 changes: 2 additions & 0 deletions cpan/.dir-locals.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
;; Empty file to avoid imposing the defaults from the parent directory
;; on code imported from CPAN
6 changes: 0 additions & 6 deletions cv.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,5 @@ typedef OP *(*Perl_call_checker)(pTHX_ OP *, GV *, SV *);
#endif

/*
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*
* ex: set ts=8 sts=4 sw=4 et:
*/
6 changes: 0 additions & 6 deletions deb.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,5 @@ Perl_deb_stack_all(pTHX)
}

/*
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*
* ex: set ts=8 sts=4 sw=4 et:
*/
2 changes: 1 addition & 1 deletion dist/PathTools/Cwd.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use strict;
use Exporter;
use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION);

$VERSION = '3.55';
$VERSION = '3.56';
my $xs_version = $VERSION;
$VERSION =~ tr/_//;

Expand Down
6 changes: 0 additions & 6 deletions dist/PathTools/Cwd.xs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
/*
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*
* ex: set ts=8 sts=4 sw=4 et:
*/

Expand Down
2 changes: 1 addition & 1 deletion dist/PathTools/lib/File/Spec.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package File::Spec;
use strict;
use vars qw(@ISA $VERSION);

$VERSION = '3.55';
$VERSION = '3.56';
$VERSION =~ tr/_//;

my %module = (MacOS => 'Mac',
Expand Down
2 changes: 1 addition & 1 deletion dist/PathTools/lib/File/Spec/Cygwin.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use strict;
use vars qw(@ISA $VERSION);
require File::Spec::Unix;

$VERSION = '3.55';
$VERSION = '3.56';
$VERSION =~ tr/_//;

@ISA = qw(File::Spec::Unix);
Expand Down
2 changes: 1 addition & 1 deletion dist/PathTools/lib/File/Spec/Epoc.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package File::Spec::Epoc;
use strict;
use vars qw($VERSION @ISA);

$VERSION = '3.55';
$VERSION = '3.56';
$VERSION =~ tr/_//;

require File::Spec::Unix;
Expand Down
2 changes: 1 addition & 1 deletion dist/PathTools/lib/File/Spec/Functions.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use strict;

use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);

$VERSION = '3.55';
$VERSION = '3.56';
$VERSION =~ tr/_//;

require Exporter;
Expand Down
2 changes: 1 addition & 1 deletion dist/PathTools/lib/File/Spec/Mac.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use strict;
use vars qw(@ISA $VERSION);
require File::Spec::Unix;

$VERSION = '3.55';
$VERSION = '3.56';
$VERSION =~ tr/_//;

@ISA = qw(File::Spec::Unix);
Expand Down
2 changes: 1 addition & 1 deletion dist/PathTools/lib/File/Spec/OS2.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use strict;
use vars qw(@ISA $VERSION);
require File::Spec::Unix;

$VERSION = '3.55';
$VERSION = '3.56';
$VERSION =~ tr/_//;

@ISA = qw(File::Spec::Unix);
Expand Down
2 changes: 1 addition & 1 deletion dist/PathTools/lib/File/Spec/Unix.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package File::Spec::Unix;
use strict;
use vars qw($VERSION);

$VERSION = '3.55';
$VERSION = '3.56';
my $xs_version = $VERSION;
$VERSION =~ tr/_//;

Expand Down
2 changes: 1 addition & 1 deletion dist/PathTools/lib/File/Spec/VMS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use strict;
use vars qw(@ISA $VERSION);
require File::Spec::Unix;

$VERSION = '3.55';
$VERSION = '3.56';
$VERSION =~ tr/_//;

@ISA = qw(File::Spec::Unix);
Expand Down
2 changes: 1 addition & 1 deletion dist/PathTools/lib/File/Spec/Win32.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use strict;
use vars qw(@ISA $VERSION);
require File::Spec::Unix;

$VERSION = '3.55';
$VERSION = '3.56';
$VERSION =~ tr/_//;

@ISA = qw(File::Spec::Unix);
Expand Down
6 changes: 0 additions & 6 deletions doio.c
Original file line number Diff line number Diff line change
Expand Up @@ -2583,11 +2583,5 @@ Perl_vms_start_glob
}

/*
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*
* ex: set ts=8 sts=4 sw=4 et:
*/
6 changes: 0 additions & 6 deletions doop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1276,11 +1276,5 @@ Perl_do_kv(pTHX)
}

/*
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*
* ex: set ts=8 sts=4 sw=4 et:
*/
6 changes: 0 additions & 6 deletions dosish.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,11 +184,5 @@
#define PERL_NO_DEV_RANDOM

/*
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*
* ex: set ts=8 sts=4 sw=4 et:
*/
6 changes: 0 additions & 6 deletions dquote_static.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,11 +344,5 @@ S_form_short_octal_warning(pTHX_
}

/*
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*
* ex: set ts=8 sts=4 sw=4 et:
*/
6 changes: 0 additions & 6 deletions dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -2599,11 +2599,5 @@ Perl_debprofdump(pTHX)


/*
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*
* ex: set ts=8 sts=4 sw=4 et:
*/
8 changes: 1 addition & 7 deletions ext/ExtUtils-Miniperl/lib/ExtUtils/Miniperl.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use vars qw($VERSION @ISA @EXPORT);

@ISA = qw(Exporter);
@EXPORT = qw(writemain);
$VERSION = '1.04';
$VERSION = '1.05';

# blead will run this with miniperl, hence we can't use autodie or File::Temp
my $temp;
Expand Down Expand Up @@ -249,10 +249,4 @@ L<ExtUtils::MakeMaker>
=cut
# Local variables:
# c-indentation-style: bsd
# c-basic-offset: 4
# indent-tabs-mode: nil
# End:
#
# ex: set ts=8 sts=4 sw=4 et:
2 changes: 1 addition & 1 deletion ext/PerlIO-mmap/mmap.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package PerlIO::mmap;
use strict;
use warnings;
our $VERSION = '0.013';
our $VERSION = '0.014';

use XSLoader;
XSLoader::load(__PACKAGE__, __PACKAGE__->VERSION);
Expand Down
6 changes: 0 additions & 6 deletions ext/PerlIO-mmap/mmap.xs
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
/*
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*
* ex: set ts=8 sts=4 sw=4 et:
*/

Expand Down
3 changes: 0 additions & 3 deletions ext/XS-APItest/core_or_not.inc
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ CAT2(sv_setsv_cow_hashkey_, SUFFIX) () {
/*
* Local variables:
* mode: c
* c-indentation-style: bsd
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*
* ex: set ts=8 sts=4 sw=4 et:
Expand Down
2 changes: 1 addition & 1 deletion ext/attributes/attributes.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package attributes;

our $VERSION = 0.26;
our $VERSION = 0.27;

@EXPORT_OK = qw(get reftype);
@EXPORT = ();
Expand Down
6 changes: 0 additions & 6 deletions ext/attributes/attributes.xs
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,5 @@ usage:

XSRETURN(1);
/*
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*
* ex: set ts=8 sts=4 sw=4 et:
*/
Loading

0 comments on commit abec5be

Please sign in to comment.