[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/lua-mode 7f8e519 178/468: Add backward compatibility alias
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/lua-mode 7f8e519 178/468: Add backward compatibility aliases for cl-assert & cl-labels functions |
Date: |
Thu, 5 Aug 2021 04:58:31 -0400 (EDT) |
branch: elpa/lua-mode
commit 7f8e519554aff7b75936b1b17c7dbe226c22d51b
Author: immerrr <immerrr+lua@gmail.com>
Commit: immerrr <immerrr+lua@gmail.com>
Add backward compatibility aliases for cl-assert & cl-labels functions
---
lua-mode.el | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/lua-mode.el b/lua-mode.el
index d914a4b..5b7b6c7 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -105,6 +105,17 @@
(require 'comint)
+;; Backward compatibility for Emacsen < 24.1
+(eval-and-compile
+ (defalias 'lua--prog-mode
+ (if (fboundp 'prog-mode) 'prog-mode 'fundamental-mode))
+
+ (defalias 'lua--cl-assert
+ (if (fboundp 'cl-assert) 'cl-assert 'assert))
+
+ (defalias 'lua--cl-labels
+ (if (fboundp 'cl-labels) 'cl-labels 'flet)))
+
;; Local variables
(defgroup lua nil
"Major mode for editing lua code."
@@ -154,7 +165,7 @@ Should be a list of strings."
"Buffer used for communication with Lua subprocess")
(defun lua--customize-set-prefix-key (prefix-key-sym prefix-key-val)
- (cl-assert (eq prefix-key-sym 'lua-prefix-key))
+ (lua--cl-assert (eq prefix-key-sym 'lua-prefix-key))
(set prefix-key-sym (if (and prefix-key-val (> (length prefix-key-val) 0))
;; read-kbd-macro returns a string or a vector
;; in both cases (elt x 0) is ok
@@ -307,7 +318,7 @@ traceback location."
;; makes sense to me, I'm going to wipe them out as soon as I'm sure
;; that indentation won't get hurt. --immerrr
;;
- (cl-labels
+ (lua--cl-labels
((module-name-re (x)
(concat "\\(?1:\\<"
(if (listp x) (car x) x)
@@ -440,10 +451,6 @@ index of respective Lua reference manuals.")
(modify-syntax-entry ?\" "\""))
"Syntax table used while in `lua-mode'.")
-;; For Emacs < 24.1
-(defalias 'lua--prog-mode
- (if (fboundp 'prog-mode) 'prog-mode 'fundamental-mode))
-
;;;###autoload
(define-derived-mode lua-mode lua--prog-mode "Lua"
"Major mode for editing Lua code."
- [nongnu] elpa/lua-mode cf2f42a 076/468: .gitignore: ignore emacs backups, (continued)
- [nongnu] elpa/lua-mode cf2f42a 076/468: .gitignore: ignore emacs backups, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 9384855 093/468: lua-mark-all-multiline-literals: run when during lua-mode initialization, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 6de08c0 090/468: Update TODO, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode e3a8282 099/468: Make URL/Version fields in lua-mode.el prettier, update parse expression in Makefile, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 1c37d0d 114/468: Bump version, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode e17a48c 126/468: Give credit to people participated recently, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode dcf5fc1 138/468: Indentation fixes and tidy up., Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 3c8cfe6 160/468: Add credit, reformat new code to fit into 77 cols, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 6b48a94 165/468: Second part of the fix for #34, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 7a3a5f6 169/468: Add script to facilitate indentation testing, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 7f8e519 178/468: Add backward compatibility aliases for cl-assert & cl-labels functions,
Philip Kaludercic <=
- [nongnu] elpa/lua-mode e6a46ee 182/468: Update README.md, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 4b407cc 203/468: Print 'Prefix key set to ...' only when setting via interactive function, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 88b0ec3 209/468: Fix indentation for blocks starting on continued lines, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 32b5639 210/468: Fix wrong imenu generic expression, add one more regexp to match 'x = function(...)' definitions, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 57d3e46 212/468: lua-mode.el: bump "Version:" field, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode c7c8d0c 179/468: Fix bug with lua-mode-syntax-table initialization, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 0b4ae97 184/468: Merge branch 'fix-36' of git://github.com/vhallac/lua-mode, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 562540e 073/468: Fix lua-calculate-indentation: indent to 0 when inside string literal, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 0f6048d 082/468: Implement lua-mark-all-multiline-literals function, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 96eba74 085/468: lua-(comment/string)-p: add optional pos parameter, Philip Kaludercic, 2021/08/05