DirectFB:Maintaining DirectFB FAQ
From DirectFBWiki
[edit]
How do I setup Emacs to edit DirectFB or LiTE source files?
In my .emacs file, I've got these lines:
(require 'cc-mode)
(defun my-c-mode-common-hook ()
(c-set-style "bsd")
(cond
((string-match "/lite/" (buffer-file-name))
(setq tab-width 5))
((string-match "/directfb/" (buffer-file-name))
(setq tab-width 5))
(t
(setq tab-width 4)))
(setq c-basic-offset tab-width)
(setq indent-tabs-mode nil)) ;; force only spaces for indentation
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)
This modifies the style of anything I edit in my directfb or lite trees to use 5-spaces indentation, spaces instead of tabs, and BSD-style indentation, which is approximately the style used in DirectFB and LiTE.
