Skip to content
Permalink
Browse files

make tidy now reindents all fortran 90 files with emacs

  • Loading branch information
Christian Meisenbichler
Christian Meisenbichler committed Jul 7, 2011
1 parent b6cc735 commit 27300285a7bdfa98fd2c7b9c4be5e45be93075e5
Showing with 15 additions and 14 deletions.
  1. +11 −0 utilities/emacs-format-file
  2. +4 −14 utilities/scripts/prettyprint.pl
@@ -0,0 +1,11 @@
;;; File: emacs-format-file
;;; Stan Warford
;;; 17 May 2006

(defun emacs-format-function ()
"Format the whole buffer."
(f90-mode)
(indent-region (point-min) (point-max) nil)
(untabify (point-min) (point-max))
(save-buffer)
)
@@ -14,21 +14,11 @@

foreach $file (@fileslist) {
$return = -1;
$command = "f90ppr < $file > ./pptmp";
$command = "emacs -batch $file -l $ENV{'PWD'}/../../utilities/emacs-format-file -f emacs-format-function ";
print $command , "\n";
$return = system $command;
print "return value ", $return, "\n";
if ( $return == 0 ) {
$diffcommand = "diff $file ./pptmp ";
$diff = `$diffcommand`;
print "diff is:", $diff, "\n";
if ( not( $diff eq "" ) ) {
$mvcommand = "mv ./pptmp $file";
print $mvcommand , "\n";
system $mvcommand;
}
else {
system "rm pptmp";
}

}
}


0 comments on commit 2730028

Please sign in to comment.
You can’t perform that action at this time.