(defconst my-lisps-path (concat "~/package" nil) "下载的emacs lisp包的路径")
(set-default-font "-outline-Consolas-normal-normal-normal-mono-15-*-*-*-c-*-iso8859-1")
(add-to-list 'default-frame-alist '(font . "-outline-Consolas-normal-normal-normal-mono-15-*-*-*-c-*-iso8859-1"))
;; server mode
(require 'server)
(when (and (= emacs-major-version 23)
(= emacs-minor-version 1)
(equal window-system 'w32))
(defun server-ensure-safe-dir (dir) "Noop" t)) ; Suppress error "directory
; ~/.emacs.d/server is unsafe"
; on windows.
(server-start)
;;(require 'cl)
;;不能显示行号,遇到大文件狂慢!
;; display line numbers in margin (fringe). Emacs 23 only.
;;(global-linum-mode nil) ; do not show line numbers, it make emacs showly
;; 关闭菜单栏、工具条、滚动条
(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
(if (fboundp 'menu-bar-mode) (menu-bar-mode -1))
;;显示括号匹配
(show-paren-mode t)
;;括号匹配时显示另外一边的括号,而不是跳到另一个括号
(setq show-paren-style 'parentheses)
;;显示所在行号和列号
(column-number-mode t)
;; 光标显示为一竖线
(setq-default cursor-type 'bar)
;; 不要问 yes-or-no,只问 y-or-n
(fset 'yes-or-no-p 'y-or-n-p)
;; 关闭工具栏
(tool-bar-mode -1)
;; 正在编辑的文件被其他程序修改时,自动更新缓存区
(global-auto-revert-mode 1)
(setq view-read-only t)
;(setq default-frame-alist'((height . 30) (width .40) (menu-bar-lines . 20) (tool-bar-lines . 0)))
(desktop-save-mode 1)
;;禁用菜单栏,F10 开启关闭菜单
;;(menu-bar-mode nil)
;;用空格代替TAB
(setq-default indent-tabs-mode nil)
;;写文件时的默认编码
(setq buffer-file-coding-system 'utf-8)
;;读文件时的编码
(prefer-coding-system 'utf-8)
(when (eq window-system 'x) ; emacs和其它程序互相拷贝
(setq x-select-enable-clipboard t))
;; 设置emacs的标题
(setq frame-title-format
'(:eval (if (buffer-file-name)
(file-truename (buffer-file-name))
(buffer-name))))
;; iimage mode 显示内置图片
;; 使用iimage-mode看org文档中的图片
(autoload 'iimage-mode "iimage" "Support Inline image minor mode." t)
(autoload 'turn-on-iimage-mode "iimage" "Turn on Inline image minor mode." t)
;; 终端中可以paste字符串
(add-hook 'term-mode-hook (lambda ()
(define-key term-raw-map (kbd "C-y") 'term-paste)))
;;(add-hook 'term-mode-hook 'term-line-mode)
;; 基本功能的键盘绑定----------------------------
;; backspace太远 从effective emacs学的招
(global-set-key "\C-w" 'backward-kill-word)
;;既又原来c-k又有c-w的功能
(global-set-key "\C-k" 'yxf-kill-region-or-line)
(defalias 'qrr 'query-replace-regexp)
;;C-.记录当前位置,稍后可用C-,跳回来
(global-set-key [(control ?\.)] 'point-to-register)
(global-set-key [(control ?\,)] 'jump-to-register)
;;不使用默认的list-buffers
(global-set-key (kbd "C-x C-b") 'ibuffer)
(global-set-key (kbd "C-c r") 'replace-string)
(global-set-key (kbd "C-c p") 'delete-indentation)
(global-set-key (kbd "C-c q") 'query-replace)
;; 交换了ctrl 与ATL 键盘后, C-M-\键盘不起作用了
(global-set-key [(control ?\\)] 'indent-region)
(global-set-key (kbd "
") 'shell-command)
(global-set-key [f1] 'compile)
(global-set-key (kbd "C-SPC") 'nil)
(global-set-key [(control tab)] 'other-frame)
;; 设置标记 默认C-SPC 被输入法截获,无法使用
;(global-set-key (kbd "C-z m") 'set-mark-command)
;; find . -name "*.[ch] | xargs etags -
;; atl + . 查找一个TAG
;; atl + , 跳到查找之前的位置
(global-set-key [(meta ?\,)] 'pop-tag-mark)
(define-prefix-command 'ctl-z-map)
(global-set-key (kbd "C-z") 'ctl-z-map)
(autoload 'todo-mode "todo-mode"
"Major mode for editing TODO lists." t)
(autoload 'todo-show "todo-mode"
"Show TODO items." t)
(autoload 'todo-insert-item "todo-mode"
"Add TODO item." t)
(defun my-toggle-fullscreen ()
(interactive)
(case system-type
((gnu/linux) ())
((mac) ())
(otherwise (w32-fullscreen))))
(global-set-key [f12] 'my-toggle-fullscreen)
(require 'tempo)
(setq tempo-interactive t)
;;;;启动Emacs Server
(setq server-mode t)
(server-start)
;; 扩展模块---------------------------------------
(add-to-list 'load-path "~/package")
(add-to-list 'load-path "~/package/color-theme-6.6.0")
(add-to-list 'load-path "~/package/dark-mode")
(require 'yaml-mode)
(add-to-list 'auto-mode-alist '("\\.yml$" . yaml-mode))
(add-to-list 'auto-mode-alist '("\\.yaml$" . yaml-mode))
;; C-return 使用 c的模板
;; 详见代码
(require 'tempo-c-cpp)
(load "~/package/haskell-mode-2.8.0/haskell-site-file")
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)
;;(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)
;;因为他使用(require 'cl)而emacs不允许这样用
(eval-when-compile (require 'lusty-explorer))
(require 'lusty-explorer)
;;(eval-when-compile (require 'anything-config))
(require 'tiny)
;;(yxf-switch-num-sign)
;;快速切换到*scratch*
(global-set-key (kbd "C-z c") 'ywb-create/switch-scratch)
(global-set-key (kbd "C-z e") 'yxf-create/switch-shell)
;;格式化整个缓存区
(global-set-key (kbd "C-z f" ) 'yxf-format-full)
;;history stack,跳来跳去
(global-set-key (kbd "") 'yxf-point-stack-push)
(global-set-key (kbd "") 'yxf-point-stack-pop)
(require 'copy)
(global-set-key (kbd "C-z w") (quote copy-word))
(global-set-key (kbd "C-z l") (quote copy-line))
;(global-set-key (kbd "C-z d") (quote copy-paragraph))
(global-set-key (kbd "C-z s") (quote thing-copy-parenthesis-to-mark))
;M-C-a,在gnome有别的键绑定了
;跳到函数开头
(global-set-key (kbd "C-z a") (quote beginning-of-defun))
;跳到函数结尾
(global-set-key (kbd "C-z e") (quote end-of-defun))
;;(global-set-key [(f1)] 'lusty-file-explorer)
(global-set-key [(f2)] 'lusty-buffer-explorer)
(prefer-coding-system 'utf-8)
;;用于w32系统,全屏; M-x w32-fullscreen
(require 'darkroom-mode)
(require 'color-theme)
(color-theme-initialize)
(color-theme-gnome2)
;; 将color-theme放在multi-term前,
;; 否则color-theme的颜色设置回混乱
;; 可以运行多个终端,呵呵
(require 'multi-term)
(setq multi-term-program "/bin/bash")
(setq multi-term-buffer-name "term")
;; 调用gnupg加密
(require 'epa-file)
(epa-file-enable)
;; auto-save
(setq epa-file-inhibit-auto-save nil)
(require 'tabbar)
(tabbar-mode)
;;(global-set-key 'tabbar-backward-group)
;;(global-set-key [(control f10)] 'tabbar-local-mode)
(global-set-key [(control up)] 'tabbar-forward-group)
(global-set-key [(control down)] 'tabbar-backward-group)
(global-set-key [(control right)] 'tabbar-forward)
(global-set-key [(control left)] 'tabbar-backward)
;(require 'swbuff)
;(setq swbuff-exclude-buffer-regexps
; '("^ " "\*.*\*"))
;(setq swbuff-status-window-layout 'scroll)
;(setq swbuff-clear-delay 1)
;(setq swbuff-separator "|")
;(setq swbuff-window-min-text-height 1)
(setq display-time-24hr-format t)
(setq display-time-day-and-date t)
(display-time)
;;用于加亮变量, cedet中也该功能,不过较慢
(require 'highlight-symbol)
(global-set-key [(control f3)] 'highlight-symbol-at-point)
(global-set-key [f3] 'highlight-symbol-next)
(global-set-key [(shift f3)] 'highlight-symbol-prev)
(global-set-key [(meta f3)] 'highlight-symbol-prev)
(require 'xcscope)
(require 'tramp)
(require 'ido)
(ido-mode t)
;;anything 简单太好用了!!!狂好用
;;用M-n和M-p命令可以进行上下选择
(eval-after-load 'anything
'(progn
(setq anything-enable-digit-shortcuts t)
(global-set-key (kbd "C-z a") 'anything)))
(eval-after-load 'anything-config
'(add-to-list 'anything-sources anything-c-source-file-cache))
(require 'anything)
;(require 'anything-config)
(global-set-key [f5] 'anything)
;;; 自动调用相应的程序
;;; 不支持文件名中有空格的情况
(define-trivial-mode "evince" "\.pdf$")
(define-trivial-mode "evince" "\.PDF$")
(define-trivial-mode "soffice" "\.doc$")
(define-trivial-mode "soffice" "\.xls$")
(define-trivial-mode "soffice" "\.xlsx$")
(define-trivial-mode "xchm" "\.chm$")
(define-trivial-mode "/home/ork/.wine/drive_c/Program\ Files/WinRAR/WinRAR.exe" "\.rar$")
;; This is how you would do it by hand
(defun view-pdf ()
"Use evince to view PDFs."
(interactive)
(progn
(toggle-read-only t)
(start-process "pdf" nil
"evince" (buffer-file-name))
(kill-buffer (current-buffer))))
;;;_ , Word documents
;;; 使用antiword查看 MS word文档
(defun no-word ()
"Run antiword on the entire buffer."
(shell-command-on-region (point-min) (point-max) "antiword - " t t))
;(autoload 'no-word "no-word" "word to txt")
;(add-to-list 'auto-mode-alist '("\\.doc\\'" . no-word))
;; org-mode ----------------------------
(require 'org-install)
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
(add-hook 'org-mode-hook 'turn-on-font-lock)
(add-hook 'org-mode-hook
(lambda () (setq truncate-lines nil)))
(add-hook 'org-mode-hook
(lambda ()
(define-key org-mode-map "\C-z\C-t" 'org-insert-todo-heading)
(define-key org-mode-map "\C-z\C-e" 'org-insert-todo-subheading)))
(setq org-default-notes-file "~/.notes")
(define-key global-map [f12] 'org-remember)
;;C-c a 进入日程表
(define-key global-map "\C-ca" 'org-agenda)
;;给已完成事项打上时间戳。可选 note,附加注释
(setq org-log-done 'time)
;;防止下划线在export时变成下标
(setq org-export-with-sub-superscripts nil)
(autoload 'org-diary "org" "Diary entries from Org mode" )
(setq org-todo-keywords
'((sequence "TODO(t)" "|" "DOING(i)" "|" "DONE(d)")
;;(sequence "REPORT(r)" "BUG(b)" "KNOWNCAUSE(k)" "|" "FIXED(f)")
(sequence "|" "CANCELED(c)")))
(setq org-agenda-files (file-expand-wildcards "~/org/*.org"))
(setq org-log-done t) ;; 变到 done 状态的时候,记录一下时间
(setq org-log-done 'time)
;(setq org-log-done 'note)
(org-agenda-to-appt)
(setq org-tag-alist
'(("tips" . ?t) ("question" . ?u) ("perl" . ?p) ("thought" . ?h) ("protocol" . ?r)))
(setq org-publish-project-alist
'(("note-org"
:base-directory "~/org"
:publishing-directory "~/org/publish"
:base-extension "org"
:recursive t
:publishing-function org-publish-org-to-html
:auto-index nil
:index-filename "index.org"
:index-title "index"
:link-home "index.html"
:section-numbers nil
:style " href=\"./style/emacs.css\"
type=\"text/css\"/>")
("note-static"
:base-directory "~/org"
:publishing-directory "~/org/publish"
:recursive t
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|swf\\|zip\\|gz\\|txt\\|el"
:publishing-function org-publish-attachment)
("note"
:components ("note-org" "note-static")
:author "[email protected] ")))
(add-to-list 'load-path "~/package/company-0.5")
(autoload 'company-mode "company" nil t)
;;---------mew 处理邮件------------------------------
(setq load-path (cons "~/package/mew-6.3rc2" load-path))
(autoload 'mew "mew" nil t)
(autoload 'mew-send "mew" nil t)
(setq mew-use-cached-passwd t)
(if (boundp 'read-mail-command)
(setq read-mail-command 'mew))
(autoload 'mew-user-agent-compose "mew" nil t)
(if (boundp 'mail-user-agent)
(setq mail-user-agent 'mew-user-agent))
(if (fboundp 'define-mail-user-agent)
(define-mail-user-agent
'mew-user-agent
'mew-user-agent-compose
'mew-draft-send-message
'mew-draft-kill
'mew-send-hook))
(setq mew-pop-size 0)
(setq mew-smtp-auth-list nil)
(setq toolbar-mail-reader 'Mew)
(set-default 'mew-decode-quoted 't)
(setq mew-use-unread-mark t);标示未读邮件
(setq toolbar-mail-reader 'Mew)
(setq mew-use-cached-passwd t)
(setq mew-passwd-timer-unit 999)
(setq mew-passwd-lifetime 999)
;;不删除服务器上的邮件
(setq mew-pop-delete nil)
(when (boundp 'utf-translate-cjk)
(setq utf-translate-cjk t)
(custom-set-variables
'(utf-translate-cjk t)))
(if (fboundp 'utf-translate-cjk-mode)
(utf-translate-cjk-mode 1))
(setq mew-ssl-verify-level 0)
(setq mew-prog-ssl "/usr/bin/stunnel")
;;(setq mew-smtp-ssl t)
;;(setq mew-pop-ssl t)
;;[email protected]
(setq mew-config-alist '(
("default" ;; default不能写成别的字符串!!
("name" . "yuxf")
("user" . "yuxf")
("smtp-server" . "123.127.107.73")
("smtp-port" . "25")
("pop-server" . "123.127.107.73")
("pop-port" . "110")
("smtp-user" . "[email protected] ")
("pop-user" . "[email protected] ")
("mail-domain" . "sinoufc.com")
("mailbox-type" . pop)
("pop-auth" . pass)
("smtp-auth-list" . ("PLAIN" "LOGIN" "CRAM-MD5"))
)
("unix"
("name" . "于晓锋")
("user" . "iunix")
("smtp-server" . "smtp.sohu.com")
("smtp-port" . "25")
("pop-server" . "pop3.sohu.com")
("pop-port" . "110")
("smtp-user" . "iunix")
("pop-user" . "iunix")
("mail-domain" . "sohu.com")
("mailbox-type" . pop)
("pop-auth" . pass)
("smtp-auth-list" . ("CRAM-MD5" "LOGIN" "PLAIN" ))
)
(gmail
(mailbox-type imap)
(proto "%")
(imap-server "imap.googlemail.com")
(imap-user "[email protected] ")
(name "3wdays")
(user "3wdays")
(mail-domain "gmail.com")
(imap-size 0)
(imap-delete t)
(imap-queue-folder "%queue")
(imap-trash-folder "%Trash") ;; This must be in concile with your IMAP box setup
(smtp-auth-list ("PLAIN" "LOGIN" "CRAM-MD5"))
(smtp-user "[email protected] ")
(smtp-server "smtp.googlemail.com"))
("sohu"
("name" . "于晓锋")
("user" . "paragenius")
("smtp-server" . "smtp.sohu.com")
("smtp-port" . "25")
("pop-server" . "pop3.sohu.com")
("pop-port" . "110")
("smtp-user" . "paragenius")
("pop-user" . "paragenius")
("mail-domain" . "sohu.com")
("mailbox-type" . pop)
("pop-auth" . pass)
("smtp-auth-list" . ("CRAM-MD5" "LOGIN" "PLAIN" )))
))
;; 邮件签名文件
(setq mew-signature-file "~/signature")
;自动插入
(setq mew-signature-as-lastpart t)
(setq mew-signature-insert-last t)
(add-hook 'mew-before-cite-hook 'mew-header-goto-body)
(add-hook 'mew-draft-mode-newdraft-hook 'mew-draft-insert-signature)
(defalias 'mac 'mew-attach-copy)
(setq mew-refile-guess-alist
'(("To:"
("@sinoufc.com" . "+work/sinoufc")
("@freebsd.org" . "+unix/freebsd"))
("Cc:"
("@sinoufc.com" . "+work/sinoufc")
("@freebsd.org" . "+unix/freebsd"))
(nil . "+inbox")))
(setq mew-refile-guess-control
'(mew-refile-guess-by-folder
mew-refile-guess-by-alist))
;; mew 热键
;; w 写信
;; M-TAB 补齐收信人信息
;; Q 退出mew
;; i 收信
;; g 跳转邮箱
;; o 对邮件进行分类
;; d 把邮件标记为删除
;; * 作星号标记
;; u 清除标记
;; x 对所有标记进行处理
;; a 不带引用的回复,不建议使用
;; A 带引用的回复,推荐
;; f 转发邮件
;; y 保存邮件,会提示是保存整个邮件和是仅保存正文
;; SPACE 阅读邮件
;; ENTER 让阅读的邮件向上滚动一行
;; - 向下滚动一行
;; n 下一封邮件
;; p 前一封邮件
;; j 跳到某一封邮件
;; N 下一封带星号的邮件
;; P 上一封带星号的邮件
;; S 按某个指定项目对邮件排序
;; / 按指定条件搜索邮件,并进入虚拟模式
;; tt 进入虚拟模式,根据线索查看,普通模式下是不可以的
;; C 如果设置了多个邮箱,用此切换
;; C-cC-m 编辑新邮件,放入草稿中
;; C-cC-c 发送邮件
;; C-cC-q 取消草稿
;; C-cC-a 插入附件
;; C-cTAB 插入签名
;; C-cC-l 转换当前邮件的编码格式
;; C-cC-y 复制部分邮件,带引用前缀
;; C-cC-t 复制部分邮件,不带引用前缀
;; C-cC-a 把当前的发信人加入地址薄
;; C-uC-cC-a 比C-cC-a多加入昵称和名字,推荐
;; ;;
;; ;; Biff
;; ;;
(load "biff")
(setq mew-use-cached-passwd t);;必须
(setq mew-use-biff t)
(setq mew-use-biff-bell t)
(setq mew-biff-interval 5) ;这个值一定要小于下面的timer-unit和lifetime值,这个可以使用describe-variable查看一下
(setq mew-pop-biff-interval 3)
(setq mew-passwd-timer-unit 60) ; 60 minutes = 1 hour
(setq mew-passwd-lifetime 24) ; timer-unit x 24 = 24 hours
;;
(add-to-list 'load-path "~/package/emacs-wget-0.5.0")
(autoload 'wget "wget" "wget interface for Emacs." t)
(autoload 'wget-web-page "wget" "wget interface to download whole web page." t)
(load "w3m-wget")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(add-hook 'c-mode-hook
'(lambda ()
(c-set-style "linux")
(setq c-basic-offset 4)))
(add-hook 'c++-mode-hook
'(lambda ()
(c-set-style "linux")
(setq c-basic-offset 4)))
(setq compile-command "make ")
;;;------------------cedet配置----------------
(load-file "~/package/cedet-1.0/common/cedet.el")
;;;; 使函数体能够折叠或展开
(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)
;; 功能属性,从上到下功能越来越少,性能越来越快
;;(semantic-load-enable-excessive-code-helpers)
;;(semantic-load-enable-code-helpers)
;;(semantic-load-enable-minimum-features)
;; additional features for name completion and ...
;; smart complitions
(require 'semantic-ia)
(setq-mode-local c-mode semanticdb-find-default-throttle
'(project unloaded system recursive))
(setq-mode-local c++-mode semanticdb-find-default-throttle
'(project unloaded system recursive))
(setq-mode-local erlang-mode semanticdb-find-default-throttle
'(project unloaded system recursive))
(require 'eassist)
;;SRecode是一个模板系统,通过一些预定义的模板,可以很快地插入一段代码。
(setq senator-minor-mode-name "SN")
(setq semantic-imenu-auto-rebuild-directory-indexes nil)
(global-srecode-minor-mode 1)
(global-semantic-mru-bookmark-mode 1)
;; Key bindings
;;
(defun my-cedet-hook ()
(local-set-key [(control return)] 'semantic-ia-complete-symbol)
(local-set-key "\C-c/" 'semantic-ia-complete-symbol-menu)
(local-set-key "\C-cd" 'semantic-ia-show-summary) ;; 在minibuffer中显示变量或者函数的定义
(local-set-key "\C-cj" 'semantic-ia-fast-jump);;跳到函数声明
(local-set-key "\C-cb" 'semantic-mrub-switch-tags)
(local-set-key "\C-cf" 'semantic-symref-symbol)
(local-set-key "\C-cs" 'semantic-symref))
(add-hook 'c-mode-common-hook 'my-cedet-hook)
;;;---------------------- ECB ----------------------------
;;; ECB 安装之前,需要安装CEDET
;;默认情况下,使用鼠标点击ECB窗口中的内容,不起作用。
;;可以在Emacs中执行"M-x ecb-customize-most-important",
;;找到"Ecb Primary Secondary Mouse Buttons"选项,将其设为"Primary: mouse-1, secondary: mouse-2",
;;并且以"Save for Future Sessions"保存。
(add-to-list 'load-path "~/package/ecb-2.40")
(require 'ecb)
;; 自动启动ecb,
;;(setq ecb-auto-activate t)
;; 不显示每日提示
(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)
;;;; 隐藏和显示ecb窗口
(define-key global-map [(control f1)] 'ecb-hide-ecb-windows)
(define-key global-map [(control f2)] 'ecb-show-ecb-windows)
;;;; 使某一ecb窗口最大化
(define-key global-map "\C-c1" 'ecb-maximize-window-directories)
(define-key global-map "\C-c2" 'ecb-maximize-window-sources)
(define-key global-map "\C-c3" 'ecb-maximize-window-methods)
(define-key global-map "\C-c4" 'ecb-maximize-window-history)
;;;; 恢复原始窗口布局
(define-key global-map "\C-c`" 'ecb-restore-default-window-sizes)
;; -----------------------E.M.M.S -------------------------------
(add-to-list 'load-path "~/package/emms-3.0")
(require 'emms-setup)
(emms-standard)
;; no cli volume setup tools in windows
(require 'emms-volume)
(require 'emms-score)
(emms-score 1)
;; autodetect musci files id3 tags encodeing
(require 'emms-i18n)
;; auto-save and import last playlist
(require 'emms-history)
;;设定播放列表的缓存标题
(setq emms-playlist-buffer-name "*Music*")
;;设定默认的播放目录
(setq emms-source-file-default-directory "~/music/")
(setq emms-player-list '(emms-player-mplayer)
emms-player-mplayer-command-name "mplayer"
emms-player-mplayer-parameters '("-slave"))
(global-set-key (kbd "C-c e x") 'emms-start)
(global-set-key (kbd "C-c e v") 'emms-stop)
(global-set-key (kbd "C-c e n") 'emms-next)
(global-set-key (kbd "C-c e p") 'emms-previous)
(global-set-key (kbd "C-c e o") 'emms-show)
(global-set-key (kbd "C-c e h") 'emms-shuffle)
(global-set-key (kbd "C-c e e") 'emms-play-file)
(global-set-key (kbd "C-c e -") 'emms-volume-lower)
(global-set-key (kbd "C-c e =") 'emms-volume-raise)
(global-set-key (kbd "C-c e f") 'emms-play-playlist)
(global-set-key (kbd "C-c e SPC") 'emms-pause)
(define-key emms-playlist-mode-map (kbd "SPC") 'emms-pause)
(define-key emms-playlist-mode-map (kbd "=") 'emms-volume-raise)
(define-key emms-playlist-mode-map (kbd "-") 'emms-volume-lower)
;; ------------------文档排版--------------------
;;(add-to-list 'load-path "~/package/auctex")
;;(load "auctex.el" nil t t)
;;(setq TeX-auto-save t)
;;(setq TeX-parse-self t)
;;(setq-default TeX-master nil)
;;(load "preview-latex.el" nil t t)
;;(setq TeX-output-view-style (quote (("^pdf$" "." "evince %o %(outpage)"))))
;;(setq TeX-output-view-style (quote (("^pdf$" "." "AcroRd32.exe %o %(outpage)"))))
(add-hook 'LaTeX-mode-hook
(lambda()
(add-to-list 'TeX-command-list '("XeLaTeX" "%`xelatex%(mode)%' %t" TeX-run-TeX nil t))))
(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")
'(org-agenda-files (quote ("~/org/algorithms.org" "~/org/body.org" "~/org/booklist.org" "~/org/booknotes.org" "~/org/bug.org" "~/org/ceph.org" "~/org/chan.org" "~/org/dream.org" "~/org/emacs.org" "~/org/exam.org" "~/org/index.org" "~/org/kernel.org" "~/org/kidfs.org" "~/org/link.org" "~/org/notes.org" "~/org/paxos.org" "~/org/perl.org" "~/org/sourcecode.org" "~/org/think.org" "~/org/trans.org" "~/org/work.org" "~/org/todo.org"))))
(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.
)