From 0be142e232c52ce87151cbdc337d772e2c23b42b Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Thu, 20 Apr 2017 15:48:55 +0200 Subject: [PATCH] Switch from electric-spacing to electric-operator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s more reliable, and it doesn’t mess up operator characters within strings. It has its own quirks, though. --- init.el | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/init.el b/init.el index 07cec61..e7de148 100644 --- a/init.el +++ b/init.el @@ -503,10 +503,12 @@ :config (add-hook 'c-mode-hook 'electric-case-c-init)) -(use-package electric-spacing - :pin gnu +(use-package electric-operator :config - (add-hook 'c-mode-common-hook 'electric-spacing-mode)) + (add-hook 'c-mode-common-hook 'electric-operator-mode) + ;; Apply electric-operator-mode to vala-mode, too + (apply #'electric-operator-add-rules-for-mode 'vala-mode + electric-operator-prog-mode-rules)) (use-package emamux)