mirror of
https://github.com/golang/go
synced 2024-11-18 13:14:47 -07:00
cmd/guru: emacs: update default-directory
That way, running guru on /a/foo.go, followed by /b/bar.go won't leave the user with a display buffer that still defaults to /a/ Change-Id: I3f9b085c6d206ac2adc269fc2009799c624c371a Reviewed-on: https://go-review.googlesource.com/20475 Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
parent
999f507100
commit
fc3ceb1825
@ -119,9 +119,11 @@ if not already set. Mark up the output using `compilation-mode`,
|
|||||||
replacing each file name with a small hyperlink, and display the
|
replacing each file name with a small hyperlink, and display the
|
||||||
result."
|
result."
|
||||||
(let ((output (go-guru--exec mode need-scope))
|
(let ((output (go-guru--exec mode need-scope))
|
||||||
(display (get-buffer-create "*go-guru*")))
|
(display (get-buffer-create "*go-guru*"))
|
||||||
|
(dir default-directory))
|
||||||
(with-current-buffer display
|
(with-current-buffer display
|
||||||
(setq buffer-read-only nil)
|
(setq buffer-read-only nil)
|
||||||
|
(setq default-directory dir)
|
||||||
(erase-buffer)
|
(erase-buffer)
|
||||||
(insert-buffer-substring output)
|
(insert-buffer-substring output)
|
||||||
(go-guru--compilation-markup))))
|
(go-guru--compilation-markup))))
|
||||||
|
Loading…
Reference in New Issue
Block a user