summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorDominik Honnef <dominik.honnef@gmail.com>2013-09-06 16:08:11 -0400
committerDominik Honnef <dominik.honnef@gmail.com>2013-09-06 16:08:11 -0400
commitbd587d1752f1e31b9810147ce4c54e5a0546144d (patch)
tree41b1c7954ce7acfdfe64fc8299b817153d2e612d /misc
parent6bb3705011352783808c07fa5845c2086f0b53bc (diff)
downloadgo-bd587d1752f1e31b9810147ce4c54e5a0546144d.tar.gz
misc/emacs: use built-in buffer-base-buffer instead of own variable
R=adonovan CC=golang-dev https://codereview.appspot.com/13476043 Committer: Alan Donovan <adonovan@google.com>
Diffstat (limited to 'misc')
-rw-r--r--misc/emacs/go-mode.el6
1 files changed, 1 insertions, 5 deletions
diff --git a/misc/emacs/go-mode.el b/misc/emacs/go-mode.el
index f13651a66..02582756f 100644
--- a/misc/emacs/go-mode.el
+++ b/misc/emacs/go-mode.el
@@ -129,7 +129,6 @@
(defvar go-dangling-cache)
(defvar go-godoc-history nil)
-(defvar go--coverage-origin-buffer)
(defvar go--coverage-current-file-name)
(defgroup go nil
@@ -1033,9 +1032,7 @@ current coverage buffer or by prompting for it."
(defun go--coverage-origin-buffer ()
"Return the buffer to base the coverage on."
- (if (boundp 'go--coverage-origin-buffer)
- go--coverage-origin-buffer
- (current-buffer)))
+ (or (buffer-base-buffer) (current-buffer)))
(defun go--coverage-face (count divisor)
"Return the intensity face for COUNT when using DIVISOR
@@ -1129,7 +1126,6 @@ for."
(with-current-buffer (or (get-buffer gocov-buffer-name)
(make-indirect-buffer origin-buffer gocov-buffer-name t))
- (set (make-local-variable 'go--coverage-origin-buffer) origin-buffer)
(set (make-local-variable 'go--coverage-current-file-name) coverage-file)
(save-excursion