On Fri, 9 Jan 2004, Christian Ridderström wrote:

> Simple solution: Add a message to the beginning of .lyx/preferences 
> saying something like "edit at your own risk".

Oh, I just noticed that it contains this text already:

# This file is written by LyX, if you want to make your own
# modifications you should do them from inside LyX and save

The text looks a bit 'cut off' though at the end... some snooping reveals 
it's because of formatting of the source code in src/lyxrc.C - silly...

Anyway, going with Lars' dictatorial DO NOT EDIT, how about the 
attached patch? (the message is slightly different, and I'm not 100% 
sure that putting a '\' at the end of a line is standard).

/Christian

-- 
Christian Ridderström                           http://www.md.kth.se/~chr
Index: lyxrc.C
===================================================================
RCS file: /cvs/lyx/lyx-devel/src/lyxrc.C,v
retrieving revision 1.162
diff -u -r1.162 lyxrc.C
--- lyxrc.C     2003/12/14 16:33:53     1.162
+++ lyxrc.C     2004/01/09 15:26:44
@@ -1067,19 +1067,21 @@
 
 void LyXRC::output(ostream & os) const
 {
-       os << "### This file is part of\n"
-          << "### ========================================================\n"
-          << "###          LyX, The Document Processor\n"
-          << "###\n"
-          << "###          Copyright 1995 Matthias Ettrich\n"
-          << "###          Copyright 1995-2001 The LyX Team.\n"
-          << "###\n"
-          << "### ========================================================\n"
-          << "\n"
-          << "# This file is written by LyX, if you want to make your own\n"
-          << "# modifications you should do them from inside LyX and save\n"
-          << "\n";
-
+       os << "\
+### This file is part of\n\
+### ==================================================================\n\
+###          LyX, The Document Processor\n\
+###\n\
+###          Copyright 1995 Matthias Ettrich\n\
+###          Copyright 1995-2001 The LyX Team.\n\
+###\n\
+### ==================================================================\n\
+\n\
+# This file contains user preferences. It is read during startup\n\
+# and overwritten when 'Save' is selected in the 'preferences dialog'.\n\
+# DO NOT EDIT THIS FILE - changes should me made from within Lyx.\n\
+\n";
+       
        // Why the switch you might ask. It is a trick to ensure that all
        // the elements in the LyXRCTags enum is handled. As you can see
        // there are no breaks at all. So it is just a huge fall-through.

Reply via email to