多次C-X C-C后形成的现在这个样子的配置文件,还是不太满意,要添加的功能还有许多,慢慢添加吧。
;;Luo Xiang yong's .emacs
(create-fontset-from-fontset-spec
(concat
"-misc-simsun-medium-r-normal-*-*-*-*-*-p-*-fontset-courier,"
"chinese-gb2312:-misc-simsun-medium-r-normal--*-*-*-*-p-*-gb2312.1980-0,"
"mule-unicode-0100-24ff:-*-simsun-medium-r-*-*-14-*-*-*-c-*-iso10646*-*,"
"korean-ksc5601:-*-*-medium-r-*-*-14-*-*-*-*-*-ksc5601*-*,"
"chinese-cns11643-5:-*-simsun-medium-r-*-*-14-*-*-*-c-*-gbk*-*,"
"chinese-cns11643-6:-*-simsun-medium-r-*-*-14-*-*-*-c-*-gbk*-*,"
"chinese-cns11643-7:-*-simsun-medium-r-*-*-14-*-*-*-c-*-gbk*-*,"
"sjis:-*-medium-r-normal--14-*-jisx0208*-*"))
;(set-default-font "chinese-gb2312")
(set-default-font "fontset-courier")
(setq default-frame-alist
(append
'((font . "fontset-courier")) default-frame-alist))
;; 设置路经
(setq load-path
(cons (expand-file-name "~/.emacs.d/lisp") load-path))
;; Setup the Chinese Envirnmnet!
;;
;; 设置中文语言环境,打开文件时为自动判断是否中文
(set-language-environment 'Chinese-GB)
;; 写文件的编码方式
(set-buffer-file-coding-system 'gb2312)
;; 新建文件的编码方式
(setq default-buffer-file-coding-system 'gb2312)
;; 终端方式的编码方式,如M-x shell
(set-terminal-coding-system 'utf-8)
; 键盘输入的编码方式
;(set-keyboard-coding-system 'gb2312)
;; 读取或写入文件名的编码方式
(setq file-name-coding-system 'utf-8)
;(set-clipboard-coding-system 'gb2312)
;(set-selection-coding-system 'gb2312)
;(modify-coding-system-alist 'process "*" 'gb2312)
;(setq default-process-coding-system '(gb2312 . gb2312))
;(setq-default pathname-coding-system 'gb2312)
;; 可以从外面粘贴东西
(setq x-select-enable-clipboard t)
;; 屏蔽C-SPC的set mark功能 , 目前不必要,SCIM输入法不能用
(global-set-key (kbd "C-SPC") 'nil)
;; 设置字体
;(create-fontset-from-fontset-spec
; "-misc-fixed-medium-r-*-*-16-*-*-*-c-*-fontset-global,
; chinese-gb2312:-*-*-medium-r-normal-*-16-*-*-*-*-*-gb2312.1980-*")
;(setq default-frame-alist
; (append '((font . "fontset-global")) default-frame-alist))
;; 设置中文环境
;(set-language-environment 'Chinese-GB)
;(set-keyboard-coding-system 'euc-cn)
;(set-clipboard-coding-system 'euc-cn)
;(set-terminal-coding-system 'euc-cn)
;(set-buffer-file-coding-system 'euc-cn)
;(set-selection-coding-system 'euc-cn)
;(prefer-coding-system 'euc-cn)
;(setq default-process-coding-system 'euc-cn)
;(setq-default pathname-coding-system 'euc-cn)
;(when (string-match "x" (prin1-to-string window-system))
; (setq font-encoding-alist
; (append '(("MuleTibetan-0" (tibetan . 0))
; ("GB2312" (chinese-gb2312 . 0))
; ("BIG5" (chinese-big5 . 0))
; ("JISX0208" (japanese-jisx0208 . 0))
; ("JISX0212" (japanese-jisx0212 . 0))
; ("VISCII" (vietnamese-viscii-lower . 0))
; ("KSC5601" (korean-ksc5601 . 0))
; ("MuleArabic-0" (arabic-digit . 0))
; ("MuleArabic-1" (arabic-1-column . 0))
; ("MuleArabic-2" (arabic-2-column . 0))
; ("UTF8" (utf-8 . 0))
; ("unicode" (unicode . 0))
; ) font-encoding-alist))
; (create-fontset-from-fontset-spec
; "-*-fixed-medium-r-*-*-14-*-*-*-c-*-fontset-chinese,
; chinese-gb2312:-*-simsun-medium-r-*-*-14-*-*-*-c-*-gb2312.1980-*,
; chinese-big5-1:-*-mingliu-medium-r-*-*-14-*-*-*-c-*-big5-0,
; chinese-big5-2:-*-mingliu-medium-r-*-*-14-*-*-*-c-*-big5-0,
; utf-8:-efont-*-medium-r-*-*-14-*-*-*-p-*-iso10646-1,
; unicode:-efont-*-medium-r-*-*-14-*-*-*-p-*-iso10646-1")
; (set-default-font "fontset-chinese"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 自动插入功能
;; 显示行号和列号
(column-number-mode t)
;; 高亮显示要拷贝的区域
(transient-mark-mode t)
;; 显示时间
;(display-time)
;; 显示匹配的括号
(transient-mark-mode t)
;; 解决语法显示的大文件在移动的缓慢的问题
(setq lazy-lock-defer-on-scrolling t)
(setq font-lock-support-mode 'lazy-lock-mode)
(setq font-lock-maximum-decoration t)
;; 不显示工具条
(tool-bar-mode -1)
;;set background and forward color
(setq default-frame-alist
'((foreground-color . "Wheat")
(background-color . "DarkSlateGray")
(cursor-color . "Orchid")))
;; 设置我的名字和电子邮件
(setq user-full-name "罗祥勇")
(setq user-mail-address "solo_lxy@126.com")
;; 设置书签文件
(setq bookmark-default-file "~/emacs/emacs.bmk")
;; 设置我自己的load-path
(setq load-path (cons "~/emacs/elisp" load-path))
;; wb-line-number.el 开一个窗口显示行号 , 要打开显示的话
;; 输入:M-x wb-line-number-toggle 就OK了
(set-scroll-bar-mode nil) ; no scroll bar, even in x-window system
(require 'wb-line-number)
;(wb-line-number-toggle)
;; 设置emacs的标题
(setq frame-title-format "罗祥勇的Emacs@%b")
;; 网上看来的杂七杂八的设定
;; 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.
'(browse-url-mozilla-program "firefox")
'(case-fold-search-t nil)
'(column-number-mode t)
'(compilation-scroll-output t)
'(compile-command "make")
;; '(current-language-environment "Chinese-GB")
;(display-time-mode t)
'(ecb-options-version "2.32")
(global-font-lock-mode t)
'(show-paren-mode t)
'(tab-width 4)
'(tool-bar-mode nil)
'(transient-mark-mode t)
(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.
)
;;;; 显示行号:
(setq column-number-mode t)
(setq line-number-mode t)
;;;; 显示时间
;(setq display-time-24hr-format t)
;(setq display-time-day-and-date t)
;(display-time)
;;;; 关闭启动画面
'(setq inhibit-startup-message t)
;;;;设置大的kill ring
(setq kill-ring-max 150)
;;配置一下shell的颜色
(autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t)
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
(setq ansi-color-for-comint-mode t)
;; 全局的快捷键
;; ----------------------- Short Cut -------------------------
(global-set-key [(meta g)] 'goto-line)
;;(global-set-key [(meta ?/)] 'hippie-expand)
;; F12 t 从当前缓冲区建立任务
(global-set-key (kbd "<f12> t") 'planner-create-task-from-buffer)
;; F12 g 切换到当日的任务
;;(global-set-key (kbd "<f12> g") 'planner-goto-today)
(global-set-key (kbd "<f12> g") 'planner-goto-today)
(global-set-key (kbd "<f12> p") 'plan)
;; F12 r 添加当前备忘录
(global-set-key (kbd "<f12> r") 'remember)
;; F12 c 切换到日历
(global-set-key (kbd "<f12> c") 'calendar)
;;;F2:进入wiki-mode模式
(global-set-key [(f2)] 'emacs-wiki-find-file)
;;;F3:切换到dired模式
(global-set-key [(f3)] 'dired)
;;;F4:切换到shell模式
(global-set-key [(f4)] 'ansi-term)
;;;F5:打开speedbar
(global-set-key [(f5)] 'speedbar)
;;;;F7:调用compile
(global-set-key (kbd "<f7>") 'compile)
;;;Alt+s : 让speedbar获得焦点
(global-set-key (kbd "M-s") 'speedbar-get-focus)
;;;F9:列举我的书签
(global-set-key (kbd "<f9>") 'list-bookmarks)
;;;F10:添加当前页到书签中
(global-set-key [(f10)] 'bookmark-set)
;;;F12 u 更新当前版本
(global-set-key (kbd "<f12> u") 'vc-next-action)
;;------------------------End of Short Cut ---------------------
;; ------------------------------------------------------------
;;日历基本配置
;;设置我所在地方的经纬度,calendar里有个功能是日月食的预测,和你的经纬度相联系的。
(setq calendar-latitude +39.9)
(setq calendar-longitude +116.4)
;;我的所在地北京,欢迎大家来找北京请我吃饭
(setq calendar-location-name "Beijing")
;;这个做什么的?忘了,有谁能告诉我,谢谢。
;;我的配置文件里很多东西忘了,欢迎大家来指正下
(setq calendar-remove-frame-by-deleting t)
;;设定一周的开始为周一
(setq calendar-week-start-day 1)
;;节日和生日提醒设置
;;我不过基督徒的节日、希伯来人的节日和伊斯兰教的节日。
;;我是无神论者,不过我喜欢神话,大家有兴趣也可以探讨一下,发email给我吧
(setq christian-holidays nil)
(setq hebrew-holidays nil)
(setq islamic-holidays nil)
;;设定一些自定义的生日和节日
;;隐私需要,删掉朋友的生日
;;后面那些农历节日需要每年根据日历修改
;;有些可惜,没有中国传统农历,谁能写个扩展elisp包弄一下
(setq general-holidays '((holiday-fixed 1 1 "元旦")
(holiday-fixed 3 8 "妇女节")
(holiday-fixed 4 1 "愚人节")
(holiday-fixed 4 11 "谁的生日")
(holiday-fixed 5 1 "劳动节")
(holiday-fixed 10 1 "国庆节")
(holiday-fixed 12 25 "圣诞节")
(holiday-fixed 2 5 "元宵节")
(holiday-fixed 4 4 "清明节")
(holiday-fixed 4 21 "鬼节")
(holiday-fixed 6 22 "端午节")
(holiday-fixed 9 28 "中秋节")
(holiday-float 5 0 2 "母亲节")
(holiday-float 6 0 3 "父亲节")
(holuday-fixed 8 8 "罗祥勇的节")
))
;;其他的一些设置
;;日历不和日记相连,我不用Calendar自带的diary记日记
(setq mark-diary-entries-in-calendar nil)
;;这个又忘了,我真是忘性好!
(setq appt-issue-message nil)
;;在日历中突出标记节日和生日
(setq mark-holidays-in-calendar t)
;;打开calendar自动打开节日和生日列表
(setq view-calendar-holidays-initially t)
;;下面两个是设置年份为中国年,好像默认的是用英文写的,由王垠修改的。
;;这个设置在节日列表的春节那天能看到,如今年的春节他就写着
;;Thursday, January 22, 2004: Chinese New Year (甲-申)
(setq chinese-calendar-celestial-stem
["甲" "乙" "丙" "丁" "戊" "己" "庚" "辛" "壬" "癸"])
(setq chinese-calendar-terrestrial-branch
["子" "丑" "寅" "卯" "辰" "巳" "戊" "未" "申" "酉" "戌" "亥"])
;; -----------------------------End 日历------------------------
;; 设置开发环境
(require 'xcscope) ;;加载xcscope
(require 'cedet) ;;加载cedet
(require 'ecb) ;;加载ecb
;(require 'session) ;;加载session
;(add-hook 'after-init-hook 'session-initialize) ;; 启动时初始化session
;(require 'doxymacs) ;; 启动doxymacs
;(add-hook 'c-mode-common-hook 'doxymacs-mode) ;; 启动doxymacs-mode
;(add-hook 'c++-mode-common-hook 'doxymacs-mode) ;; 启动doxymacs-mode
(desktop-load-default) ;;读取默认desktop设置
(desktop-read) ;;读取当前目录保存的desktop设置
;(set-face-background 'default "LightCyan3") ;;设置背景色为 浅青色3
;(set-face-font 'default "-outline-新宋体-normal-r-normal-normal-*-*-96-96-c-*-iso8859-1") ;;设置字体为新宋体 ( Only for windows )
(global-set-key [f12] 'ecb-activate) ;;定义F12键为激活ecb
(global-set-key [C-f12] 'ecb-deactivate) ;;定义Ctrl+F12为停止ecb
(global-set-key [f11] 'delete-other-windows) ;;设置F11为删除其它窗口
(global-set-key [(meta return)] 'semantic-ia-complete-symbol-menu) ;;设置Alt+Enter为自动补全菜单
(global-set-key [C-/;] 'ecb-goto-window-edit-last) ;;切换到编辑窗口
(global-set-key [C-/'] 'ecb-goto-window-methods) ;;切换到函数窗口
(global-set-key [C-.] 'cscope-find-global-definition) ;;搜索定义
(global-set-key [C-,] 'cscope-pop-mark) ;; 跳出转向
;(enable-visual-studio-bookmarks) ;; 启动VS书签子程序
;;(setq semanticdb-project-roots (list "d:/work")) ;; 设置cemanticdb的扫描根目录
(add-hook 'c-mode-common-hook ( lambda() ( c-set-style "k&r" ) ) ) ;;设置C语言默认格式
(add-hook 'c++-mode-common-hook ( lambda() ( c-set-style "k&r" ) ) ) ;;设置C++语言默认格式
;; 加入是timestamp
(defun my_c_mode_timestamp()
(if (eq major-mode 'c-mode)
(setq time-stamp-start "/*最后更新时间:[ ]+?")
(setq time-stamp-end: "*//n")
(setq time-stamp-format: "%:y年%:m月%:d日")))
(add-hook 'c-mode-common-hook 'my_c_mode_timestamp)
(require 'tex-site)
(setq default-tab-width 4)
;;Luo Xiang yong's .emacs
(create-fontset-from-fontset-spec
(concat
"-misc-simsun-medium-r-normal-*-*-*-*-*-p-*-fontset-courier,"
"chinese-gb2312:-misc-simsun-medium-r-normal--*-*-*-*-p-*-gb2312.1980-0,"
"mule-unicode-0100-24ff:-*-simsun-medium-r-*-*-14-*-*-*-c-*-iso10646*-*,"
"korean-ksc5601:-*-*-medium-r-*-*-14-*-*-*-*-*-ksc5601*-*,"
"chinese-cns11643-5:-*-simsun-medium-r-*-*-14-*-*-*-c-*-gbk*-*,"
"chinese-cns11643-6:-*-simsun-medium-r-*-*-14-*-*-*-c-*-gbk*-*,"
"chinese-cns11643-7:-*-simsun-medium-r-*-*-14-*-*-*-c-*-gbk*-*,"
"sjis:-*-medium-r-normal--14-*-jisx0208*-*"))
;(set-default-font "chinese-gb2312")
(set-default-font "fontset-courier")
(setq default-frame-alist
(append
'((font . "fontset-courier")) default-frame-alist))
;; 设置路经
(setq load-path
(cons (expand-file-name "~/.emacs.d/lisp") load-path))
;; Setup the Chinese Envirnmnet!
;;
;; 设置中文语言环境,打开文件时为自动判断是否中文
(set-language-environment 'Chinese-GB)
;; 写文件的编码方式
(set-buffer-file-coding-system 'gb2312)
;; 新建文件的编码方式
(setq default-buffer-file-coding-system 'gb2312)
;; 终端方式的编码方式,如M-x shell
(set-terminal-coding-system 'utf-8)
; 键盘输入的编码方式
;(set-keyboard-coding-system 'gb2312)
;; 读取或写入文件名的编码方式
(setq file-name-coding-system 'utf-8)
;(set-clipboard-coding-system 'gb2312)
;(set-selection-coding-system 'gb2312)
;(modify-coding-system-alist 'process "*" 'gb2312)
;(setq default-process-coding-system '(gb2312 . gb2312))
;(setq-default pathname-coding-system 'gb2312)
;; 可以从外面粘贴东西
(setq x-select-enable-clipboard t)
;; 屏蔽C-SPC的set mark功能 , 目前不必要,SCIM输入法不能用
(global-set-key (kbd "C-SPC") 'nil)
;; 设置字体
;(create-fontset-from-fontset-spec
; "-misc-fixed-medium-r-*-*-16-*-*-*-c-*-fontset-global,
; chinese-gb2312:-*-*-medium-r-normal-*-16-*-*-*-*-*-gb2312.1980-*")
;(setq default-frame-alist
; (append '((font . "fontset-global")) default-frame-alist))
;; 设置中文环境
;(set-language-environment 'Chinese-GB)
;(set-keyboard-coding-system 'euc-cn)
;(set-clipboard-coding-system 'euc-cn)
;(set-terminal-coding-system 'euc-cn)
;(set-buffer-file-coding-system 'euc-cn)
;(set-selection-coding-system 'euc-cn)
;(prefer-coding-system 'euc-cn)
;(setq default-process-coding-system 'euc-cn)
;(setq-default pathname-coding-system 'euc-cn)
;(when (string-match "x" (prin1-to-string window-system))
; (setq font-encoding-alist
; (append '(("MuleTibetan-0" (tibetan . 0))
; ("GB2312" (chinese-gb2312 . 0))
; ("BIG5" (chinese-big5 . 0))
; ("JISX0208" (japanese-jisx0208 . 0))
; ("JISX0212" (japanese-jisx0212 . 0))
; ("VISCII" (vietnamese-viscii-lower . 0))
; ("KSC5601" (korean-ksc5601 . 0))
; ("MuleArabic-0" (arabic-digit . 0))
; ("MuleArabic-1" (arabic-1-column . 0))
; ("MuleArabic-2" (arabic-2-column . 0))
; ("UTF8" (utf-8 . 0))
; ("unicode" (unicode . 0))
; ) font-encoding-alist))
; (create-fontset-from-fontset-spec
; "-*-fixed-medium-r-*-*-14-*-*-*-c-*-fontset-chinese,
; chinese-gb2312:-*-simsun-medium-r-*-*-14-*-*-*-c-*-gb2312.1980-*,
; chinese-big5-1:-*-mingliu-medium-r-*-*-14-*-*-*-c-*-big5-0,
; chinese-big5-2:-*-mingliu-medium-r-*-*-14-*-*-*-c-*-big5-0,
; utf-8:-efont-*-medium-r-*-*-14-*-*-*-p-*-iso10646-1,
; unicode:-efont-*-medium-r-*-*-14-*-*-*-p-*-iso10646-1")
; (set-default-font "fontset-chinese"))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 自动插入功能
;; 显示行号和列号
(column-number-mode t)
;; 高亮显示要拷贝的区域
(transient-mark-mode t)
;; 显示时间
;(display-time)
;; 显示匹配的括号
(transient-mark-mode t)
;; 解决语法显示的大文件在移动的缓慢的问题
(setq lazy-lock-defer-on-scrolling t)
(setq font-lock-support-mode 'lazy-lock-mode)
(setq font-lock-maximum-decoration t)
;; 不显示工具条
(tool-bar-mode -1)
;;set background and forward color
(setq default-frame-alist
'((foreground-color . "Wheat")
(background-color . "DarkSlateGray")
(cursor-color . "Orchid")))
;; 设置我的名字和电子邮件
(setq user-full-name "罗祥勇")
(setq user-mail-address "solo_lxy@126.com")
;; 设置书签文件
(setq bookmark-default-file "~/emacs/emacs.bmk")
;; 设置我自己的load-path
(setq load-path (cons "~/emacs/elisp" load-path))
;; wb-line-number.el 开一个窗口显示行号 , 要打开显示的话
;; 输入:M-x wb-line-number-toggle 就OK了
(set-scroll-bar-mode nil) ; no scroll bar, even in x-window system
(require 'wb-line-number)
;(wb-line-number-toggle)
;; 设置emacs的标题
(setq frame-title-format "罗祥勇的Emacs@%b")
;; 网上看来的杂七杂八的设定
;; 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.
'(browse-url-mozilla-program "firefox")
'(case-fold-search-t nil)
'(column-number-mode t)
'(compilation-scroll-output t)
'(compile-command "make")
;; '(current-language-environment "Chinese-GB")
;(display-time-mode t)
'(ecb-options-version "2.32")
(global-font-lock-mode t)
'(show-paren-mode t)
'(tab-width 4)
'(tool-bar-mode nil)
'(transient-mark-mode t)
(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.
)
;;;; 显示行号:
(setq column-number-mode t)
(setq line-number-mode t)
;;;; 显示时间
;(setq display-time-24hr-format t)
;(setq display-time-day-and-date t)
;(display-time)
;;;; 关闭启动画面
'(setq inhibit-startup-message t)
;;;;设置大的kill ring
(setq kill-ring-max 150)
;;配置一下shell的颜色
(autoload 'ansi-color-for-comint-mode-on "ansi-color" nil t)
(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
(setq ansi-color-for-comint-mode t)
;; 全局的快捷键
;; ----------------------- Short Cut -------------------------
(global-set-key [(meta g)] 'goto-line)
;;(global-set-key [(meta ?/)] 'hippie-expand)
;; F12 t 从当前缓冲区建立任务
(global-set-key (kbd "<f12> t") 'planner-create-task-from-buffer)
;; F12 g 切换到当日的任务
;;(global-set-key (kbd "<f12> g") 'planner-goto-today)
(global-set-key (kbd "<f12> g") 'planner-goto-today)
(global-set-key (kbd "<f12> p") 'plan)
;; F12 r 添加当前备忘录
(global-set-key (kbd "<f12> r") 'remember)
;; F12 c 切换到日历
(global-set-key (kbd "<f12> c") 'calendar)
;;;F2:进入wiki-mode模式
(global-set-key [(f2)] 'emacs-wiki-find-file)
;;;F3:切换到dired模式
(global-set-key [(f3)] 'dired)
;;;F4:切换到shell模式
(global-set-key [(f4)] 'ansi-term)
;;;F5:打开speedbar
(global-set-key [(f5)] 'speedbar)
;;;;F7:调用compile
(global-set-key (kbd "<f7>") 'compile)
;;;Alt+s : 让speedbar获得焦点
(global-set-key (kbd "M-s") 'speedbar-get-focus)
;;;F9:列举我的书签
(global-set-key (kbd "<f9>") 'list-bookmarks)
;;;F10:添加当前页到书签中
(global-set-key [(f10)] 'bookmark-set)
;;;F12 u 更新当前版本
(global-set-key (kbd "<f12> u") 'vc-next-action)
;;------------------------End of Short Cut ---------------------
;; ------------------------------------------------------------
;;日历基本配置
;;设置我所在地方的经纬度,calendar里有个功能是日月食的预测,和你的经纬度相联系的。
(setq calendar-latitude +39.9)
(setq calendar-longitude +116.4)
;;我的所在地北京,欢迎大家来找北京请我吃饭
(setq calendar-location-name "Beijing")
;;这个做什么的?忘了,有谁能告诉我,谢谢。
;;我的配置文件里很多东西忘了,欢迎大家来指正下
(setq calendar-remove-frame-by-deleting t)
;;设定一周的开始为周一
(setq calendar-week-start-day 1)
;;节日和生日提醒设置
;;我不过基督徒的节日、希伯来人的节日和伊斯兰教的节日。
;;我是无神论者,不过我喜欢神话,大家有兴趣也可以探讨一下,发email给我吧
(setq christian-holidays nil)
(setq hebrew-holidays nil)
(setq islamic-holidays nil)
;;设定一些自定义的生日和节日
;;隐私需要,删掉朋友的生日
;;后面那些农历节日需要每年根据日历修改
;;有些可惜,没有中国传统农历,谁能写个扩展elisp包弄一下
(setq general-holidays '((holiday-fixed 1 1 "元旦")
(holiday-fixed 3 8 "妇女节")
(holiday-fixed 4 1 "愚人节")
(holiday-fixed 4 11 "谁的生日")
(holiday-fixed 5 1 "劳动节")
(holiday-fixed 10 1 "国庆节")
(holiday-fixed 12 25 "圣诞节")
(holiday-fixed 2 5 "元宵节")
(holiday-fixed 4 4 "清明节")
(holiday-fixed 4 21 "鬼节")
(holiday-fixed 6 22 "端午节")
(holiday-fixed 9 28 "中秋节")
(holiday-float 5 0 2 "母亲节")
(holiday-float 6 0 3 "父亲节")
(holuday-fixed 8 8 "罗祥勇的节")
))
;;其他的一些设置
;;日历不和日记相连,我不用Calendar自带的diary记日记
(setq mark-diary-entries-in-calendar nil)
;;这个又忘了,我真是忘性好!
(setq appt-issue-message nil)
;;在日历中突出标记节日和生日
(setq mark-holidays-in-calendar t)
;;打开calendar自动打开节日和生日列表
(setq view-calendar-holidays-initially t)
;;下面两个是设置年份为中国年,好像默认的是用英文写的,由王垠修改的。
;;这个设置在节日列表的春节那天能看到,如今年的春节他就写着
;;Thursday, January 22, 2004: Chinese New Year (甲-申)
(setq chinese-calendar-celestial-stem
["甲" "乙" "丙" "丁" "戊" "己" "庚" "辛" "壬" "癸"])
(setq chinese-calendar-terrestrial-branch
["子" "丑" "寅" "卯" "辰" "巳" "戊" "未" "申" "酉" "戌" "亥"])
;; -----------------------------End 日历------------------------
;; 设置开发环境
(require 'xcscope) ;;加载xcscope
(require 'cedet) ;;加载cedet
(require 'ecb) ;;加载ecb
;(require 'session) ;;加载session
;(add-hook 'after-init-hook 'session-initialize) ;; 启动时初始化session
;(require 'doxymacs) ;; 启动doxymacs
;(add-hook 'c-mode-common-hook 'doxymacs-mode) ;; 启动doxymacs-mode
;(add-hook 'c++-mode-common-hook 'doxymacs-mode) ;; 启动doxymacs-mode
(desktop-load-default) ;;读取默认desktop设置
(desktop-read) ;;读取当前目录保存的desktop设置
;(set-face-background 'default "LightCyan3") ;;设置背景色为 浅青色3
;(set-face-font 'default "-outline-新宋体-normal-r-normal-normal-*-*-96-96-c-*-iso8859-1") ;;设置字体为新宋体 ( Only for windows )
(global-set-key [f12] 'ecb-activate) ;;定义F12键为激活ecb
(global-set-key [C-f12] 'ecb-deactivate) ;;定义Ctrl+F12为停止ecb
(global-set-key [f11] 'delete-other-windows) ;;设置F11为删除其它窗口
(global-set-key [(meta return)] 'semantic-ia-complete-symbol-menu) ;;设置Alt+Enter为自动补全菜单
(global-set-key [C-/;] 'ecb-goto-window-edit-last) ;;切换到编辑窗口
(global-set-key [C-/'] 'ecb-goto-window-methods) ;;切换到函数窗口
(global-set-key [C-.] 'cscope-find-global-definition) ;;搜索定义
(global-set-key [C-,] 'cscope-pop-mark) ;; 跳出转向
;(enable-visual-studio-bookmarks) ;; 启动VS书签子程序
;;(setq semanticdb-project-roots (list "d:/work")) ;; 设置cemanticdb的扫描根目录
(add-hook 'c-mode-common-hook ( lambda() ( c-set-style "k&r" ) ) ) ;;设置C语言默认格式
(add-hook 'c++-mode-common-hook ( lambda() ( c-set-style "k&r" ) ) ) ;;设置C++语言默认格式
;; 加入是timestamp
(defun my_c_mode_timestamp()
(if (eq major-mode 'c-mode)
(setq time-stamp-start "/*最后更新时间:[ ]+?")
(setq time-stamp-end: "*//n")
(setq time-stamp-format: "%:y年%:m月%:d日")))
(add-hook 'c-mode-common-hook 'my_c_mode_timestamp)
(require 'tex-site)
(setq default-tab-width 4)