emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/lua-mode a3016a2 176/468: Avoid polluting "global namespac


From: Philip Kaludercic
Subject: [nongnu] elpa/lua-mode a3016a2 176/468: Avoid polluting "global namespace" when striving for backward compatibility
Date: Thu, 5 Aug 2021 04:58:31 -0400 (EDT)

branch: elpa/lua-mode
commit a3016a25a1e30a83162a3a3ad13f6823d5590a88
Author: immerrr <immerrr+lua@gmail.com>
Commit: immerrr <immerrr+lua@gmail.com>

    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

[Prev in Thread] Current Thread [Next in Thread]