我的emacs配置文件A


;(set-default-font "-microsoft-MS Reference Sans Serif-normal-normal-normal-*-13-*-*-*-m-0-iso10646-1")
(set-default-font " -unknown-DejaVu Sans-normal-normal-normal-*-13-*-*-*-*-0-iso10646-1")
(add-to-list 'load-path "/home/visaya/.emacs.d")      
(global-set-key [f8] 'menu-bar-mode)      
(tool-bar-mode nil)    
;(menu-bar-mode nil)    
                                        ;设置光标为竖线
                                        ;(setq-default cursor-type 'bar) 
;; 光标禁止闪烁-1 光标闪烁1
(blink-cursor-mode 1)
(show-paren-mode t)
;;括号匹配时显示另外一边的括号,而不是烦人的跳到另一个括号。
(setq show-paren-style 'parentheses)
                                        ;鼠标遇到光标自动躲让
                                        ;(mouse-avoidance-mode 'animate)
;;进行语法加亮。
(global-font-lock-mode t)
;;设置有用的个人信息
(setq user-full-name "visaya")
(setq user-mail-address "visayafan@gmail.com")
;;让 dired 可以递归的拷贝和删除目录。
(setq dired-recursive-copies 'top)
(setq dired-recursive-deletes 'top)
(setq visible-bell t)
;; 高亮显示选择区域
(setq transient-mark-mode t)
;; 设置tab为4个空格的宽度,而不是原来的2
(setq c-basic-offset 4)
(setq default-tab-width 4)
(setq-default indent-tabs-mode nil)
;; 不产生备份文件,临时文件
(setq make-backup-files nil)
(setq-default make-backup-files nil)
;; 打开图片显示功能
(auto-image-file-mode t)

;;==========================================================
;; 高亮当前行:hi-line.el,emacs自己带的
;;==========================================================
(require 'hl-line)
(global-hl-line-mode t)

;;页面平滑滚动, scroll-margin 3 靠近屏幕边沿3行时开始滚动,可以很好的看到上下文。 
(setq scroll-margin 3 
      scroll-conservatively 10000)

(require 'linum)      
(global-linum-mode nil)        

(require 'yasnippet-bundle)      
(setq yas/root-directory "~/.emacs.d/snippets")                                                            (yas/load-directory yas/root-directory)

;;yes no用y n代替      
(fset 'yes-or-no-p 'y-or-n-p)      
;;不要生成临时文件      
(setq-default make-backup-files nil)      
;;显示列号       
(setq column-number-mode t)        
(global-set-key [f5] 'gdb);F5调试程序      
(load-file "/home/visaya/.emacs.d/cedet-1.0/common/cedet.el")    
 ;;;;;; Enable EDE (Project Management) features      
 ;;;;(global-ede-mode 1)      
 ;;;;      
 ;;;;;; Enable EDE for a pre-existing C++ project      
 ;;;;;; (ede-cpp-root-project "NAME" :file "~/myproject/Makefile")      
 ;;;;      
 ;;;;      
 ;;;;;; Enabling Semantic (code-parsing, smart completion) features      
 ;;;;;; Select one of the following:      
 ;;;;      
 ;;;;;; * This enables the database and idle reparse engines      
 ;;;;(semantic-load-enable-minimum-features)      
 ;;;;      
 ;;;;;; * This enables some tools useful for coding, such as summary mode      
 ;;;;;;   imenu support, and the semantic navigator      
 ;;;;(semantic-load-enable-code-helpers)      
 ;;;;      
 ;;;;;; * This enables even more coding tools such as intellisense mode      
 ;;;;;;   decoration mode, and stickyfunc mode (plus regular code helpers)      
 ;;;;;; (semantic-load-enable-gaudy-code-helpers)      
 ;;;;      
 ;;;;;; * This enables the use of Exuberent ctags if you have it installed.      
 ;;;;;;   If you use C++ templates or boost, you should NOT enable it.      
 ;;;;;; (semantic-load-enable-all-exuberent-ctags-support)      
 ;;;;;;   Or, use one of these two types of support.      
 ;;;;;;   Add support for new languges only via ctags.      
 ;;;;;; (semantic-load-enable-primary-exuberent-ctags-support)      
 ;;;;;;   Add support for using ctags as a backup parser.      
 ;;;;;; (semantic-load-enable-secondary-exuberent-ctags-support)      
 ;;;;      
 ;;;;;; Enable SRecode (Template management) minor-mode.      
 ;;;;;; (global-srecode-minor-mode 1)      
 ;;;;;;;;      
;; (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)    
;; Enable EDE (Project Management) features      
(global-ede-mode 1)      
(global-set-key [(control f4)] 'speedbar)      
 ;;;; 使函数体能够折叠或展开      
;; Enable source code folding      
(global-semantic-tag-folding-mode 1)      
;;展开      
(define-key semantic-tag-folding-mode-map (kbd "C-c o") 'semantic-tag-folding-fold-block)      
;;折上      
                                        ;(define-key semantic-tag-folding-mode-map (kbd "C-c p") 'semantic-tag-folding-show-block)      
(add-to-list 'load-path "/home/visaya/.emacs.d/ecb-2.40")      
(require 'ecb)      
 ;;;;禁止每日提醒      
(setq ecb-tip-of-the-day nil)      
 ;;;; 各窗口间切换      
(global-set-key [M-left] 'windmove-left)      
(global-set-key [M-right] 'windmove-right)      
(global-set-key [M-up] 'windmove-up)      
(global-set-key [M-down] 'windmove-down)      
(add-to-list 'load-path "/home/visaya/.emacs.d/color-theme")      
(require 'color-theme)      
(eval-after-load "color-theme"      
  '(progn      
     (color-theme-initialize)))
                                        ;     (color-theme-gnome2)))    
(add-to-list 'load-path "/home/visaya/.emacs.d/auto-complete-1.3.1")    
(require 'auto-complete-config)      
(add-to-list 'ac-dictionary-directories "/home/visaya/lisp/auto-complete/ac-dict")      
(ac-config-default)      
(require 'session)      
(add-hook 'after-init-hook 'session-initialize)      
(load "desktop")       
(desktop-load-default)       
(desktop-read)      
(require 'ibuffer)      
(global-set-key (kbd "C-x C-b") 'ibuffer)      
(require 'browse-kill-ring)      
(global-set-key [(control c)(k)] 'browse-kill-ring)      
(browse-kill-ring-default-keybindings)      
(require 'ido)      
(ido-mode t)      
(global-set-key [(meta ?/)] 'hippie-expand)      
(setq hippie-expand-try-functions-list       
      '(try-expand-dabbrev      
        try-expand-dabbrev-visible      
        try-expand-dabbrev-all-buffers      
        try-expand-dabbrev-from-kill      
        try-complete-file-name-partially      
        try-complete-file-name      
        try-expand-all-abbrevs      
        try-expand-list      
        try-expand-line      
        try-complete-lisp-symbol-partially      
        try-complete-lisp-symbol))      
;;hide region      
(require 'hide-region)      
(global-set-key (kbd "C-c h r") 'hide-region-hide)      
(global-set-key (kbd "C-c s r") 'hide-region-unhide)      
;; hide lines      
(require 'hide-lines)      
(global-set-key (kbd "C-c h L") 'hide-lines)      
(global-set-key (kbd "C-c s l") 'show-all-invisible)    
(global-set-key (kbd "C-c m l") 'list-matching-lines)    
(add-hook 'c-mode-hook 'hs-minor-mode)    
(add-hook 'C++-mode-hook 'hs-minor-mode)    
(add-hook 'lisp-mode-hook 'hs-minor-mode)    
(add-hook 'html-mode-hook 'hs-minor-mode)    
(global-set-key "\C-cha" 'hs-hide-all)    
(global-set-key "\C-cas" 'hs-show-all)    
(global-set-key "\C-chb" 'hs-hide-block)    
(global-set-key "\C-cbs" 'hs-show-block)    
(global-set-key "\C-chl" 'hs-hide-level)    
(put 'narrow-to-region 'disabled nil)      
 ;;;; C-w 如果没有选中区域则删除整行      
 ;;;; M-w 如果没有选中区域则复制整行      
(defadvice kill-ring-save (before slickcopy activate compile)      
  "When called interactively with no active region, copy a single line instead."      
  (interactive      
   (if mark-active (list (region-beginning) (region-end))      
     (list (line-beginning-position)      
           (line-beginning-position 2)))))      
(defadvice kill-region (before slickcut activate compile)      
  "When called interactively with no active region, kill a single line instead."      
  (interactive      
   (if mark-active (list (region-beginning) (region-end))      
     (list (line-beginning-position)      
           (line-beginning-position 2)))))      
(setq tags-table-list      
      '("home/visaya/.emacs.d/TAGS"))    

;;;; sudo apt-get cscope
(require 'xcscope)    
(setq cscope-do-not-update-database t)
(add-hook 'c-mode-hook (function cscope:hook)) 
(add-hook 'c++-mode-hook (function cscope:hook)) 
(add-hook 'dired-mode-hook (function cscope:hook)) 
                                        ;(define-key global-map (kbd "C-c s a")  'cscope-set-initial-directory)
(define-key global-map (kbd "C-c s A")  'cscope-unset-initial-directory)
(define-key global-map (kbd "C-c s s ")  'cscope-find-this-symbol)
(define-key global-map (kbd "C-c s d")  'cscope-find-global-definition)
(define-key global-map (kbd "C-c s G")  'cscope-find-global-definition-no-prompting)
(define-key global-map (kbd "C-c s u")  'cscope-pop-mark)
(define-key global-map (kbd "C-c s n")  'cscope-next-symbol)
(define-key global-map (kbd "C-c s N")  'cscope-next-file)
(define-key global-map (kbd "C-c s p")  'cscope-prev-symbol)
(define-key global-map (kbd "C-c s P")  'cscope-prev-file)
(define-key global-map (kbd "C-c s b")  'cscope-display-buffer)
                                        ;(define-key global-map (kbd "C-c s ")' cscope-display-buffer-toggle)
(define-key global-map (kbd "C-c s c")  'cscope-find-functions-calling-this-function);显示被一个输入函数调用的所有函数。
(define-key global-map (kbd "C-c s C")  'cscope-find-called-functions);显示被输入函数调用的所有函数
(define-key global-map (kbd "C-c s f")  'cscope-find-this-file);
(define-key global-map (kbd "C-c s i")  'cscope-find-files-including-file);Find files #including a file.
(global-set-key (kbd "C-c s e") 'cscope-find-egrep-pattern);Find egrep pattern
(global-set-key (kbd "C-c s t") 'cscope-find-this-text-string);Find text string;




(global-set-key "\C-z" 'undo)    
(global-set-key "\C-ccc" 'color-theme-gnome2)    

;; For Linux 鼠标滚轮+C设置字体大小    
(global-set-key (kbd "<C-mouse-4>") 'text-scale-increase)    
(global-set-key (kbd "<C-mouse-5>") 'text-scale-decrease)    
(global-set-key "\C-cln" 'linum-mode)    
(global-set-key "\C-cmb" 'menu-bar-mode)    
(require 'tabbar)    
(tabbar-mode)    
(global-set-key (kbd "M-P") 'tabbar-backward-group)    
(global-set-key (kbd "M-N") 'tabbar-forward-group)    
(global-set-key (kbd "M-p") 'tabbar-backward)    
(global-set-key (kbd "M-n") 'tabbar-forward)    
(global-set-key "\C-cds" 'desktop-save)    
(global-set-key "\C-cdc" 'desktop-change-dir)    
(require 'winner)    
(setq x-select-enable-clipboard t);支持emacs和外部程序的粘贴    
(setq frame-title-format '("" buffer-file-name "@emacs" ));在标题栏显示buffer名    

                                        ;shell,gdb退出后,自动关闭该buffer    
(add-hook 'shell-mode-hook 'mode-hook-func)    
(add-hook 'gdb-mode-hook 'mode-hook-func)    
(defun mode-hook-func  ()    
  (set-process-sentinel (get-buffer-process (current-buffer))    
                        #'kill-buffer-on-exit))    
(defun kill-buffer-on-exit (process state)    
  (message "%s" state)    
  (if (or    
       (string-match "exited abnormally with code.*" state)    
       (string-match "finished" state))    
      (kill-buffer (current-buffer))))  
(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.
 '(tabbar-selected-face ((t (:inherit tabbar-default-face :background "#102e4e" :foreground "green" :box (:line-width 2 :color "#102e4e" :style released-button)))))
 '(tabbar-unselected-face ((t (:inherit tabbar-default-face :foreground "#102e4e" :box (:line-width 2 :color "white" :style pressed-button))))))

;;;;http://www.gnu.org/software/auctex/download-for-unix.html
;;;; .configure make sudo make install
(add-to-list 'load-path "/home/visaya/.emacs.d/auctex-11.86")
(add-to-list 'load-path "/home/visaya/.emacs.d/auctex-11.86/preview")
(load "auctex.el" nil t t)
(load "preview-latex.el" nil t t)

(setq TeX-output-view-style (quote (("^pdf$" "." "evince %o %(outpage)"))))

                                        ;(add-hook 'LaTeX-mode-hook
                                        ;     (lambda()
                                        ;       (add-to-list 'TeX-command-list '("XeLaTeX" "%`xelatex%(mode)%' %t" TeX-run-TeX nil t))
                                        ;       (setq TeX-command-default "XeLaTeX")))

(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil)
(setq preview-scale-function 1.3)
(setq LaTeX-math-menu-unicode t)
(setq TeX-insert-braces nil)
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)

;;Auctex for Latex
(add-hook 'LaTeX-mode-hook 'LaTeX-install-toolbar)
(add-hook 'LaTeX-mode-hook 'turn-on-auto-fill)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)

(add-hook 'LaTeX-mode-hook (lambda()
                             ;;调用latex命令
                             (add-to-list 'TeX-command-list (list "LaTeX" "latex %s.tex" 'TeX-run-command nil t))
                             ;;调用dvipdfmx命令
                             (add-to-list 'TeX-command-list (list "dvi2pdf" "dvipdfmx %s.dvi" 'TeX-run-command nil t))
                             ;;调用pdflatex命令;;调用pdflatex命令;;调用pdflatex命令
                             (add-to-list 'TeX-command-list (list "pdf Latex" "pdflatex %s.tex" 'TeX-run-command nil t))
                                        ; View PDF
                             (add-to-list 'TeX-command-list (list "View pdf" "start .\\\"%s.pdf\""'TeX-run-command nil t))
                             ;;设置环境为xelatex
                             (add-to-list 'TeX-command-list '("XeLaTeX" "%`xelatex%(mode)%' %t" TeX-run-TeX nil t))
                             ;;(setq TeX-command-default "XeLaTeX")
                             ;;(setq TeX-save-query nil )
                             ;;(setq TeX-show-compilation t)
                             ))
;;=================================================
;;;+     latex-math-mode
;;=================================================

;; latex-math-mode (add math symbols to menu and shortcuts)
;; So that you can use, e.g., `a, to input \alpha. You may also define
;; your own customized shortcuts by setting the variable
;; LaTeX-math-list before loading LaTeX-math-mode.
;; to enable maths support

(setq LaTeX-math-mode t)
(setq TeX-electric-escape t) ;; you may like it or dislike it. I found it useful when inputting repeated commands -- you just need to type \ and ENTER to repeat the last latex command. 

(add-hook 'LaTeX-mode-hook 'latex-math-mode)   ; with AUCTeX LaTeX mode

(add-hook 'latex-mode-hook 'latex-math-mode)   ; with Emacs latex mode

(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)

;;=================================================
;;;+     reftex-mode
;;=================================================

(autoload 'reftex-mode     "reftex" "RefTeX Minor Mode" t)
(autoload 'turn-on-reftex  "reftex" "RefTeX Minor Mode" nil)
(autoload 'reftex-citation "reftex-cite" "Make citation" nil)
(autoload 'reftex-index-phrase-mode "reftex-index" "Phrase mode" t)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)   ; with AUCTeX LaTeX mode
(add-hook 'latex-mode-hook 'turn-on-reftex)   ; with Emacs latex mode

(global-set-key (kbd "<f11>") 'v_latex_compile)
(fset 'v_latex_compile
      (lambda (&optional arg) "Keyboard macro." (interactive "p") (kmacro-exec-ring-item (quote ([3 3 return] 0 "%d")) arg)))



                                        ;(add-to-list 'load-path "/home/visaya/.emacs.d/ibus-el-0.2.1")
(require 'ibus)
                                        ;Turn on ibus-mode automatically after loading .emacs
(add-hook 'after-init-hook 'ibus-mode-on)
                                        ;Use C-SPC for Set Mark command
(ibus-define-common-key ?\C-\s nil)
                                        ;Use C-/ for Undo command 
(ibus-define-common-key ?\C-/ nil)
                                        ;Change cursor color depending on IBus status
(setq ibus-cursor-color '("red" "blue" "limegreen"))
                                        ;Use s-SPC to toggle input status
(global-set-key (kbd "S-SPC") 'ibus-toggle)

(global-set-key "\C-cid" 'insert-date)
(defun insert-date ()
  "Insert date at point."
  (interactive)
  (insert (format-time-string "%Y年%m月%e日 %a %l:%M %p")))
(global-set-key "\C-cid" 'insert-date)

                                        ; insert-current-time
(defun insert-current-time () 
  "Insert the current time" 
  (interactive "*") 
  (insert (current-time-string))) 
(global-set-key "\C-cit" 'insert-current-time)

;;;;去掉喇叭声
(setq visible-bell t)


(setq inhibit-startup-message t)
(setq gnus-inhibit-startup-message t)



;;(require 'gccsense)
;;(add-hook 'c-mode-common-hook
;;    (lambda ()
;;      (local-set-key [(meta ?/)] 'ac-complete-gccsense)))

(add-hook 'c-mode-common-hook
          (lambda () (c-subword-mode 1)))

(setq default-abbrev-mode t)

(global-set-key [f9] 'ecb-activate)

(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.
 '(c-default-style (quote ((java-mode . "java") (awk-mode . "awk") (other . "gnu"))))
 '(column-number-mode t)
 '(default-input-method "chinese-b5-quick")
 '(matlab-shell-command "/usr/local/MATLAB/R2010b/bin/matlab")
 '(menu-bar-mode t))

(require 'unicad)

(add-to-list 'load-path "/home/visaya/.emacs.d/matlab-emacs/matlab-emacs")
(require 'matlab-load)
(autoload 'matlab-mode "matlab" "Enter MATLAB mode." t)
(setq auto-mode-alist (cons '("\\.m\\'" . matlab-mode) auto-mode-alist))
(autoload 'matlab-shell "matlab" "Interactive MATLAB mode." t)
(setq matlab-verify-on-save-flag nil) ; turn off auto-verify on save
(defun my-matlab-mode-hook ()
  (setq fill-column 76))        ; where auto-fill should wrap
(add-hook 'matlab-mode-hook 'my-matlab-mode-hook)
(defun my-matlab-shell-mode-hook ()
  '())
(add-hook 'matlab-shell-mode-hook 'my-matlab-shell-mode-hook)
(global-font-lock-mode t)
                                        ;(matlab-mode-hilit)
(autoload 'tlc-mode "tlc" "tlc Editing Mode" t)
(add-to-list 'auto-mode-alist '("\\.tlc$" . tlc-mode))
(setq tlc-indent-function t)



                                        ;(global-set-key [(control f4)] 'my-fullscreen)
                                        ;全屏
(defun fs()
  (interactive)
  (x-send-client-message
   nil 0 nil "_NET_WM_STATE" 32
   '(2 "_NET_WM_STATE_FULLSCREEN" 0))
  )

(auto-image-file-mode t)

(global-set-key [f11] 'v-xelatex-compile)
(fset 'v-xelatex-compile
      (lambda (&optional arg) "Keyboard macro." (interactive "p") (kmacro-exec-ring-item (quote ([3 3 return] 0 "%d")) arg)))

                                        ;(global-set-key [(control f11)] 'v-xelatex-view)
                                        ;(fset 'v-xelatex-view
                                        ;      (lambda (&optional arg) "Keyboard macro." (interactive "p") (kmacro-exec-ring-item (quote ([3 3 return return] 0 "%d")) arg)))

(put 'downcase-region 'disabled nil)


;; 使用cperl-mode代替默认的perl-mode
(add-to-list 'auto-mode-alist '("\\.\\([pP][Llm]\\|al\\)\\'" . cperl-mode))
(add-to-list 'interpreter-mode-alist '("perl" . cperl-mode))
(add-to-list 'interpreter-mode-alist '("perl5" . cperl-mode))
(add-to-list 'interpreter-mode-alist '("miniperl" . cperl-mode))

;; 缩进相关
(add-hook 'cperl-mode-hook 'n-cperl-mode-hook t)
(defun n-cperl-mode-hook ()
  (setq cperl-indent-level 4)
  (setq cperl-continued-statement-offset 0)
  (setq cperl-extra-newline-before-brace t)
  (set-face-background 'cperl-array-face "wheat")
  (set-face-background 'cperl-hash-face "wheat")
  )

                                        ;这里是我的matlab-emacs所在的路径
(add-to-list 'load-path "home/visaya.emacs.d/matlab-emacs/matlab-emacs")
(require 'matlab-load)
(autoload 'matlab-mode "matlab" "Enter MATLAB mode." t)
(setq auto-mode-alist (cons '("\\.m\\'" . matlab-mode) auto-mode-alist))
(autoload 'matlab-shell "matlab" "Interactive MATLAB mode." t)
(setq matlab-verify-on-save-flag nil) ; turn off auto-verify on save
(defun my-matlab-mode-hook ()
  (setq fill-column 76)) ; where auto-fill should wrap
(add-hook 'matlab-mode-hook 'my-matlab-mode-hook)
(defun my-matlab-shell-mode-hook ()
  '())
(add-hook 'matlab-shell-mode-hook 'my-matlab-shell-mode-hook)
(global-font-lock-mode t)
                                        ;(matlab-mode-hilit)
(autoload 'tlc-mode "tlc" "tlc Editing Mode" t)
(add-to-list 'auto-mode-alist '("\\.tlc$" . tlc-mode))
(setq tlc-indent-function t)

(setq tab-width 4 indent-tabs-mode nil)



(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
(global-set-key "\C-col" 'org-store-link)
(global-set-key "\C-coc" 'org-capture)
(global-set-key "\C-coa" 'org-agenda)
(global-set-key "\C-cob" 'org-iswitchb)
(add-hook 'org-mode-hook 
          (lambda () (setq truncate-lines nil)))

;; iimage mode
(autoload 'iimage-mode "iimage" "Support Inline image minor mode." t)
(autoload 'turn-on-iimage-mode "iimage" "Turn on Inline image minor mode." t)
(defun org-toggle-iimage-in-org ()
  "display images in your org file"
  (interactive)
  (if (face-underline-p 'org-link)
      (set-face-underline-p 'org-link nil)
    (set-face-underline-p 'org-link t))
  (iimage-mode))

(require 'edit-server)
(edit-server-start)

(put 'upcase-region 'disabled nil)

(require 'autopair)
(autopair-global-mode) ;; to enable in all buffers

(defun latex-auto-pair () 
  (interactive) 
  (make-local-variable 'skeleton-pair-alist) 
  (setq skeleton-pair-alist  '( 
                               (?$  _ "$") 
                               )) 
  (setq skeleton-pair t) 
  (local-set-key (kbd "$") 'skeleton-pair-insert-maybe) 
  ) 
(add-hook 'LaTeX-mode-hook 'latex-auto-pair) 
(add-hook 'latex-mode-hook 'latex-auto-pair)

(defun my-c-mode-common-hook()
  (setq tab-width 4 indent-tabs-mode nil)
  ;;; hungry-delete and auto-newline
  (c-toggle-auto-hungry-state 1)
 ; ;;按键定义
  (define-key c-mode-base-map [(f7)] 'compile)
 ; ;;预处理设置
 ; (setq c-macro-shrink-window-flag t)
 ; (setq c-macro-preprocessor "cpp")
 ; (setq c-macro-cppflags " ")
 ; (setq c-macro-prompt-flag t)
 ; (setq hs-minor-mode t)
 ; (setq abbrev-mode t)
  )
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)

;;; CC-mode配置  http://cc-mode.sourceforge.net/
(setq c-default-style
    '((c-mode . "k&r") (other . "gnu")))
(setq c-basic-offset 4)

(add-hook 'c++-mode-hook
          '(lambda()
             (c-set-style "k&r")))

(global-set-key "\C-ciy" 'yas/insert-snippet)

(add-to-list 'load-path "/home/visaya/.emacs.d/doxymacs-1.8.0/lisp")
(require 'doxymacs)
(add-hook 'c-mode-common-hook 'doxymacs-mode)
(add-hook 'python-mode-hook 'doxymacs-mode)


;abbrev-mode
(setq abbrev-file-name             ;; tell emacs where to read abbrev
        "~/.emacs.d/abbrev_defs")    ;; definitions from...
(setq save-abbrevs t)              ;; save abbrevs when files are saved
                                     ;; you will be asked before the abbreviations are saved
(setq default-abbrev-mode t)


;muse.el
(require 'muse-mode) ; load authoring mode
(require 'muse-html) ; load publishing styles I use
(require 'muse-latex)
(require 'muse-texinfo)
(require 'muse-docbook)
(require 'muse-project) ; publish files in projects

(setq muse-project-alist
      '(("website" ("/home/visaya/study/museMode/Pages" :default "index")
         (:base "html" :path "~/public_html")
         (:base "pdf" :path "~/public_html/pdf"))))
(require 'org)
(define-key muse-mode-map (kbd "<tab>") 'org-cycle)
(define-key muse-mode-map (kbd "<S-iso-lefttab>") 'org-shifttab)


;htmlize.el 可以将文件内容转化为html格式的插件
(require 'htmlize)

Author: visaya<visayafan@gmail.com>

Date: 2011-08-10 12:35:06 CST

HTML generated by org-mode 6.33x in emacs 23

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值