File tree Expand file tree Collapse file tree 3 files changed +52
-0
lines changed Expand file tree Collapse file tree 3 files changed +52
-0
lines changed Original file line number Diff line number Diff line change 55(when (and (>= emacs-major-version 23 ) (window-system )) ; frame
66 (load " ~/.emacs.d/modules/window.el" ))
77(load " ~/.emacs.d/modules/theme.el" ) ; color theme
8+ (load " ~/.emacs.d/modules/objc.el" ) ; objc
9+ (load " ~/.emacs.d/modules/java.el" ) ; java
810(load " ~/.emacs.d/modules/python.el" ) ; python
Original file line number Diff line number Diff line change 1+ (add-hook 'java-mode-hook
2+ (lambda ()
3+ " Treat Java 1.5 @-style annotations as comments."
4+ (setq c-comment-start-regexp " (@|/(/|[*][*]?))" )
5+ (modify-syntax-entry ?@ " < b" java-mode-syntax-table)))
6+
7+ (add-hook 'java-mode-hook (lambda ()
8+ (setq c-basic-offset 2 )))
9+
10+ (add-hook 'java-mode-hook (lambda ()
11+ (setq c-basic-offset 2
12+ tab-width 2
13+ indent-tabs-mode t )))
Original file line number Diff line number Diff line change 1+ (add-to-list 'auto-mode-alist '(" \\ .mm\\ '" . objc-mode))
2+ (add-to-list 'magic-mode-alist
3+ `(,(lambda ()
4+ (and (string= (file-name-extension buffer-file-name) " h" )
5+ (re-search-forward " @\\ <interface\\ >"
6+ magic-mode-regexp-match-limit t )))
7+ . objc-mode))
8+
9+ (require 'find-file ) ; ; for the "cc-other-file-alist" variable
10+ (nconc (cadr (assoc " \\ .h\\ '" cc-other-file-alist)) '(" .m" " .mm" ))
11+
12+ (defadvice ff-get-file-name (around ff-get-file-name-framework
13+ (search-dirs
14+ fname-stub
15+ &optional suffix-list))
16+ " Search for Mac framework headers as well as POSIX headers."
17+ (or
18+ (if (string-match " \\ (.*?\\ )/\\ (.*\\ )" fname-stub)
19+ (let* ((framework (match-string 1 fname-stub))
20+ (header (match-string 2 fname-stub))
21+ (fname-stub (concat framework " .framework/Headers/" header)))
22+ ad-do-it))
23+ ad-do-it))
24+ (ad-enable-advice 'ff-get-file-name 'around 'ff-get-file-name-framework )
25+ (ad-activate 'ff-get-file-name )
26+
27+ (setq cc-search-directories '(" ." " ../include" " /usr/include" " /usr/local/include/*"
28+ " /System/Library/Frameworks" " /Library/Frameworks" ))
29+
30+
31+ (add-hook 'objc-mode-hook (lambda ()
32+ (setq c-basic-offset 2 )))
33+
34+ (add-hook 'objc-mode-hook (lambda ()
35+ (setq c-basic-offset 2
36+ tab-width 2
37+ indent-tabs-mode t )))
You can’t perform that action at this time.
0 commit comments