diff options
author | Steve Purcell <steve@sanityinc.com> | 2013-12-09 20:48:37 +0000 |
---|---|---|
committer | Steve Purcell <steve@sanityinc.com> | 2013-12-11 08:36:22 +0000 |
commit | 75a2d9d31e1fa7a54c6c6720af25c002d91db0ea (patch) | |
tree | 8cd15768d5d964de5916d52236ab1a28fb9f210b /lisp/ledger-xact.el | |
parent | aaf20ab07f18356f927e09f5a040b6b0f3d733ed (diff) | |
download | fork-ledger-75a2d9d31e1fa7a54c6c6720af25c002d91db0ea.tar.gz fork-ledger-75a2d9d31e1fa7a54c6c6720af25c002d91db0ea.tar.bz2 fork-ledger-75a2d9d31e1fa7a54c6c6720af25c002d91db0ea.zip |
ledger-mode: Add namespace prefix to highlight-overlay
make-variable-buffer-local is a top-level form: this commit moves that
call from ledger-mode to next to the variable's declaration.
Diffstat (limited to 'lisp/ledger-xact.el')
-rw-r--r-- | lisp/ledger-xact.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/ledger-xact.el b/lisp/ledger-xact.el index 7f2200a4..f65e5ed6 100644 --- a/lisp/ledger-xact.el +++ b/lisp/ledger-xact.el @@ -36,7 +36,8 @@ :group 'ledger :safe t) -(defvar highlight-overlay (list)) +(defvar ledger-xact-highlight-overlay (list)) +(make-variable-buffer-local 'ledger-xact-highlight-overlay) (defun ledger-find-xact-extents (pos) "Return point for beginning of xact and and of xact containing position. @@ -58,10 +59,10 @@ within the transaction." "Move the highlight overlay to the current transaction." (if ledger-highlight-xact-under-point (let ((exts (ledger-find-xact-extents (point))) - (ovl highlight-overlay)) - (if (not highlight-overlay) + (ovl ledger-xact-highlight-overlay)) + (if (not ledger-xact-highlight-overlay) (setq ovl - (setq highlight-overlay + (setq ledger-xact-highlight-overlay (make-overlay (car exts) (cadr exts) (current-buffer) t nil))) |