[LyX/master] Python fixes from José Matos

2023-08-19 Thread Scott Kostyshak
commit 677dc3b7a6792b3a07c2f7f33ed06aa173d55308
Author: Scott Kostyshak 
Date:   Sat Aug 19 21:32:41 2023 -0400

Python fixes from José Matos

See here:

  
https://www.mail-archive.com/search?l=mid=a7960223ee91696e916b281d1d9fc55df10a9480.camel%40gmail.com

Description from José pasted below:

  Functions `length_in_bp` and `revert_flex_inset` have an error in a
  (almost) never used path. The reason why this was never triggered is
  because this is part of the code where we try all the best efforts
  to recover from an ill-formed LyX file.

  The problem is that the functions call the `document` variable to
  issue an warning if the file does not follow the usual structure.
  The simple fix is to add that variable (as the first for the
  functions) and to add them at all the places where the functions are
  called.

  For reference this code was introduced by Georg (Baum) more than 8
  years ago and it was never reported. So the issue is not urgent in
  any meaningful way. :-)

  In `lyx2lyx/lyx_2_0.py`, in the function `revert_nameref`, there is
  a call to the document variable. The same as all the above.

  In `lyx2lyx/lyx_2_4.py`, in the `class fontmapping`. Similar to the
  above but now for error.
---
 lib/lyx2lyx/lyx_1_2.py |4 ++--
 lib/lyx2lyx/lyx_2_0.py |4 ++--
 lib/lyx2lyx/lyx_2_3.py |2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/lyx2lyx/lyx_1_2.py b/lib/lyx2lyx/lyx_1_2.py
index ae082a7..e091b3b 100644
--- a/lib/lyx2lyx/lyx_1_2.py
+++ b/lib/lyx2lyx/lyx_1_2.py
@@ -745,8 +745,8 @@ def update_longtables(document):
 for j in range(rows):
 i = find_token(body, ' end:
-document.warning("Can't find end of inset at line " + str(nb))
+document.warning("Can't find end of inset at line " + str(ne))
 ns += 1
 continue
   if document.body[ne + 1] == "":
diff --git a/lib/lyx2lyx/lyx_2_3.py b/lib/lyx2lyx/lyx_2_3.py
index 69b2aba..5e330ed 100644
--- a/lib/lyx2lyx/lyx_2_3.py
+++ b/lib/lyx2lyx/lyx_2_3.py
@@ -1427,7 +1427,7 @@ def revert_multibib(document):
 }
 
 if multibib not in units.keys():
-document.warning("Unknown multibib value `%s'!" % nultibib)
+document.warning("Unknown multibib value `%s'!" % multibib)
 return
 unit = units[multibib]
 btunit = False
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs


[LyX/2.3.x] typo

2023-08-19 Thread Juergen Spitzmueller
commit 2d1df3140e79082b6ebe0cee153c60a046aaabf7
Author: Juergen Spitzmueller 
Date:   Sat Aug 19 12:06:48 2023 +0200

typo
---
 status.23x |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/status.23x b/status.23x
index 33e7dc6..48120d7 100644
--- a/status.23x
+++ b/status.23x
@@ -45,7 +45,7 @@ What's new
 * DOCUMENT INPUT/OUTPUT
 
 - Fix leaking of linespace settings between paragraphs if they have
-  different aligment (bug 12638).
+  different alignment (bug 12638).
   
 - Do not load mathrsfs if unicode-math is required (bug 12734).
 
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs