Fix navigate bug keeping prev-xact key binding from working.

This commit is contained in:
Craig Earls 2014-11-09 09:05:13 -07:00
parent 6f3dad2024
commit 8a87fd1310
3 changed files with 7 additions and 6 deletions

View file

@ -96,11 +96,11 @@
"Start a ledger session with the current month, but make it customizable to ease retro-entry.")
(defun ledger-read-account-with-prompt (prompt)
(let* ((context (ledger-context-at-point))
(default (if (eq (ledger-context-line-type context) 'acct-transaction)
(let ((context (ledger-context-at-point)))
(ledger-read-string-with-default prompt
(if (eq (ledger-context-line-type context) 'acct-transaction)
(regexp-quote (ledger-context-field-value context 'account))
nil)))
(ledger-read-string-with-default prompt default)))
nil))))
(defun ledger-read-date (prompt)
"Returns user-supplied date after `PROMPT', defaults to today."

View file

@ -56,6 +56,7 @@ beginning with whitespace"
(defun ledger-navigate-prev-xact ()
"Move point to beginning of previous xact."
(interactive)
(ledger-navigate-beginning-of-xact)
(re-search-backward ledger-xact-start-regex nil t))

View file

@ -42,7 +42,7 @@
(defun ledger-highlight-xact-under-point ()
"Move the highlight overlay to the current transaction."
(if ledger-highlight-xact-under-point
(let ((exts (ledger-navigate-find-xact-extents (point)))
(let ((exts (ledger-navigate-find-element-extents (point)))
(ovl ledger-xact-highlight-overlay))
(if (not ledger-xact-highlight-overlay)
(setq ovl