branch: elpa/lua-mode
commit 9f5107eff1b95bcc5558476a7f02e15e38a1fb58
Author: immerrr <[email protected]>
Commit: immerrr <[email protected]>
Fix population of lua-mode-syntax-table (issue #42)
Previously, `modify-syntax-entry' calls were altering syntax table in use
when loading lua-mode.el (kudos to github/ryuslash for finding out).
---
lua-mode.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lua-mode.el b/lua-mode.el
index f300c4f..b1e5e7d 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -492,7 +492,7 @@ index of respective Lua reference manuals.")
temporary-file-directory))))))
(defvar lua-mode-syntax-table
- (let ((st (copy-syntax-table)))
+ (with-syntax-table (copy-syntax-table)
(modify-syntax-entry ?+ ".")
(modify-syntax-entry ?- ". 12")
(modify-syntax-entry ?* ".")
@@ -508,7 +508,7 @@ index of respective Lua reference manuals.")
(modify-syntax-entry ?\n ">")
(modify-syntax-entry ?\' "\"")
(modify-syntax-entry ?\" "\"")
- st)
+ (syntax-table))
"Syntax table used while in `lua-mode'.")
;;;###autoload