runtime: fix :compiler leaving behind a g:makeprg variable (#14414)

Problem:  :compiler may leave behind a g:makeprg variable after #14336.
Solution: Use a script local variable.

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/compiler/tex.vim b/runtime/compiler/tex.vim
index 9d8c660..282b3a0 100644
--- a/runtime/compiler/tex.vim
+++ b/runtime/compiler/tex.vim
@@ -4,6 +4,7 @@
 " Contributors: Enno Nagel
 " Last Change:  2024 Mar 29
 "		2024 Apr 03 by The Vim Project (removed :CompilerSet definition)
+"		2024 Apr 05 by The Vim Project (avoid leaving behind g:makeprg)
 
 if exists("current_compiler")
 	finish
@@ -25,8 +26,8 @@
 	else
 		let current_compiler = "latex"
 	endif
-	let makeprg=current_compiler .. ' -interaction=nonstopmode'
-	execute 'CompilerSet makeprg=' .. escape(makeprg, ' ')
+	let s:makeprg=current_compiler .. ' -interaction=nonstopmode'
+	execute 'CompilerSet makeprg=' .. escape(s:makeprg, ' ')
 else
 	let current_compiler = 'make'
 endif