[PATCH] tex_code_break_column cruft

2002-08-08 Thread John Levon


looks like there is no need for this at all. OK ?

regards
john


Index: buffer.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/buffer.C,v
retrieving revision 1.363
diff -u -r1.363 buffer.C
--- buffer.C7 Aug 2002 23:43:36 -   1.363
+++ buffer.C8 Aug 2002 21:00:44 -
 -145,9 +145,6 
 
 } // namespace anon
 
-extern int tex_code_break_column;
-
-
 Buffer::Buffer(string const  file, bool ronly)
: paragraph(0), niceFile(true), lyx_clean(true), bak_clean(true),
  unnamed(false), dep_clean(0), read_only(ronly),
 -2165,8 +2162,6 
 {
niceFile = nice; // this will be used by Insetincludes.
 
-   tex_code_break_column = lyxrc.ascii_linelen;
-
// validate the buffer.
lyxerr[Debug::LATEX]Validating buffer...  endl;
LaTeXFeatures features(params);
 -2191,9 +2186,7 
// usual is \batchmode and has a
// special input@path to allow the including of figures
// with either \input or \includegraphics (what figinsets do).
-   // batchmode is not set if there is a tex_code_break_column.
-   // In this case somebody is interested in the generated LaTeX,
-   // so this is OK. input@path is set when the actual parameter
+   // input@path is set when the actual parameter
// original_path is set. This is done for usual tex-file, but not
// for nice-latex-file. (Matthias 250696)
if (!only_body) {
 -2630,12 +2623,6 
 
// Just to be sure. (Asger)
texrow.newline();
-
-   // tex_code_break_column's value is used to decide
-   // if we are in batchmode or not (within mathed_write()
-   // in math_write.C) so we must set it to a non-zero
-   // value when we leave otherwise we save incorrect .lyx files.
-   tex_code_break_column = lyxrc.ascii_linelen;
 
lyxerr[Debug::INFO]  Finished making latex file.  endl;
lyxerr[Debug::INFO]  Row count was   texrow.rows()-1  .  endl;
Index: paragraph.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph.C,v
retrieving revision 1.214
diff -u -r1.214 paragraph.C
--- paragraph.C 7 Aug 2002 16:31:45 -   1.214
+++ paragraph.C 8 Aug 2002 21:00:50 -
 -54,7 +54,6 
 
 using lyx::pos_type;
 
-int tex_code_break_column = 72;  // needs non-zero initialization. set later.
 // this is a bad idea, but how can Paragraph find its buffer to get
 // parameters? (JMarc)
 
 -1188,7 +1187,7 
texrow.newline();
}
 
-   if (tex_code_break_column  style-isCommand()) {
+   if (style-isCommand()) {
os  '\n';
texrow.newline();
}
Index: paragraph_pimpl.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph_pimpl.C,v
retrieving revision 1.39
diff -u -r1.39 paragraph_pimpl.C
--- paragraph_pimpl.C   23 Jul 2002 21:03:37 -  1.39
+++ paragraph_pimpl.C   8 Aug 2002 21:00:52 -
 -31,9 +31,6 
 using std::upper_bound;
 using std::lower_bound;
 
-extern int tex_code_break_column;
-
-
 // Initialize static member.
 ShareContainerLyXFont Paragraph::Pimpl::FontTable::container;
 // Initialization of the counter for the paragraph id's,
 -249,7 +246,7 
   LyXLayout const  style)
 {
if (style.pass_thru) return;
-   if (column  tex_code_break_column
+   if (column  lyxrc.ascii_linelen
 i
 getChar(i - 1) != ' '
 (i  size() - 1)
 -263,13 +260,7 
 || getChar(i - 1) == '?'
 || getChar(i - 1) == ':'
 || getChar(i - 1) == '!'))) {
-   if (tex_code_break_column == 0) {
-   // in batchmode we need LaTeX to still
-   // see it as a space not as an extra '\n'
-   os   %\n;
-   } else {
-   os  '\n';
-   }
+   os  '\n';
texrow.newline();
texrow.start(owner_, i + 1);
column = 0;



Re: [PATCH] tex_code_break_column cruft

2002-08-08 Thread Lars Gullik Bjønnes

John Levon [EMAIL PROTECTED] writes:

| looks like there is no need for this at all. OK ?

To me? yes.


-- 
Lgb



[PATCH] tex_code_break_column cruft

2002-08-08 Thread John Levon


looks like there is no need for this at all. OK ?

regards
john


Index: buffer.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/buffer.C,v
retrieving revision 1.363
diff -u -r1.363 buffer.C
--- buffer.C7 Aug 2002 23:43:36 -   1.363
+++ buffer.C8 Aug 2002 21:00:44 -
@@ -145,9 +145,6 @@
 
 } // namespace anon
 
-extern int tex_code_break_column;
-
-
 Buffer::Buffer(string const & file, bool ronly)
: paragraph(0), niceFile(true), lyx_clean(true), bak_clean(true),
  unnamed(false), dep_clean(0), read_only(ronly),
@@ -2165,8 +2162,6 @@
 {
niceFile = nice; // this will be used by Insetincludes.
 
-   tex_code_break_column = lyxrc.ascii_linelen;
-
// validate the buffer.
lyxerr[Debug::LATEX] << "  Validating buffer..." << endl;
LaTeXFeatures features(params);
@@ -2191,9 +2186,7 @@
// usual is \batchmode and has a
// special input@path to allow the including of figures
// with either \input or \includegraphics (what figinsets do).
-   // batchmode is not set if there is a tex_code_break_column.
-   // In this case somebody is interested in the generated LaTeX,
-   // so this is OK. input@path is set when the actual parameter
+   // input@path is set when the actual parameter
// original_path is set. This is done for usual tex-file, but not
// for nice-latex-file. (Matthias 250696)
if (!only_body) {
@@ -2630,12 +2623,6 @@
 
// Just to be sure. (Asger)
texrow.newline();
-
-   // tex_code_break_column's value is used to decide
-   // if we are in batchmode or not (within mathed_write()
-   // in math_write.C) so we must set it to a non-zero
-   // value when we leave otherwise we save incorrect .lyx files.
-   tex_code_break_column = lyxrc.ascii_linelen;
 
lyxerr[Debug::INFO] << "Finished making latex file." << endl;
lyxerr[Debug::INFO] << "Row count was " << texrow.rows()-1 << "." << endl;
Index: paragraph.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph.C,v
retrieving revision 1.214
diff -u -r1.214 paragraph.C
--- paragraph.C 7 Aug 2002 16:31:45 -   1.214
+++ paragraph.C 8 Aug 2002 21:00:50 -
@@ -54,7 +54,6 @@
 
 using lyx::pos_type;
 
-int tex_code_break_column = 72;  // needs non-zero initialization. set later.
 // this is a bad idea, but how can Paragraph find its buffer to get
 // parameters? (JMarc)
 
@@ -1188,7 +1187,7 @@
texrow.newline();
}
 
-   if (tex_code_break_column && style->isCommand()) {
+   if (style->isCommand()) {
os << '\n';
texrow.newline();
}
Index: paragraph_pimpl.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph_pimpl.C,v
retrieving revision 1.39
diff -u -r1.39 paragraph_pimpl.C
--- paragraph_pimpl.C   23 Jul 2002 21:03:37 -  1.39
+++ paragraph_pimpl.C   8 Aug 2002 21:00:52 -
@@ -31,9 +31,6 @@
 using std::upper_bound;
 using std::lower_bound;
 
-extern int tex_code_break_column;
-
-
 // Initialize static member.
 ShareContainer Paragraph::Pimpl::FontTable::container;
 // Initialization of the counter for the paragraph id's,
@@ -249,7 +246,7 @@
   LyXLayout const & style)
 {
if (style.pass_thru) return;
-   if (column > tex_code_break_column
+   if (column > lyxrc.ascii_linelen
&& i
&& getChar(i - 1) != ' '
&& (i < size() - 1)
@@ -263,13 +260,7 @@
 || getChar(i - 1) == '?'
 || getChar(i - 1) == ':'
 || getChar(i - 1) == '!'))) {
-   if (tex_code_break_column == 0) {
-   // in batchmode we need LaTeX to still
-   // see it as a space not as an extra '\n'
-   os << " %\n";
-   } else {
-   os << '\n';
-   }
+   os << '\n';
texrow.newline();
texrow.start(owner_, i + 1);
column = 0;



Re: [PATCH] tex_code_break_column cruft

2002-08-08 Thread Lars Gullik Bjønnes

John Levon <[EMAIL PROTECTED]> writes:

| looks like there is no need for this at all. OK ?

To me? yes.


-- 
Lgb