Correct error that prevented clearing postings if ledger--clear-whole-entires was nil
This commit is contained in:
parent
2b55ef7dab
commit
114be62d24
1 changed files with 8 additions and 8 deletions
|
|
@ -81,12 +81,10 @@
|
||||||
(account ledger-acct)
|
(account ledger-acct)
|
||||||
(inhibit-read-only t)
|
(inhibit-read-only t)
|
||||||
cleared)
|
cleared)
|
||||||
; (when (is-stdin (car where))
|
|
||||||
; (with-current-buffer ledger-buf
|
|
||||||
(when (ledger-reconcile-get-buffer where)
|
(when (ledger-reconcile-get-buffer where)
|
||||||
(with-current-buffer (ledger-reconcile-get-buffer where)
|
(with-current-buffer (ledger-reconcile-get-buffer where)
|
||||||
(goto-char (cdr where))
|
(goto-char (cdr where))
|
||||||
(setq cleared (ledger-toggle-current-entry)))
|
(setq cleared (ledger-toggle-current)))
|
||||||
;remove the existing face and add the new face
|
;remove the existing face and add the new face
|
||||||
(remove-text-properties (line-beginning-position)
|
(remove-text-properties (line-beginning-position)
|
||||||
(line-end-position)
|
(line-end-position)
|
||||||
|
|
@ -146,6 +144,7 @@
|
||||||
(set-buffer-modified-p t)))))
|
(set-buffer-modified-p t)))))
|
||||||
|
|
||||||
(defun ledger-reconcile-visit (&optional come-back)
|
(defun ledger-reconcile-visit (&optional come-back)
|
||||||
|
(interactive)
|
||||||
(progn
|
(progn
|
||||||
(beginning-of-line)
|
(beginning-of-line)
|
||||||
(let* ((where (get-text-property (1+ (point)) 'where))
|
(let* ((where (get-text-property (1+ (point)) 'where))
|
||||||
|
|
@ -162,8 +161,6 @@
|
||||||
|
|
||||||
(defun ledger-reconcile-save ()
|
(defun ledger-reconcile-save ()
|
||||||
(interactive)
|
(interactive)
|
||||||
; (with-current-buffer ledger-buf
|
|
||||||
; (save-buffer))
|
|
||||||
(dolist (buf (cons ledger-buf ledger-bufs))
|
(dolist (buf (cons ledger-buf ledger-bufs))
|
||||||
(with-current-buffer buf
|
(with-current-buffer buf
|
||||||
(save-buffer)))
|
(save-buffer)))
|
||||||
|
|
@ -194,7 +191,9 @@
|
||||||
(cons
|
(cons
|
||||||
buf
|
buf
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-line (nth 1 emacs-xact))
|
(if ledger-clear-whole-entries
|
||||||
|
(goto-line (nth 1 emacs-xact))
|
||||||
|
(goto-line (nth 0 (nth 5 emacs-xact))))
|
||||||
(point-marker))))))
|
(point-marker))))))
|
||||||
|
|
||||||
(defun ledger-do-reconcile ()
|
(defun ledger-do-reconcile ()
|
||||||
|
|
@ -262,8 +261,9 @@
|
||||||
'previous-line
|
'previous-line
|
||||||
'mouse-set-point
|
'mouse-set-point
|
||||||
'ledger-reconcile-toggle))
|
'ledger-reconcile-toggle))
|
||||||
(save-excursion
|
(if ledger-buffer-tracks-reconcile-buffer
|
||||||
(ledger-reconcile-visit t))))
|
(save-excursion
|
||||||
|
(ledger-reconcile-visit t)))))
|
||||||
|
|
||||||
(defun ledger-reconcile (account)
|
(defun ledger-reconcile (account)
|
||||||
(interactive "sAccount to reconcile: ")
|
(interactive "sAccount to reconcile: ")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue