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.
This commit is contained in:
Steve Purcell 2013-12-09 20:48:37 +00:00
parent aaf20ab07f
commit 75a2d9d31e
2 changed files with 5 additions and 5 deletions

View file

@ -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)

View file

@ -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)))