One problem I have never solved nor seen a good solution to is perhaps best introduced by an example:
Imagine your work, or maybe your open source projects have various coding standards. The usual stuff. So rather than fight city hall, I would like to be able to apply different coding styles defined by c-add-style. More or less straight forward.
The challenge for me is in when and how to apply a style.
I would like to have a list of predicates that get evaluated by some hook or other and when true, run that function to create those effects.
I likely also would like a function that runs for every programming file that is visited, eg, to replace tabs with spaces?
- [X] read CC Mode Overview
- looks like I will be most interested in:
c-mode
java-mode
awk-mode
- looks like I will be most interested in:
- [X] read CC Mode Overview
- [X] read CC Mode Config Basics
newline indents to the proper level as described here
K&R is close to what I want. Changes from K&R:
- 4 space offset, not 5
- replace tabs with spaces in all cases
So define a new C style based on K&R