Skip to content

Commit 11c246e

Browse files
committed
Don't store execution result to a unused content-buf var
Fixes a warning: In go-play-region: go-mode.el:2137:13: Warning: Unused lexical variable ‘content-buf’
1 parent d9627a4 commit 11c246e

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

go-mode.el

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2132,20 +2132,19 @@ code to the Playground. You can disable the confirmation by setting
21322132
(url-request-data
21332133
(encode-coding-string
21342134
(buffer-substring-no-properties start end)
2135-
'utf-8))
2136-
2137-
(content-buf (url-retrieve
2138-
"https://play.golang.org/share"
2139-
(lambda (arg)
2140-
(cond
2141-
((equal :error (car arg))
2142-
(signal 'go-play-error (cdr arg)))
2143-
(t
2144-
(re-search-forward "\n\n")
2145-
(let ((url (format "https://play.golang.org/p/%s"
2146-
(buffer-substring (point) (point-max)))))
2147-
(when go-play-browse-function
2148-
(funcall go-play-browse-function url))))))))))))
2135+
'utf-8)))
2136+
(url-retrieve
2137+
"https://play.golang.org/share"
2138+
(lambda (arg)
2139+
(cond
2140+
((equal :error (car arg))
2141+
(signal 'go-play-error (cdr arg)))
2142+
(t
2143+
(re-search-forward "\n\n")
2144+
(let ((url (format "https://play.golang.org/p/%s"
2145+
(buffer-substring (point) (point-max)))))
2146+
(when go-play-browse-function
2147+
(funcall go-play-browse-function url))))))))))
21492148

21502149
;;;###autoload
21512150
(defun go-download-play (url)

0 commit comments

Comments
 (0)