Per previous discussion, as a first step towards rationalizing this stuff. No lyx2lyx is necessary here, because font-code simply invoked texttt or mathtt as appropriate. Killing LFUN_FONT_NOUN etc will be more fun for that reason.

For those not privy to the earlier discussion, the rationale here is that such things ought to be replaced by character styles. We now have such a style for code in the logicalmkup module, and with this included one could bind a key to that charstyle if one wished.

Views? Shall I?

Richard

--
==================================================================
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==================================================================
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto

Index: src/lfuns.h
===================================================================
--- src/lfuns.h	(revision 20368)
+++ src/lfuns.h	(working copy)
@@ -199,7 +199,7 @@
 	LFUN_LAYOUT,
 	LFUN_LAYOUT_PARAGRAPH,
 	LFUN_DROP_LAYOUTS_CHOICE,       // used in bindings as of 20060905
-	LFUN_FONT_CODE,
+	LFUN_BUFFER_WRITE_ALL,           // rgh, gpothier 200707XX
 	// 125
 	LFUN_FONT_SANS,
 	LFUN_FONT_DEFAULT,
@@ -397,15 +397,14 @@
 	LFUN_CLEARDOUBLEPAGE_INSERT,     // Ugras 20061125
 	LFUN_LISTING_INSERT,             // Herbert 20011110, bpeng 20070502
 	LFUN_TOOLBAR_TOGGLE,             // Edwin 20070521
-	LFUN_BUFFER_WRITE_ALL,           // rgh, gpothier 200707XX
-	// 290
 	LFUN_PARAGRAPH_PARAMS,           // rgh, 200708XX
+	// 290
 	LFUN_LAYOUT_MODULES_CLEAR,       // rgh, 20070825
 	LFUN_LAYOUT_MODULE_ADD,          // rgh, 20070825
 	LFUN_LAYOUT_RELOAD,              // rgh, 20070903
 	LFUN_MASTER_BUFFER_VIEW,	       // Tommaso, 20070920
-	// 295
 	LFUN_MASTER_BUFFER_UPDATE,	     // Tommaso, 20070920
+	// 295
 
 	LFUN_LASTACTION                  // end of the table
 };
Index: src/LyXAction.cpp
===================================================================
--- src/LyXAction.cpp	(revision 20366)
+++ src/LyXAction.cpp	(working copy)
@@ -169,7 +169,6 @@
 		{ LFUN_FLOAT_WIDE_INSERT, "float-wide-insert", Noop },
 		{ LFUN_WRAP_INSERT, "wrap-insert", Noop },
 		{ LFUN_FONT_BOLD, "font-bold", Noop },
-		{ LFUN_FONT_CODE, "font-code", Noop },
 		{ LFUN_FONT_DEFAULT, "font-default", Noop },
 		{ LFUN_FONT_EMPH, "font-emph", Noop },
 		{ LFUN_FONT_FREE_APPLY, "font-free-apply", Noop },
Index: src/Text3.cpp
===================================================================
--- src/Text3.cpp	(revision 20364)
+++ src/Text3.cpp	(working copy)
@@ -1302,13 +1302,6 @@
 		break;
 	}
 
-	case LFUN_FONT_CODE: {
-		Font font(Font::ALL_IGNORE);
-		font.setFamily(Font::TYPEWRITER_FAMILY); // no good
-		toggleAndShow(cur, this, font);
-		break;
-	}
-
 	case LFUN_FONT_SANS: {
 		Font font(Font::ALL_IGNORE);
 		font.setFamily(Font::SANS_FAMILY);
@@ -1770,10 +1763,6 @@
 		flag.setOnOff(font.family() == Font::ROMAN_FAMILY);
 		return true;
 
-	case LFUN_FONT_CODE:
-		flag.setOnOff(font.family() == Font::TYPEWRITER_FAMILY);
-		return true;
-
 	case LFUN_CUT:
 	case LFUN_COPY:
 		enable = cur.selection();
Index: src/insets/InsetERT.cpp
===================================================================
--- src/insets/InsetERT.cpp	(revision 20364)
+++ src/insets/InsetERT.cpp	(working copy)
@@ -301,7 +301,6 @@
 		case LFUN_FLOAT_WIDE_INSERT:
 		case LFUN_WRAP_INSERT:
 		case LFUN_FONT_BOLD:
-		case LFUN_FONT_CODE:
 		case LFUN_FONT_DEFAULT:
 		case LFUN_FONT_EMPH:
 		case LFUN_FONT_FREE_APPLY:
Index: src/insets/InsetTabular.cpp
===================================================================
--- src/insets/InsetTabular.cpp	(revision 20364)
+++ src/insets/InsetTabular.cpp	(working copy)
@@ -3449,7 +3449,6 @@
 	case LFUN_FONT_NOUN:
 	case LFUN_FONT_ITAL:
 	case LFUN_FONT_FRAK:
-	case LFUN_FONT_CODE:
 	case LFUN_FONT_SANS:
 	case LFUN_FONT_FREE_APPLY:
 	case LFUN_FONT_FREE_UPDATE:
Index: src/mathed/InsetMathNest.cpp
===================================================================
--- src/mathed/InsetMathNest.cpp	(revision 20364)
+++ src/mathed/InsetMathNest.cpp	(working copy)
@@ -813,12 +813,6 @@
 		else
 			handleFont(cur, cmd.argument(), "mathrm");
 		break;
-	case LFUN_FONT_CODE:
-		if (currentMode() == TEXT_MODE)
-			handleFont(cur, cmd.argument(), "texttt");
-		else
-			handleFont(cur, cmd.argument(), "mathtt");
-		break;
 	case LFUN_FONT_FRAK:
 		handleFont(cur, cmd.argument(), "mathfrak");
 		break;
@@ -1043,7 +1037,6 @@
 	case LFUN_FONT_BOLD:
 	case LFUN_FONT_SANS:
 	case LFUN_FONT_EMPH:
-	case LFUN_FONT_CODE:
 	case LFUN_FONT_NOUN:
 	case LFUN_FONT_ROMAN:
 	case LFUN_FONT_DEFAULT:
Index: lib/bind/cua.bind
===================================================================
--- lib/bind/cua.bind	(revision 20367)
+++ lib/bind/cua.bind	(working copy)
@@ -60,7 +60,6 @@
 # used below for line-delete-forward
 #\bind "C-k"			"font-noun"		# 'k' for capitals
 \bind "C-u"			"font-underline"
-\bind "C-S-P"			"font-code"		# 'P' for program
 
 \bind "C-m"			"math-mode"
 \bind "C-S-M"			"math-display"

Reply via email to