From 394c97ecffbd5907619c6fd4c4b9ac8a62ba2288 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 28 Jan 2021 15:50:24 +0100 Subject: Emacs: only make / a surround pair in javascript-mode --- user/emacs/init.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'user') 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))) -- cgit 1.4.1