[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/lua-mode 13f6ffa 277/468: Provide lua--setq-local fallback
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/lua-mode 13f6ffa 277/468: Provide lua--setq-local fallback macro for pre-24.3 |
Date: |
Thu, 5 Aug 2021 04:58:52 -0400 (EDT) |
branch: elpa/lua-mode
commit 13f6ffad102be7f31191e2a77786e3bc4d00f07b
Author: immerrr <immerrr+lua@gmail.com>
Commit: immerrr <immerrr+lua@gmail.com>
Provide lua--setq-local fallback macro for pre-24.3
---
lua-mode.el | 47 +++++++++++++++++++++++++----------------------
1 file changed, 25 insertions(+), 22 deletions(-)
diff --git a/lua-mode.el b/lua-mode.el
index b335aba..1c772f9 100644
--- a/lua-mode.el
+++ b/lua-mode.el
@@ -198,6 +198,11 @@ element is itself expanded with `lua-rx-to-string'. "
(eval-and-compile
+ (if (fboundp 'setq-local)
+ (defalias 'lua--setq-local 'setq-local)
+ (defmacro lua--setq-local (var val)
+ `(set (make-local-variable (quote ,var)) ,val)))
+
;; Backward compatibility for Emacsen < 24.1
(defalias 'lua--prog-mode
(if (fboundp 'prog-mode) 'prog-mode 'fundamental-mode))
@@ -706,28 +711,25 @@ Groups 6-9 can be used in any of argument regexps."
(setq comint-prompt-regexp lua-prompt-regexp)
- (setq-local font-lock-defaults
- '(lua-font-lock-keywords ;; keywords
- nil ;; keywords-only
- nil ;; case-fold
- nil ;; syntax-alist
- nil ;; syntax-begin
- (font-lock-syntactic-keywords .
lua-font-lock-syntactic-keywords)
- (font-lock-extra-managed-props . (syntax-table))
- (parse-sexp-lookup-properties . t)
- )
- )
-
-
- (setq-local indent-line-function 'lua-indent-line)
- (setq-local beginning-of-defun-function 'lua-beginning-of-proc)
- (setq-local end-of-defun-function 'lua-end-of-proc)
- (setq-local comment-start 'lua-comment-start)
- (setq-local comment-start-skip 'lua-comment-start-skip)
- (setq-local comment-use-syntax t)
- (setq-local comment-use-global-state t)
- (setq-local imenu-generic-expression lua-imenu-generic-expression)
-
+ (lua--setq-local font-lock-defaults '(lua-font-lock-keywords ;; keywords
+ nil ;; keywords-only
+ nil ;; case-fold
+ nil ;; syntax-alist
+ nil ;; syntax-begin
+ ))
+ (lua--setq-local
+ font-lock-syntactic-keywords 'lua-font-lock-syntactic-keywords)
+ (lua--setq-local font-lock-extra-managed-props '(syntax-table))
+ (lua--setq-local parse-sexp-lookup-properties t)
+ (lua--setq-local indent-line-function 'lua-indent-line)
+ (lua--setq-local beginning-of-defun-function 'lua-beginning-of-proc)
+ (lua--setq-local end-of-defun-function 'lua-end-of-proc)
+ (lua--setq-local comment-start lua-comment-start)
+ (lua--setq-local comment-start-skip lua-comment-start-skip)
+ (lua--setq-local comment-use-syntax t)
+ (lua--setq-local comment-use-global-state t)
+ (lua--setq-local imenu-generic-expression lua-imenu-generic-expression)
+
;; setup menu bar entry (XEmacs style)
(if (and (featurep 'menubar)
@@ -752,6 +754,7 @@ Groups 6-9 can be used in any of argument regexps."
nil lua-forward-sexp))))
+
;;;###autoload
(add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode))
- [nongnu] elpa/lua-mode 8ff3427 257/468: Merge pull request #65 from guoxx/master, (continued)
- [nongnu] elpa/lua-mode 8ff3427 257/468: Merge pull request #65 from guoxx/master, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 78f0e09 260/468: Make sure nested token searches begin from open-token positions, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 2cdfda7 264/468: Add inferior-test.el with some basic (failing) tests, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d166d5e 267/468: Merge remote-tracking branch 'upstream/master', Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d52e291 270/468: Don't fontify "stdin:N:" stacktrace entries in REPL buffer, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode ec1b634 271/468: Bump NEWS, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d4ee03e 278/468: Use syntax-propertize-function if it is available, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode fd0f6ba 280/468: Merge pull request #69 from atomontage/master, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 694421c 274/468: Add lua-remove-syntax-table-property to syntactic keywords, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode b73794f 276/468: Merge pull request #79 from j-fu/master, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 13f6ffa 277/468: Provide lua--setq-local fallback macro for pre-24.3,
Philip Kaludercic <=
- [nongnu] elpa/lua-mode ce0a813 282/468: Mention xristos in AUTHORS, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 6d66aee 284/468: Redo handling of "stdin:N" in tracebacks, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode d7855bc 285/468: remove function lua-comment-p, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 5995697 286/468: Merge pull request #81 from v2e4lisp/remove-lua-comment-p, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 8a37fce 288/468: Merge pull request #82 from holomorph/browse-url, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode c3b103d 290/468: lua-beginning-of-proc: improve defun header regex, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode 522edaf 289/468: with-lua-buffer: mark as debuggable, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode a57e25e 293/468: Update documentation, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode ceb74ae 296/468: Add file test/.nosearch, Philip Kaludercic, 2021/08/05
- [nongnu] elpa/lua-mode a7780dc 304/468: silence 25.1 byte-compiler, Philip Kaludercic, 2021/08/05