1
0
mirror of https://github.com/golang/go synced 2024-11-21 14:54:40 -07:00

misc/emacs: use built-in buffer-base-buffer instead of own variable

R=adonovan
CC=golang-dev
https://golang.org/cl/13476043
This commit is contained in:
Dominik Honnef 2013-09-06 16:08:11 -04:00 committed by Alan Donovan
parent 8f764fb689
commit b7a609b660

View File

@ -129,7 +129,6 @@
(defvar go-dangling-cache) (defvar go-dangling-cache)
(defvar go-godoc-history nil) (defvar go-godoc-history nil)
(defvar go--coverage-origin-buffer)
(defvar go--coverage-current-file-name) (defvar go--coverage-current-file-name)
(defgroup go nil (defgroup go nil
@ -1033,9 +1032,7 @@ current coverage buffer or by prompting for it."
(defun go--coverage-origin-buffer () (defun go--coverage-origin-buffer ()
"Return the buffer to base the coverage on." "Return the buffer to base the coverage on."
(if (boundp 'go--coverage-origin-buffer) (or (buffer-base-buffer) (current-buffer)))
go--coverage-origin-buffer
(current-buffer)))
(defun go--coverage-face (count divisor) (defun go--coverage-face (count divisor)
"Return the intensity face for COUNT when using DIVISOR "Return the intensity face for COUNT when using DIVISOR
@ -1129,7 +1126,6 @@ for."
(with-current-buffer (or (get-buffer gocov-buffer-name) (with-current-buffer (or (get-buffer gocov-buffer-name)
(make-indirect-buffer origin-buffer gocov-buffer-name t)) (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) (set (make-local-variable 'go--coverage-current-file-name) coverage-file)
(save-excursion (save-excursion