src.nth.io/

summaryrefslogtreecommitdiff
path: root/hoersten-c-style.el
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2009-01-09 10:39:57 -0600
committerLuke Hoersten <[email protected]>2009-01-09 10:39:57 -0600
commit179e7c6c2956c5802f089e965606eadd34cece2c (patch)
tree5266961078eac4c96e82c294e8566ae91da2f3b9 /hoersten-c-style.el
parent66f6f22935de450a3b0dd0a522d19e2304d2c6b5 (diff)
Minor updates.
Diffstat (limited to 'hoersten-c-style.el')
-rw-r--r--hoersten-c-style.el87
1 files changed, 46 insertions, 41 deletions
diff --git a/hoersten-c-style.el b/hoersten-c-style.el
index ae986d3..28405e6 100644
--- a/hoersten-c-style.el
+++ b/hoersten-c-style.el
@@ -2,49 +2,54 @@
;; hoersten c++-style
(c-add-style "hoersten"
- '(;; indentation
- (indent-tabs-mode . t)
- (tab-width . 3)
- (c-basic-offset . 3)
-
- ;; brace cleanups
- (c-cleanup-list
- brace-else-brace
- brace-elseif-brace
- brace-catch-brace
- empty-defun-braces
- defun-close-semi
- list-close-comma
- scope-operator)
-
- ;; syntactic symbols
- (c-offsets-alist
- (substatement-open . 0)
- (inline-open . 0)
- (case-label . +)
- (innamespace . 0)
- (cpp-macro . -))))
+ '(;; indentation
+ (indent-tabs-mode . t)
+ (tab-width . 3)
+ (c-basic-offset . 3)
+
+ ;; brace cleanups
+ (c-cleanup-list
+ brace-else-brace
+ brace-elseif-brace
+ brace-catch-brace
+ empty-defun-braces
+ defun-close-semi
+ list-close-comma
+ scope-operator)
+
+ ;; syntactic symbols
+ (c-offsets-alist
+ (substatement-open . 0)
+ (inline-open . 0)
+ (case-label . +)
+ (innamespace . 0)
+ (cpp-macro . -))))
;; c-like language settings (c, c++, java, etc.)
(setq-default c-hungry-delete-key t) ; enable hungry delete
(setq-default c-default-style "hoersten") ; load c-style
(add-hook 'c-mode-common-hook
- (lambda()
- (c-toggle-auto-newline t) ; auto newline
- (auto-fill-mode t) ; word wrap
-
- ;; custom keys
- (local-set-key (kbd "C-c f") 'ff-find-other-file) ; toggle header/source file
- (local-set-key (kbd "C-c C-c") 'comment-or-uncomment-region)
-
- ;; code folding
- (local-set-key (kbd "C-c v") 'hs-toggle-hiding)
- (local-set-key (kbd "<f1>") 'hs-hide-all)
- (local-set-key (kbd "<f2>") 'hs-show-all)
- (hs-minor-mode t) ; enable hide-show mode
- (hs-hide-all) ; hide all blocks by default
-
- ;; highlight todos
- (font-lock-add-keywords
- nil
- '(("\\([@]\\(TODO\\|todo\\|warning\\)\\)" 1 font-lock-warning-face t)))))
+ (lambda()
+ ;; indentation
+ (setq tab-width 3)
+ (setq c-basic-offset 3)
+ (setq indent-tabs-mode t)
+
+ (c-toggle-auto-newline t) ; auto newline
+ (auto-fill-mode t) ; word wrap
+
+ ;; custom keys
+ (local-set-key (kbd "C-c f") 'ff-find-other-file) ; toggle header/source file
+ (local-set-key (kbd "C-c C-c") 'comment-or-uncomment-region)
+
+ ;; code folding
+ (local-set-key (kbd "C-c v") 'hs-toggle-hiding)
+ (local-set-key (kbd "<f1>") 'hs-hide-all)
+ (local-set-key (kbd "<f2>") 'hs-show-all)
+ (hs-minor-mode t) ; enable hide-show mode
+ (hs-hide-all) ; hide all blocks by default
+
+ ;; highlight todos
+ (font-lock-add-keywords
+ nil
+ '(("\\([@]\\(TODO\\|todo\\|warning\\|note\\)\\)" 1 font-lock-warning-face t)))))