Why does Emacs turn TAB (\t) into multiple spaces when backspacing?

62 Views Asked by At

Something I've encountered, notaby within CC-Mode related languages, is that when I press TAB and then backspace, Emacs then treats it as if it were 4 spaces (or however big my tabstop was). Why does Emacs have this behavior and is there a way to override it in the Major CC-Mode and perhaps other major modes that have a similar behavior?

I have tried playing around with the Emacs indent, offset, and hooks in my init.el though haven't gotten any notabe results.

1

There are 1 best solutions below

1
phils On BEST ANSWER

See:

  • C-hig (ccmode)Hungry WS Deletion
  • C-hv c-backspace-function