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

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

[nongnu] elpa/swift-mode fdc576f 019/496: Fix for older Emacs(< 24.3)


From: ELPA Syncer
Subject: [nongnu] elpa/swift-mode fdc576f 019/496: Fix for older Emacs(< 24.3)
Date: Sun, 29 Aug 2021 11:32:59 -0400 (EDT)

branch: elpa/swift-mode
commit fdc576f3e95cf3d3b5fd6d18aadb41d4d2cad557
Author: Syohei YOSHIDA <syohex@gmail.com>
Commit: Syohei YOSHIDA <syohex@gmail.com>

    Fix for older Emacs(< 24.3)
    
    'setq-local' is introduced at Emacs 24.3.
---
 swift-mode.el | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/swift-mode.el b/swift-mode.el
index 4cc7696..e8b57d9 100644
--- a/swift-mode.el
+++ b/swift-mode.el
@@ -30,6 +30,13 @@
 (require 'dash)
 (require 'rx)
 
+(eval-and-compile
+  ;; Added in Emacs 24.3
+  (unless (fboundp 'setq-local)
+    (defmacro setq-local (var val)
+      "Set variable VAR to value VAL in current buffer."
+      (list 'set (list 'make-local-variable (list 'quote var)) val))))
+
 ;; Font lock.
 
 (defvar swift-mode--type-decl-keywords



reply via email to

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