summary refs log tree commit diff stats
path: root/user
diff options
context:
space:
mode:
authorAlan Pearce2021-01-28 15:50:24 +0100
committerAlan Pearce2021-01-28 15:50:24 +0100
commit394c97ecffbd5907619c6fd4c4b9ac8a62ba2288 (patch)
treec617e8543543d7c6fed7db92db5ac22bb3712d02 /user
parent192527370d8248daa14ba8cedcb0d7c4369c134a (diff)
downloadnixfiles-394c97ecffbd5907619c6fd4c4b9ac8a62ba2288.tar.lz
nixfiles-394c97ecffbd5907619c6fd4c4b9ac8a62ba2288.tar.zst
nixfiles-394c97ecffbd5907619c6fd4c4b9ac8a62ba2288.zip
Emacs: only make / a surround pair in javascript-mode
Diffstat (limited to 'user')
-rw-r--r--user/emacs/init.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index 3a0ad39a..0c0e0be9 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -338,8 +338,9 @@ _p_rev       _u_pper              _=_: upper/lower       _r_esolve
   :after evil
   :defer 2
   :config (progn
-            (define-and-bind-quoted-text-object "slash" "/" "\\/" "\\/")
-            (push '(?\/ . ("/" . "/")) evil-surround-pairs-alist)
+            (add-hook 'javascript-mode-hook (lambda ()
+                                              (define-and-bind-quoted-text-object "slash" "/" "\\/" "\\/")
+                                              (push '(?\/ . ("/" . "/")) evil-surround-pairs-alist)))
             (global-evil-surround-mode +1)))