branch: elpa/lua-mode
commit a3016a25a1e30a83162a3a3ad13f6823d5590a88
Author: immerrr <[email protected]>
Commit: immerrr <[email protected]>

    Avoid polluting "global namespace" when striving for backward compatibility
---
 lua-mode.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lua-mode.el b/lua-mode.el
index d8588ae..ff13d61 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -442,11 +442,11 @@ index of respective Lua reference manuals.")
   "Syntax table used while in `lua-mode'.")
 
 ;; For Emacs < 24.1
-(unless (fboundp 'prog-mode)
-  (defalias 'prog-mode 'fundamental-mode))
+(defalias 'lua--prog-mode
+  (if (fboundp 'prog-mode) 'prog-mode 'fundamental-mode))
 
 ;;;###autoload
-(define-derived-mode lua-mode prog-mode "Lua"
+(define-derived-mode lua-mode lua--prog-mode "Lua"
   "Major mode for editing Lua code."
   :abbrev-table lua-mode-abbrev-table
   :syntax-table lua-mode-syntax-table

Reply via email to