ledger/lisp
Andrew Schwartzmeyer 6fe913aa87
Fix xact-find-slot at end of buffer
Using `ledger-add-transaction` to add a transaction with a date that
places it at the end of the buffer will "forget" to insert the newline
between it and the previous transaction. This error occurs in
`ledger-xact-find-slot` where the `(when (and (eobp) last-xact-start)`
is entered, but subsequently the `(if (eobp))` is false because the
point has been moved to the end of the prior exact, which is not the end
of the buffer.

The `if` expression is superfluous because the `when` expression has
already been entered, and it is broken becase the point gets
moved. Removing it fixes the behavior for transactions added at the end
of the buffer, and does not break the behavior for transactions added
elsewhere.

This was observed with Emacs 24.5.50.1 and Ledger 3.1.0-20141005.

[ci skip]
2015-08-22 15:27:00 -07:00
..
CMakeLists.txt Merge commit 'b58a872fba7909371d47bc2eb8468e5ba82cfac0' 2014-09-22 22:18:25 -07:00
ledger-commodities.el [emacs] C-x h M-x untabify RET 2015-02-10 21:42:50 +01:00
ledger-complete.el [emacs] C-x h M-x untabify RET 2015-02-10 21:42:50 +01:00
ledger-context.el [emacs] Fix bug 1108, enabling correct account context. 2015-03-23 23:47:42 +01:00
ledger-exec.el [emacs] C-x h M-x untabify RET 2015-02-10 21:42:50 +01:00
ledger-fontify.el [emacs] C-x h M-x untabify RET 2015-02-10 21:42:50 +01:00
ledger-fonts.el Bump copyright notice to 2015 2014-12-27 11:24:55 +01:00
ledger-init.el [emacs] C-x h M-x untabify RET 2015-02-10 21:42:50 +01:00
ledger-mode.el Fix ledger-magic-tab: Wrong number of arguments 2015-06-28 18:52:32 -07:00
ledger-navigate.el [emacs] C-x h M-x untabify RET 2015-02-10 21:42:50 +01:00
ledger-occur.el [emacs] C-x h M-x untabify RET 2015-02-10 21:42:50 +01:00
ledger-post.el Use (interactive "r") in ledger-post-align-postings 2015-05-31 10:38:47 -07:00
ledger-reconcile.el [emacs] Fix bug 1060. 2015-04-05 16:00:15 +02:00
ledger-regex.el [emacs] C-x h M-x untabify RET 2015-02-10 21:42:50 +01:00
ledger-report.el [emacs] C-x h M-x untabify RET 2015-02-10 21:42:50 +01:00
ledger-schedule.el [emacs] C-x h M-x untabify RET 2015-02-10 21:42:50 +01:00
ledger-sort.el [emacs] C-x h M-x untabify RET 2015-02-10 21:42:50 +01:00
ledger-state.el [emacs] C-x h M-x untabify RET 2015-02-10 21:42:50 +01:00
ledger-test.el Bump copyright notice to 2015 2014-12-27 11:24:55 +01:00
ledger-texi.el Bump copyright notice to 2015 2014-12-27 11:24:55 +01:00
ledger-xact.el Fix xact-find-slot at end of buffer 2015-08-22 15:27:00 -07:00