Emacs for orocos coding style {Was [Bug 538] Unable specify log level when starting deployer}

On Wed, May 14, 2008 at 2:43 PM, S Roderick <kiwi [dot] net [..] ...> wrote:
[...]
> Sorry in advance for the indenting ... I saw recent traffic re
> orocos-emacs-c-mode. Was a consensus reached about the code?

Well, let's see if Peter still whines about your patches using this
piece of lisp code :-)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun orocos-mode()
  "C++ mode with adjusted defaults for use with orocos."
  (interactive)
  (c++-mode)
  (setq tab-width 4)
  (setq c-basic-offset 4)
  (setq indent-tabs-mode nil))
(add-hook 'orocos-mode-common-hook
          '(lambda ()
             (abbrev-mode 1)
             (auto-fill-mode 1)
             (hide-ifdef-mode 1))
)
(add-to-list 'auto-mode-alist
'("/\\(rtt\\|ocl\\).*\\.\\(cpp\\|cxx\\|hpp\\|hxx\\)$" . orocos-mode))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Note that
* the above "automagic orocos-mode selection" will only work if your
local (SVN-)copies are in directories whose names start with rtt or
ocl , e.g. in my case
[kgad@ampere ~]$
ls SVN/orocos/
bfl-trunk ocl-1.4 orocos-apps-examples-trunk rtt-1.4 rtt-trunk
* (setq tab-width 4) is probably not necessary (but doesn't harm)
* You might remove/alter the hooks if you don't like them (apart from
the auto-fill-mode perhaps, but I can't find anything about that in
doc/CODING_STYLE.txt)...

@Ruben (No discrimination: I was just too lazy to check whether KDL
also uses POVIS [*])

[*] Peter's Own Version of Indentation Style

If it works properly, it might be worth putting this on the developer pages.

HTH

Klaas