发博文
forever_yl

foreveryl.blog.chinaunix.net

   
个人资料
  • 博客访问:1897
  • 博文数量:14
  • 博客积分:282
  • 博客等级:二等列兵
  • 注册时间:2011-05-20 17:19:56
订阅我的博客
  • 订阅
  • 订阅到鲜果
  • 订阅到抓虾
  • 订阅到Google
字体大小: 博文
emacs 文件 (2011-06-08 16:59)
分类: tmp


;(load-file "/home/yaolu/.emacs.d/color-theme.el")
;(color-theme-initialize)
(require 'color-theme)
(require 'google-c-style)
(setq default-major-mode 'text-mode)
(setq global-font-lock-mode t)
(show-paren-mode t)
(setq column-number-mode t)
(setq line-number-mode t)
(setq x-select-enable-clipboard t)
(fset 'yes-or-no-p  'y-or-n-p)
(setq-default indent-tabs-mode t)
(setq default-tab-width 4)
;(setq tab-stop-list ())
(setq-default kill-whole-line t)

(add-hook 'c-mode-common-hook 'google-set-c-style)
(add-hook 'c-mode-common-hook 'google-make-newline-indent)
 (add-hook 'c++-mode-hook
          '(lambda()
             ;(c-set-style "user")
    (hs-minor-mode)
             (c-toggle-auto-state)))
;(setq c-basic-offset 4)
;(setq auto-mode-alist
;  (cons '("\\.h$" . c++-mode)
;   auto-mode-alist))
 
(add-hook 'texinfo-mode-hook (lambda () (require 'sb-texinfo)))
(load-file "/home/yaolu/download/cedet-1.0/common/cedet.el")
(semantic-load-enable-minimum-features)
(semantic-load-enable-code-helpers)
(semantic-load-enable-guady-code-helpers)
;(semantic-load-enable-excessive-code-helpers)
;(semantic-load-enable-semantic-debugging-helpers)
(autoload 'speedbar-frame-mode "speedbar" "Popup a speedbar frame" t)
(autoload 'speedbar-get-focus "speedbar" "Jump to speedbar frame" t)
(require 'semantic-ia)
(require 'semantic-gcc)
(setq-mode-local c-mode semanticdb-find-default-throttle
         '(project unloaded system recursive))
(require 'semanticdb)
(defconst cedet-user-include-dirs
  (list ".." "../include" "../.." "../../.." "../../include" "../../../inlcude"   "../.." "../../include" "../../sslib/include" "../../sslib/include/mongo"  "/usr/include/sys" "/usr/include/bits" "/usr/include/c++/4.1.1"  ))
(setq cedet-sys-include-dirs (list
                              "/usr/include"))
(let ((include-dirs cedet-user-include-dirs))
  (setq include-dirs (append include-dirs cedet-sys-include-dirs))
  (mapc (lambda (dir)
          (semantic-add-system-include dir 'c++-mode)
          (semantic-add-system-include dir 'c-mode))
        include-dirs))
(require 'cogre)
(require 'cedet-contrib)
(cogre-uml-enable-unicode)
 

(define-key-after (lookup-key global-map [menu-bar tools])
                                       [speedbar]
                                       '("Speedbar" .
                                       speedbar-frame-mode)
                                       [calendar])
(global-set-key [F12] 'semantic-ia-fast-jump)
;(define-key c-mode-base-map (kbd "M-n")  'semantic-ia-complete-symbol)
(add-to-list 'load-path "/home/yaolu/download/ecb-2.40")
(require 'ecb)
 

;;;;CC-mode
(require 'cc-mode)
(c-set-offset 'inline-open 0)
(c-set-offset 'friend '-)
(c-set-offset 'substatement-open 0)
 

(custom-set-variables
  ;; custom-set-variables was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 '(ecb-options-version "2.40"))
(custom-set-faces
  ;; custom-set-faces was added by Custom.
  ;; If you edit it by hand, you could mess it up, so be careful.
  ;; Your init file should contain only one such instance.
  ;; If there is more than one, they won't work right.
 )

博客推荐文章
前一篇:code-snippet 1
亲,您还没有登录,请[登录][注册]后再进行评论