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

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

[nongnu] elpa/ws-butler 93409c1ca7 51/64: polyfill for setq-local


From: Stefan Kangas
Subject: [nongnu] elpa/ws-butler 93409c1ca7 51/64: polyfill for setq-local
Date: Fri, 31 Dec 2021 11:09:33 -0500 (EST)

branch: elpa/ws-butler
commit 93409c1ca73ce2a68888c9222f5f40c61c2cab99
Author: Le Wang <l26wang@gmail.com>
Commit: Le Wang <l26wang@gmail.com>

    polyfill for setq-local
---
 ws-butler.el | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/ws-butler.el b/ws-butler.el
index 5a00f1bb33..d3c894c553 100644
--- a/ws-butler.el
+++ b/ws-butler.el
@@ -56,6 +56,13 @@
 (eval-when-compile
   (require 'cl))
 
+(eval-and-compile
+  (unless (fboundp 'setq-local)
+    (defmacro setq-local (var val)
+      "Set variable VAR to value VAL in current buffer."
+      ;; Can't use backquote here, it's too early in the bootstrap.
+      (list 'set (list 'make-local-variable (list 'quote var)) val))))
+
 (defgroup ws-butler nil
   "Unobtrusively whitespace deletion like a butler."
   :group 'convenience)



reply via email to

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