Browse Source

destroy electric indentation for C/C++

master
Alison G. Watson 8 months ago
parent
commit
562acd775f
2 changed files with 6 additions and 0 deletions
  1. +4
    -0
      emacs/data.el
  2. +2
    -0
      emacs/init.el

+ 4
- 0
emacs/data.el View File

@@ -33,6 +33,10 @@
standard-indent 2
tab-width 2))

(defun agw-cc-mode ()
"Sets up `c-mode' and `c++-mode'."
(c-toggle-electric-state -1))

(defun agw-before-save ()
"Hook to be run before saving a file."
(unless agw-no-fixes


+ 2
- 0
emacs/init.el View File

@@ -128,6 +128,8 @@
(defvaralias 'python-indent-offset 'tab-width))

(use-package cc-mode
:hook (( c-mode . agw-cc-mode)
(c++-mode . agw-cc-mode))
:mode (("\\.zsc\\'" . c-mode)
("\\.zc\\'" . c-mode))
:init


Loading…
Cancel
Save