branch: elpa/lua-mode
commit ec491ddc456b76722efb79426caeee19825c84ee
Author: immerrr <[email protected]>
Commit: immerrr <[email protected]>
lua-process-init-code: use load when loadstring is not available
loadstring is deprecated in Lua 5.2 and removed in Lua 5.3.
---
lua-mode.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lua-mode.el b/lua-mode.el
index 6640468..221d307 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -1596,7 +1596,8 @@ This function just searches for a `end' at the beginning
of a line."
(defvar lua-process-init-code
(mapconcat
'identity
- '("function luamode_loadstring(str, displayname, lineoffset)"
+ '("local loadstring = loadstring or load"
+ "function luamode_loadstring(str, displayname, lineoffset)"
" if lineoffset > 1 then"
" str = string.rep('\\n', lineoffset - 1) .. str"
" end"