aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/parser.cpp6
-rw-r--r--src/ring.cpp6
2 files changed, 8 insertions, 4 deletions
diff --git a/src/parser.cpp b/src/parser.cpp
index 5d78aaf..a9797b6 100644
--- a/src/parser.cpp
+++ b/src/parser.cpp
@@ -2272,9 +2272,11 @@ StateECommand::custom(gchar chr)
* changes and exit.
*
* When colon-modified, <bool> is ignored and EX
- * will instead immediately save all modified buffers \(em
+ * will instead immediately try to save all modified buffers \(em
* this can of course be reversed using rubout.
- * \(lq:EX\fB$$\fP\(rq is thus the usual interactive
+ * Saving all buffers can fail, e.g. if the unnamed file
+ * is modified or if there is an IO error.
+ * \(lq:EX\fB$$\fP\(rq is nevertheless the usual interactive
* command sequence to exit while saving all modified
* buffers.
*/
diff --git a/src/ring.cpp b/src/ring.cpp
index fb10552..ac3a09d 100644
--- a/src/ring.cpp
+++ b/src/ring.cpp
@@ -56,7 +56,8 @@ void
Buffer::save(const gchar *filename)
{
if (!filename && !Buffer::filename)
- throw Error("File name expected");
+ throw Error("Cannot save the unnamed file "
+ "without providing a file name");
IOView::save(filename ? : Buffer::filename);
@@ -166,7 +167,8 @@ Ring::save_all_dirty_buffers(void)
Buffer *cur;
TAILQ_FOREACH(cur, &head, buffers)
- if (cur->dirty && cur->filename)
+ if (cur->dirty)
+ /* NOTE: Will fail for the unnamed file */
cur->save();
}