Skip to content

Commit c2b2e1f

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 c2b2e1f

File tree

1 file changed

+12
-13
lines changed

1 file changed

+12
-13
lines changed

go-mode.el

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2133,19 +2133,18 @@ code to the Playground. You can disable the confirmation by setting
21332133
(encode-coding-string
21342134
(buffer-substring-no-properties start end)
21352135
'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))))))))))))
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)