summaryrefslogtreecommitdiff
path: root/src/emacs.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-03 18:46:19 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-03 19:06:53 -0400
commit2ce7ae376c1e3de0b952d6bb8125f68fc99813d0 (patch)
tree05b79eea2f8d21ec77f19f33f85f0515a17111b3 /src/emacs.cc
parent8948e161cd64bbd9ed3e3dfccae5fdb03e8e8251 (diff)
downloadfork-ledger-2ce7ae376c1e3de0b952d6bb8125f68fc99813d0.tar.gz
fork-ledger-2ce7ae376c1e3de0b952d6bb8125f68fc99813d0.tar.bz2
fork-ledger-2ce7ae376c1e3de0b952d6bb8125f68fc99813d0.zip
Removed used of src_idx.
Diffstat (limited to 'src/emacs.cc')
-rw-r--r--src/emacs.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/emacs.cc b/src/emacs.cc
index b63375b2..714302c5 100644
--- a/src/emacs.cc
+++ b/src/emacs.cc
@@ -36,14 +36,8 @@ namespace ledger {
void format_emacs_xacts::write_entry(entry_t& entry)
{
- int idx = entry.src_idx;
- foreach (const path& path, entry.journal->sources)
- if (! idx--) {
- out << "\"" << path << "\" ";
- break;
- }
-
- out << (static_cast<std::size_t>(entry.beg_line) + 1) << " ";
+ out << "\"" << entry.pathname << "\" "
+ << (static_cast<std::size_t>(entry.beg_line) + 1) << " ";
tm when = gregorian::to_tm(*entry.date());
std::time_t date = std::mktime(&when); // jww (2008-04-20): Is this GMT or local?