commit b6b1ab890d99390ecf677c58d18f6814d3ffefb6
Author: Juergen Spitzmueller <[email protected]>
Date: Mon Dec 2 14:35:42 2013 +0100
Rerun makeindex if all nomencl entries have been removed (#8905)
diff --git a/src/LaTeX.cpp b/src/LaTeX.cpp
index dcb1cce..39eb54b 100644
--- a/src/LaTeX.cpp
+++ b/src/LaTeX.cpp
@@ -269,7 +269,12 @@ int LaTeX::run(TeXErrors & terr)
runparams);
}
FileName const nlofile(changeExtension(file.absFileName(), ".nlo"));
- if (head.haschanged(nlofile))
+ // If all nomencl entries are removed, nomencl writes an empty nlo file.
+ // DepTable::hasChanged() returns false in this case, since it does not
+ // distinguish empty files from non-existing files. This is why we need
+ // the extra checks here (to trigger a rerun). Cf. discussions in #8905.
+ // FIXME: Sort out the real problem in DepTable.
+ if (head.haschanged(nlofile) || (nlofile.exists() &&
nlofile.isFileEmpty()))
rerun |= runMakeIndexNomencl(file, ".nlo", ".nls");
FileName const glofile(changeExtension(file.absFileName(), ".glo"));
if (head.haschanged(glofile))
diff --git a/status.20x b/status.20x
index d7e0ca6..3e38d89 100644
--- a/status.20x
+++ b/status.20x
@@ -52,6 +52,7 @@ What's new
* DOCUMENT INPUT/OUTPUT
+- Rerun makeindex if all nomencl entries have been removed (bug 8905).
* USER INTERFACE
@@ -63,7 +64,7 @@ What's new
- Fix crash with changetracking in bibliography environment (bug 8646).
-- Fix crash when optional argument inside inside a math macro was deleted (bug
8329).
+- Fix crash when optional argument inside a math macro was deleted (bug 8329).
- Fix problem that led to assertion in some cases when space was at
beginning of line (bugs 8838 and 8947).