all
Now I'm editing c sources with emacs under c-mode. How ever auto-fill-mode doesn't seem to work at all. Here how I enabled and tried to use it.
- M-x auto-fill-mode (enable auto-fill-mode)
- Typed in a line longer than auto-fill size(which 80 characters for now) --> didn't break the line
- Tried to auto-filled by issuing M-q
However above attempt didn't work out at all. Could anybody point out that what have I done wrong?
Thanks for your help in advance.
When you use
auto-fill-mode
inc-mode
, the default behavior is to wrap text only when writing text, as in a comment. You can override this by customizing the value ofc-ignore-auto-fill
. Note that emacs will wrap and indent your code as text, which is probably not what you want.A better solution is probably to bind space to a function like this: