summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorSteve Purcell <steve@sanityinc.com>2013-12-09 20:48:37 +0000
committerSteve Purcell <steve@sanityinc.com>2013-12-11 08:36:22 +0000
commit75a2d9d31e1fa7a54c6c6720af25c002d91db0ea (patch)
tree8cd15768d5d964de5916d52236ab1a28fb9f210b /lisp
parentaaf20ab07f18356f927e09f5a040b6b0f3d733ed (diff)
downloadfork-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')
-rw-r--r--lisp/ledger-mode.el1
-rw-r--r--lisp/ledger-xact.el9
2 files changed, 5 insertions, 5 deletions
diff --git a/lisp/ledger-mode.el b/lisp/ledger-mode.el
index 021835b7..3b442e02 100644
--- a/lisp/ledger-mode.el
+++ b/lisp/ledger-mode.el
@@ -282,7 +282,6 @@ Can indent, complete or align depending on context."
(add-hook 'post-command-hook 'ledger-highlight-xact-under-point nil t)
(add-hook 'before-revert-hook 'ledger-occur-remove-all-overlays nil t)
- (make-variable-buffer-local 'highlight-overlay)
(ledger-init-load-init-file)
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)))