>>>>> "edscott" == edscott  <[EMAIL PROTECTED]> writes:

edscott> 2000-06-26 edscott <[EMAIL PROTECTED]>

edscott>        * lyxrc.C (LyXRC::read): Set variable use_keymap to
edscott> false if the file specified in lyxrc file cannot be read.

I checked in a slightly different version, which uses LibFileSearch(),
works for secondary keymap too and just ignores the entry if it is
wrong. I append the patch for reference.

JMarc

Index: src/lyxrc.C
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxrc.C,v
retrieving revision 1.43.2.1
diff -u -r1.43.2.1 lyxrc.C
--- src/lyxrc.C 2000/06/26 15:13:50     1.43.2.1
+++ src/lyxrc.C 2000/06/27 15:41:51
@@ -471,15 +471,23 @@
                        break;
                        
                case RC_KBMAP_PRIMARY:
-                       if (lexrc.next())
-                               primary_kbmap = lexrc.GetString();
+                       if (lexrc.next()) 
+                               if (!LibFileSearch("kbd", lexrc.GetString(), 
+                                                  "kmap").empty()) 
+                                       primary_kbmap = lexrc.GetString();
+                               else 
+                                       lexrc.printError("LyX: Keymap `$$Token' not 
+found");
                        break;
                        
                case RC_KBMAP_SECONDARY:
-                       if (lexrc.next())
-                               secondary_kbmap = lexrc.GetString();
+                       if (lexrc.next()) 
+                               if (!LibFileSearch("kbd", lexrc.GetString(), 
+                                                  "kmap").empty()) 
+                                       secondary_kbmap = lexrc.GetString();
+                               else 
+                                       lexrc.printError("LyX: Keymap `$$Token' not 
+found");
                        break;
-                       
+                                               
                case RC_FONT_ENCODING:
                        if (lexrc.next())
                                fontenc = lexrc.GetString();

Reply via email to