]> git.lyx.org Git - lyx.git/blobdiff - lib/scripts/prefs2prefs_lfuns.py
Merge branch 'master' of git.lyx.org:lyx
[lyx.git] / lib / scripts / prefs2prefs_lfuns.py
index f188f7f40774637733bb658fe666b8e6afc61859..1295a7dc308576d99249a38d9072181d6a8a23bc 100644 (file)
@@ -47,7 +47,7 @@ def next_inset_toggle(line):
 
 
 def optional_insert(line):
-       return simple_renaming(line, "argument-insert", "optional-insert")
+       return simple_renaming(line, "optional-insert", "argument-insert")
 
 
 re_nm = re.compile(r'^(.*)notes-mutate\s+(\w+)\s+(\w+)(.*)$')
@@ -134,6 +134,17 @@ def paragraph_spacing(line):
 def tabular_feature(line):
        return simple_renaming(line, "tabular-feature", "inset-modify tabular")
 
+re_Bar2bar = re.compile(r'^(\\(?:bind|unbind))\s+"([^"]*)Bar"(\s+"[^"]+")')
+def Bar2bar(line):
+       m = re_Bar2bar.search(line)
+       if not m:
+               return no_match
+
+       btype = m.group(1)
+       mod = m.group(2)
+       rest = m.group(3)
+       newline = btype + " \"" + mod + "bar\"" + rest
+       return (True, newline)
 
 #
 #
@@ -143,7 +154,7 @@ def tabular_feature(line):
 # Conversion chain
 
 conversions = [
-       [ # this will be a long list of conversions for format 0
+       [  1, [ # this will be a long list of conversions to format 1
                next_inset_toggle,
                next_inset_modify,
                optional_insert,
@@ -152,7 +163,8 @@ conversions = [
                line_insert,
                toc_insert,
                paragraph_spacing,
-               tabular_feature
-       ] # end conversions for format 0
+               tabular_feature,
+               Bar2bar
+       ]],
 ]