branch: elpa/ws-butler
commit 93409c1ca73ce2a68888c9222f5f40c61c2cab99
Author: Le Wang <[email protected]>
Commit: Le Wang <[email protected]>

    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