summaryrefslogtreecommitdiff
path: root/emacs.cc
diff options
context:
space:
mode:
Diffstat (limited to 'emacs.cc')
-rw-r--r--emacs.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/emacs.cc b/emacs.cc
index afce595a..bc039290 100644
--- a/emacs.cc
+++ b/emacs.cc
@@ -5,11 +5,9 @@ namespace ledger {
void format_emacs_xacts::write_entry(entry_t& entry)
{
int idx = entry.src_idx;
- for (paths_list::const_iterator i = entry.journal->sources.begin();
- i != entry.journal->sources.end();
- i++)
+ foreach (const path& path, entry.journal->sources)
if (! idx--) {
- out << "\"" << *i << "\" ";
+ out << "\"" << path << "\" ";
break;
}