diff options
author | Craig Earls <enderw88@gmail.com> | 2013-02-11 11:05:43 -0700 |
---|---|---|
committer | Craig Earls <enderw88@gmail.com> | 2013-02-11 11:05:43 -0700 |
commit | e615d8c615c43bf1e04b0a29747f05188fd46fbd (patch) | |
tree | 3764b07625f9581d74f8d138315b2251cc3ee50c /lisp | |
parent | e245e41d6bfb1ef8799d9174e2bc5c6687880aa8 (diff) | |
download | fork-ledger-e615d8c615c43bf1e04b0a29747f05188fd46fbd.tar.gz fork-ledger-e615d8c615c43bf1e04b0a29747f05188fd46fbd.tar.bz2 fork-ledger-e615d8c615c43bf1e04b0a29747f05188fd46fbd.zip |
Bug 883 overlays left in buffer if file reverted.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/ldg-mode.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lisp/ldg-mode.el b/lisp/ldg-mode.el index 26d0ed68..0ff22417 100644 --- a/lisp/ldg-mode.el +++ b/lisp/ldg-mode.el @@ -38,6 +38,11 @@ customizable to ease retro-entry.") :type 'string :group 'ledger) +(defun ledger-remove-overlays () + (interactive) + "remove overlays formthe buffer, used if the buffer is reverted" + (remove-overlays)) + (defvar ledger-mode-abbrev-table) ;;;###autoload @@ -61,6 +66,7 @@ customizable to ease retro-entry.") (set (make-local-variable 'pcomplete-termination-string) "") (add-hook 'post-command-hook 'ledger-highlight-xact-under-point nil t) + (add-hook 'before-revert-hook 'ledger-remove-overlays nil t) (make-variable-buffer-local 'highlight-overlay) (let ((map (current-local-map))) |