[LyX/master] Recognize legacy special char names

Juergen Spitzmueller <[email protected]>
Newsgroups gmane.editors.lyx.cvs
Message-ID <[email protected]>
commit 67fa19a22447da4971a3059dbabc19dcb378a06a
Author: Juergen Spitzmueller <[email protected]>
Date:   Thu Apr 2 15:05:55 2026 +0200

    Recognize legacy special char names
---
 src/Text.cpp | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/src/Text.cpp b/src/Text.cpp
index 4bf82958f1..d38f7be132 100644
--- a/src/Text.cpp
+++ b/src/Text.cpp
@@ -6705,7 +6705,28 @@ bool Text::getStatus(Cursor & cur, FuncRequest const & cmd,
 		allow_in_passthru = true;
 		break;
 	case LFUN_SPECIALCHAR_INSERT: {
-		string const arg = cmd.getArg(0);
+		string arg = cmd.getArg(0);
+		// backwards compatibility
+		if (arg == "hyphenation")
+			arg = "softhyphen";
+		else if (arg == "ligature-break")
+			arg = "ligaturebreak";
+		else if (arg == "slash")
+			arg = "breakableslash";
+		else if (arg == "dots")
+			arg = "ldots";
+		else if (arg == "end-of-sentence")
+			arg = "endofsentence";
+		else if (arg == "menu-separator")
+			arg = "menuseparator";
+		else if (arg == "lyx")
+			arg = "LyX";
+		else if (arg == "tex")
+			arg = "TeX";
+		else if (arg == "latex")
+			arg = "LaTeX";
+		else if (arg == "latex2e")
+			arg = "LaTeX2e";
 		code = SPECIALCHAR_CODE;
 		enable = cur.buffer()->params().documentClass().isKnownSpecialChar(arg)
 			|| (cur.inTexted() && const_cast<Language*>(cur.current_font.language())->isKnownSpecialChar(arg));
-- 
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.