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

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

[nongnu] elpa/lua-mode 5a81583 140/468: Restore compatibility with Emacs


From: Philip Kaludercic
Subject: [nongnu] elpa/lua-mode 5a81583 140/468: Restore compatibility with Emacs22 and earlier that was broken when patching lua-mode-abbrev-table (should fix #11)
Date: Thu, 5 Aug 2021 04:58:24 -0400 (EDT)

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

    Restore compatibility with Emacs22 and earlier that was broken when 
patching lua-mode-abbrev-table (should fix #11)
---
 lua-mode.el | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/lua-mode.el b/lua-mode.el
index 31f6656..c56bcb6 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -299,9 +299,18 @@ traceback location."
   "Abbreviation table used in lua-mode buffers.")
 
 (define-abbrev-table 'lua-mode-abbrev-table
-  '(("end" "end" lua-indent-line :system t)
-    ("else" "else" lua-indent-line :system t)
-    ("elseif" "elseif" lua-indent-line :system t)))
+  ;; Emacs 23 introduced :system property that prevents abbrev
+  ;; entries from being written to file specified by abbrev-file-name
+  ;;
+  ;; Emacs 22 and earlier had this functionality implemented
+  ;; by simple nil/non-nil flag as positional parameter
+  (if (>= emacs-major-version 23)
+      '(("end"    "end"    lua-indent-line :system t)
+        ("else"   "else"   lua-indent-line :system t)
+        ("elseif" "elseif" lua-indent-line :system t))
+    '(("end"    "end"      lua-indent-line nil 'system)
+      ("else"   "else"     lua-indent-line nil 'system)
+      ("elseif" "elseif"   lua-indent-line nil 'system)))
 
 (eval-and-compile
   (defalias 'lua-make-temp-file



reply via email to

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