diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ldg-mode.el | 2 | ||||
-rw-r--r-- | lisp/ldg-report.el | 20 |
2 files changed, 13 insertions, 9 deletions
diff --git a/lisp/ldg-mode.el b/lisp/ldg-mode.el index 96ce576b..37c0f69e 100644 --- a/lisp/ldg-mode.el +++ b/lisp/ldg-mode.el @@ -128,6 +128,8 @@ (define-key map [toggle-post] '(menu-item "Toggle Current Posting" ledger-toggle-current)) (define-key map [toggle-xact] '(menu-item "Toggle Current Transaction" ledger-toggle-current-entry)) (define-key map [sep4] '(menu-item "--")) + (define-key map [edit-amount] '(menu-item "Reconcile Account" ledger-reconcile)) + (define-key map [sep6] '(menu-item "--")) (define-key map [edit-amount] '(menu-item "Calc on Amount" ledger-post-edit-amount)) (define-key map [sep] '(menu-item "--")) (define-key map [delete-xact] '(menu-item "Delete Entry" ledger-delete-current-transaction)) diff --git a/lisp/ldg-report.el b/lisp/ldg-report.el index 944ae2e6..4db58494 100644 --- a/lisp/ldg-report.el +++ b/lisp/ldg-report.el @@ -319,16 +319,18 @@ Optional EDIT the command." (let ((file (match-string 1)) (line (string-to-number (match-string 2)))) (delete-region (match-beginning 0) (match-end 0)) - (set-text-properties (line-beginning-position) (line-end-position) - (list 'ledger-source (cons file (save-window-excursion - (save-excursion - (find-file file) - (widen) - (ledger-goto-line line) - (point-marker)))))) - (add-text-properties (line-beginning-position) (line-end-position) + (if file + (progn + (set-text-properties (line-beginning-position) (line-end-position) + (list 'ledger-source (cons file (save-window-excursion + (save-excursion + (find-file file) + (widen) + (ledger-goto-line line) + (point-marker)))))) + (add-text-properties (line-beginning-position) (line-end-position) (list 'face 'ledger-font-report-clickable-face)) - (end-of-line)))) + (end-of-line)))))) (goto-char data-pos))) |