1 ;; Configuration file for cc-ide.el (Emacs C++ IDE extension, see http://g0dil.de)
5 (c-backslash-column . 98)
6 (c-cleanup-list . (empty-defun-braces
10 compact-empty-funcall))
11 (c-hanging-braces-alist . ((namespace-open after)
12 (namespace-close before after)
15 (substatement-open after)
16 (block-close . c-snug-do-while)
17 (extern-lang-open after)
18 (inexpr-class-open after)
19 (inexpr-class-close before)))
20 (c-offsets-alist . ((namespace-open . 0)
23 (statement-block-intro . +)
24 (substatement-open . 0)
26 (statement-cont . +))) ))
28 (c-add-style "senf" senf-c-style)
30 (set (make-local-variable 'ccide-file-vars)
31 '(( fill-column . 100 )
32 ( comment-column . 40 )
33 ( c-file-style . "senf" )
34 ( indent-tabs-mode . nil )
35 ( ispell-local-dictionary . "american" )
36 ( compile-command . "scons -u test") ))
38 (set (make-local-variable 'ccide-default-copyright)
40 "// This program is free software; you can redistribute it and/or modify\n"
41 "// it under the terms of the GNU General Public License as published by\n"
42 "// the Free Software Foundation; either version 2 of the License, or\n"
43 "// (at your option) any later version.\n"
45 "// This program is distributed in the hope that it will be useful,\n"
46 "// but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
47 "// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
48 "// GNU General Public License for more details.\n"
50 "// You should have received a copy of the GNU General Public License\n"
51 "// along with this program; if not, write to the\n"
52 "// Free Software Foundation, Inc.,\n"
53 "// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n"))
55 (let ((local-conf (ccide-project-search-upwards "project-local.el")))
57 (load-file local-conf)))
59 (defun flyspell-cc-progmode-verify ()
60 "Replacement for standard flyspell-generic-progmode-verify which
61 checks for C/C++ preproc directives. Additionally, anything after ^L
62 is ignored (Those are the file local variables and local words)."
63 (let ((f (get-text-property (point) 'face)))
64 (and (memq f flyspell-prog-text-faces)
67 (looking-at "\\(//\\)?#")))
68 (not (let ((l (max (point-min) (- (point-max) 4096))))
70 (save-excursion (search-backward "
\f" l t))))))))
72 (defun flyspell-cc-mode ()
73 "Torn on `flyspell-mode` for comments and strings in C/C++ mode."
75 (setq flyspell-generic-check-word-p 'flyspell-cc-progmode-verify)
78 ;; Better set this here than in the file variables since the setting
79 ;; is only valid if project.el is loaded ...
80 (set (make-local-variable 'ispell-personal-dictionary)
81 (expand-file-name "senf.dict" ccide-project-root))