Next: , Previous: , Up: Miscellaneous  


Q5.0.4: How can I enable auto-indent and/or Filladapt?

Put the following line in your init.el:

(setq indent-line-function 'indent-relative-maybe)

If you want to get fancy, try the filladapt package available standard with SXEmacs. Put this into your init.el:

(require 'filladapt)
(setq-default filladapt-mode t)
(add-hook 'c-mode-hook 'turn-off-filladapt-mode)

This will enable Filladapt for all modes except C mode, where it doesn’t work well. To turn Filladapt on only in particular major modes, remove the (setq-default ...) line and use turn-on-filladapt-mode, like this:

(add-hook 'text-mode-hook 'turn-on-filladapt-mode)

You can customize filling and adaptive filling with Customize. Select from the Options menu Advanced (Customize)->Emacs->Editing->Fill->Fill... or type M-x customize RET fill RET.

Note that well-behaving text-lookalike modes will run text-mode-hook by default (e.g. that’s what Message does). For the nasty ones, you’ll have to provide the add-hooks yourself.

Please note that the fa-extras package is no longer useful.