Emacs配置备份
Wednesday, 4. November 2009, 14:08:38
(require 'site-gentoo)
;; ECB
;;(require 'ecb)
;; Initialize Pymacs(included in gentoo)
(autoload 'pymacs-apply "pymacs")
(autoload 'pymacs-call "pymacs")
(autoload 'pymacs-eval "pymacs" nil t)
(autoload 'pymacs-exec "pymacs" nil t)
(autoload 'pymacs-load "pymacs" nil t)
;; ????????
(set-default-font "Monospace-7")
;; Activate highlight in search and replace
(setq search-highlight t)
(setq query-replace-highlight t)
;; Browser
(setq browse-url-generic-program "chromium-bin")
;; ????????
(prefer-coding-system 'utf-8)
;; no create backupd
(setq make-backup-files nil)
;; save histroy
(setq savehist-file "~/.emacs.d/.savehist")
(savehist-mode 1)
;; scroll line by line
(setq scroll-step 1)
;; TODO/FIXME/DEBUG highlight
(add-hook 'c-mode-common-hook
(lambda ()
(font-lock-add-keywords nil
'(("\\<\\(FIXME\\|TODO\\|DEBUG\\)[\s:]" 1 font-lock-warning-face t)))))
;; load emacs script
(let ((default-directory "~/.emacs.d/"))
(add-to-list 'load-path default-directory)
(normal-top-level-add-subdirs-to-load-path))
;; YAML mode
(add-to-list 'auto-mode-alist '("\\.ya?ml$" . yaml-mode))
(autoload 'yaml-mode "yaml" nil t)
;; Javascript mode
;;(add-to-list 'auto-mode-alist '("\\.js\\'" . javascript-mode))
;;(autoload 'javascript-mode "javascript" nil t)
(autoload 'js2-mode "js2" nil t)
(add-to-list 'auto-mode-alist '("\\.js$" . js2-mode))
;; CSS mode
(add-to-list 'auto-mode-alist '("\\.css\\'" . css-mode))
(autoload 'css-mode "css" nil t)
;; Python mode
(autoload 'python-mode "python-mode" "Python Mode." t)
(add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode))
(add-to-list 'interpreter-mode-alist '("python" . python-mode))
;; Auto complete
(require 'auto-complete)
;; Yet Another Snippet extension
(require 'yasnippet)
(yas/initialize)
(yas/load-directory "~/.emacs.d/site-lisp/yasnippet/snippets")
;; AUCTex
(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-save-query nil)
(setq TeX-show-compilation t)
))
;; SCIM Bridge
;;(require 'scim-bridge)
;; ????????????
;;(add-hook 'after-init-hook 'scim-mode-on)
;; ????????????
;;(add-hook 'after-make-frame-functions
;; (lambda (frame)
;; (with-selected-frame frame
;; (when window-system
;; (scim-mode-on)
;
;; ??????Emacs????"C-\"
;;(scim-define-common-key (kbd "C-\\") t)
;;(setq scim-cursor-color '("green" "blue" "limegreen"))
; Add cmake listfile names to the mode list.
(setq auto-mode-alist
(append
'(("CMakeLists\\.txt\\'" . cmake-mode))
'(("\\.cmake\\'" . cmake-mode))
auto-mode-alist))
(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.
'(cua-mode t nil (cua-base))
'(ecb-options-version "2.40")
'(js2-highlight-external-variables t)
'(js2-highlight-level 3))
(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.
)


