;;; OOo emacs mode ;;; There is a IMO rather unhelpful indent mode at ;;; http://wiki.services.openoffice.org/wiki/Editor_Emacs. ;;; OOo indentation is basically stroustrup, with some small additions ;;; ;; annotated (defconst ooo-stroustrup '((c-basic-offset . 4) (c-comment-only-line-offset . 0) (c-offsets-alist . ((statement-block-intro . +) (substatement-open . 0) (substatement-label . 0) (label . 0) (statement-cont . +) ;; * indented case (case-label . +) ;; * no extra inline block indents (inline-open . 0) (inline-close . 0) ;; * no name space indent (innamespace . 0))) ;; no backslash rearrangements (c-auto-align-backslashes . nil))) (defun ooo-c-mode-common-hook () (c-add-style "ooo-stroustrup" ooo-stroustrup t) (c-set-style "ooo-stroustrup") ;; Lots of OO.o code blondly uses tab size: 4, which confuses most ;; every text based tool on the planet (diff anyone?). (setq tab-width 4) ;; but sanity is slowly taking over, and tabs are discouraged! (setq indent-tabs-mode nil) (camelCase-mode)) (defvar ooo-c-mode-path-regexp ".*/vc/ooo-.*" "Regexp that matches paths into your OpenOffice.org source tree.") (defun conditional-ooo-c-mode-common-hook () (when (string-match ooo-c-mode-path-regexp buffer-file-name) (message "Using OpenOffice.org code settings") (ooo-c-mode-common-hook))) (add-hook 'c-mode-common-hook 'conditional-ooo-c-mode-common-hook) (require 'compile) (setq idlc-error '(idlc "^\\([^ \n]+.idl\\)(\\([0-9]+\\)) : .*" 1 2)) (push idlc-error compilation-error-regexp-alist-alist) (push 'idlc compilation-error-regexp-alist) ;;(require 'camelCase) (load-library "camelCase-mode") (setenv "ENABLE_MONO_CLIMAKER" "NO") (setenv "ENABLE_LAYOUT" "YES")