]> git.lyx.org Git - lyx.git/blobdiff - lib/lyx2lyx/lyx_1_6.py
Collapsable -> Collapsible (part 1)
[lyx.git] / lib / lyx2lyx / lyx_1_6.py
index b5650e270b74d0afbdd9be6ba9f113f275ff61cc..071280836b670f61213117e800e25e9764eedaaa 100644 (file)
@@ -23,12 +23,7 @@ import unicodedata
 import sys, os
 
 from parser_tools import find_token, find_end_of, find_tokens, get_value
-
-# Provide support for both python 2 and 3
-PY2 = sys.version_info[0] == 2
-if not PY2:
-    unichr = chr
-# End of code to support for both python 2 and 3
+from unicode_symbols import read_unicodesymbols
 
 ####################################################################
 # Private helper functions
@@ -151,9 +146,18 @@ def set_option(document, m, option, value):
     return l
 
 
-# FIXME: Use the version in unicode_symbols.py which has some bug fixes
-def read_unicodesymbols():
+# FIXME: Remove this function if the version imported from unicode_symbols works.
+# This function was the predecessor from that function, that in the meanwhile got
+# new fixes.
+def read_unicodesymbols2():
     " Read the unicodesymbols list of unicode characters and corresponding commands."
+
+    # Provide support for both python 2 and 3
+    PY2 = sys.version_info[0] == 2
+    if not PY2:
+        unichr = chr
+    # End of code to support for both python 2 and 3
+
     pathname = os.path.abspath(os.path.dirname(sys.argv[0]))
     fp = open(os.path.join(pathname.strip('lyx2lyx'), 'unicodesymbols'))
     spec_chars = []
@@ -1109,7 +1113,7 @@ def revert_wrapfig_options(document):
 
 
 def convert_latexcommand_index(document):
-    "Convert from LatexCommand form to collapsable form."
+    "Convert from LatexCommand form to collapsible form."
     i = 0
     r1 = re.compile('name "(.*)"')
     while True:
@@ -1141,7 +1145,7 @@ def convert_latexcommand_index(document):
 
 
 def revert_latexcommand_index(document):
-    "Revert from collapsable form to LatexCommand form."
+    "Revert from collapsible form to LatexCommand form."
     i = 0
     while True:
         i = find_token(document.body, "\\begin_inset Index", i)