]> git.lyx.org Git - lyx.git/blobdiff - src/BufferList.cpp
Fulfill promise to Andre: TextClass_ptr --> TextClassPtr.
[lyx.git] / src / BufferList.cpp
index 0a776240e66aeb9b20c827ada77bddab493bf732..cbb7f0a4569fa6296255f5abe08212a40387f225 100644 (file)
 #include "debug.h"
 #include "gettext.h"
 #include "Session.h"
-#include "lyx_cb.h"
+#include "callback.h"
 #include "LyX.h"
 #include "output_latex.h"
-#include "Paragraph.h"
 #include "ParagraphList.h"
 
-#include "frontends/Alert.h"
+#include "frontends/alert.h"
 
 #include "support/filetools.h"
 #include "support/Package.h"
 #include <algorithm>
 #include <functional>
 
-
-namespace lyx {
-
-using support::addName;
-using support::bformat;
-using support::FileName;
-using support::makeDisplayPath;
-using support::onlyFilename;
-using support::removeAutosaveFile;
-using support::package;
-using support::prefixIs;
-
 using boost::bind;
 
 using std::auto_ptr;
@@ -59,6 +46,18 @@ using std::vector;
 using std::back_inserter;
 using std::transform;
 
+
+namespace lyx {
+
+using support::addName;
+using support::bformat;
+using support::FileName;
+using support::makeDisplayPath;
+using support::onlyFilename;
+using support::removeAutosaveFile;
+using support::package;
+using support::prefixIs;
+
 namespace Alert = lyx::frontend::Alert;
 
 
@@ -227,14 +226,10 @@ bool BufferList::close(Buffer * buf, bool const ask)
                                return false;
                } else if (!menuWrite(buf))
                        return false;
-               else
-                       return false;
        } else if (ret == 2)
                return false;
-
-       if (buf->isUnnamed()) {
-               removeAutosaveFile(buf->fileName());
-       }
+               
+       removeAutosaveFile(buf->fileName());
 
        release(buf);
        return true;