update ROOT files as well: treated like .thy in Isabelle/jEdit;
authorwenzelm
Thu, 08 Nov 2018 22:02:07 +0100
changeset 69271 4cb70e7e36b9
parent 69270 15463f546ee0
child 69272 15e9ed5b28fb
update ROOT files as well: treated like .thy in Isabelle/jEdit;
src/Pure/Tools/update_cartouches.scala
--- a/src/Pure/Tools/update_cartouches.scala	Thu Nov 08 21:36:12 2018 +0100
+++ b/src/Pure/Tools/update_cartouches.scala	Thu Nov 08 22:02:07 2018 +0100
@@ -91,8 +91,8 @@
   Options are:
     -t           replace @{text} antiquotations within text tokens
 
-  Recursively find .thy files and update theory syntax to use cartouches
-  instead of old-style {* verbatim *} or `alt_string` tokens.
+  Recursively find .thy or ROOT files and update theory syntax to use
+  cartouches instead of old-style {* verbatim *} or `alt_string` tokens.
 
   Old versions of files are preserved by appending "~~".
 """,
@@ -103,7 +103,8 @@
 
       for {
         spec <- specs
-        file <- File.find_files(Path.explode(spec).file, file => file.getName.endsWith(".thy"))
+        file <- File.find_files(Path.explode(spec).file,
+          file => file.getName.endsWith(".thy") || file.getName == "ROOT")
       } update_cartouches(replace_text, File.path(file))
     })
 }