Don't use c-toggle-{electric-state,auto-newline} globally
Fixes an odd error where: 1. You open an elixir-mode buffer 2. elixir-mode sets `mode-name` to a non-string value 3. cc-mode is pulled in by one of its dependencies 4. `c-toggle-electric-state` is called from the config/default module 5. Which calls `c-update-modeline` 6. Which operates on `mode-name` and assumes it is a string 7. And a wrong-type-argument: stringp error is thrown
This commit is contained in:
parent
176be128ef
commit
114be4af57
1 changed files with 1 additions and 3 deletions
|
@ -123,9 +123,7 @@
|
|||
;; Disable electric keys in C modes because it interferes with smartparens
|
||||
;; and custom bindings. We'll do it ourselves (mostly).
|
||||
(after! cc-mode
|
||||
(c-toggle-electric-state -1)
|
||||
(c-toggle-auto-newline -1)
|
||||
(setq c-electric-flag nil)
|
||||
(setq-default c-electric-flag nil)
|
||||
(dolist (key '("#" "{" "}" "/" "*" ";" "," ":" "(" ")" "\177"))
|
||||
(define-key c-mode-base-map key nil))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue