;; Set the debug option to enable a backtrace when a
;; problem occurs.
(setq debug-on-error t)
(setq user-mail-address"guangxuli7@gmail.com")
(setq user-full-name"liguangxu")
(setq frame-title-format"%b")
;; no backup files
(setq make-backup-files nil)
;; delete unnecessary autosave files
(setq delete-auto-save-files t)
;; delete oldversion files
(setq delete-old-versions t)
;;支持 emacs 和外部程序的粘贴
(setq x-select-enable-clipboard t)
;;addJava Develop Environment'(jde-jdk-registry (quote (("1.6.0_26" . "D:\Program Files\Java\jdk1.6.0_26"))))
;; 使emacs可以接受中文输入法
(set-keyboard-coding-system'chinese-iso-8bit-dos)
;; 使emacs可以复制粘贴中文字符
(set-selection-coding-system'chinese-iso-8bit-dos)
;; 设置背景颜色和字体颜色
(set-foreground-color "white")
(set-background-color "darkblue")
;; 颜色设置
(setq frame-background-mode'dark)
(set-background-color"black")
(set-foreground-color"gray")
(set-cursor-color"yellow")
;; 设置另外一些颜色:语法高亮显示的背景和主题,区域选择的背景和主题,二次选择的背景和选择
(set-face-foreground'highlight "white")
(set-face-background'highlight"blue")
(set-face-foreground'region "cyan")
(set-face-background'region"blue")
(set-face-foreground'secondary-selection "skyblue")
(set-face-background'secondary-selection"darkblue")
;; 邮件收发
(require'smtpmail)
(setq smtpmail-debug-info t)
(setq send-mail-function'smtpmail-send-it)
(setq message-send-mail-function'smtpmail-send-it)
(setq smtpmail-default-smtp-server "smtp.gmail.com")
(setq smtpmail-smtp-server "smtp.gmail.com")
(setq smtpmail-local-domain "gmail.com")
(setq smtpmail-sendto-domain "gmail.com") ;; maybe
(setq smtpmail-auth-credentials ; or use ~/.authinfo'(("smtp.gmail.com"25"usr""pwd")))
(setq smtpmail-starttls-credentials'(("smtp.gmail.com" 25 nil nil)))
(setq gnus-posting-styles'((".*";; default
(name"Mackal li")
(address"guangxuli7_at_gmail_dot_com")
(signature-file"~/.sig"))
("^nnml:mail.*";; 被我简化了的过滤规则
;; misc mail
(signature-file"~/.sig")
(name"Mackal li")
(address"guangxuli7@gmail.com")))) ;; real address
;; Update the Emacs load-path to include the path to
;; the JDEandits require packages. This code assumes
;; that you have installed the packages in the emacs/site
;; subdirectory of your home directory.
(add-to-list'load-path (expand-file-name "~/site-lisp/jdee/lisp"))
(add-to-list'load-path (expand-file-name"~/site-lisp/cedet/common"))
(add-to-list'load-path (expand-file-name "~/site-lisp/elib"))
(add-to-list'load-path (expand-file-name"~/site-lisp/color-theme"))
;;When the file locate the different loacation, the setting is different
;;more compare this two way
;;(add-to-list'load-path (expand-file-name "~/../site-lisp/cedet/common"))
;;(load-file (expand-file-name "~/../site-lisp/cedet/common/cedet.elc"))
;;(add-to-list'load-path (expand-file-name"~/../site-lisp/jde/lisp"))
;;(add-to-list'load-path (expand-file-name "~/../site-lisp/elib"))
;;Add color-theme
(require'color-theme)
(color-theme-initialize)
(color-theme-dark-blue)
(setq my-color-themes (list'color-theme-billw'color-theme-jsc-dark'color-theme-sitaramv-solaris'color-theme-resolve'color-theme-classic'color-theme-jonadabian-slate'color-theme-kingsajz'color-theme-shaman'color-theme-subtle-blue'color-theme-snowish'color-theme-sitaramv-nt'color-theme-wheat))
;; 在这里定义你得CLASSPATH 需要的话,就修改这个文件,然后 M-x load-file
(setq jde-compile-option-classpath (quote ("./";;"../""http://www.cnblogs.com/""http://www.cnblogs.com/../""d:/Program Files/Java/jdk1.6.0_26/lib/dt.jar""d:/Program Files/Java/jdk1.6.0_26/lib/tools.jar";;"~/../bin/apache-ant/lib/ant.jar";;"D:/mysoft/webserver/resin_3_0_21/lib/jsdk-24.jar";;"D:/website/cqtel.softreg.com/WEB-INF/lib/webpro2.jar";;"D:/website/cqtel.softreg.com/WEB-INF/lib/xfire-all-1.2.2.jar")))
(setq jde-debugger (quote ("JDEbug")))
;; 用JDK1.5编译如果出现乱码,加上下面一行可以解决
(setq jde-compiler (quote ("javac""")))
(setq jde-complete-function (quote jde-complete-menu))
;; JDK版本号和JAVA_HOME
(jde-jdk-registry (quote (("1.6.0_26"."D:\Program Files\Java\jdk1.6.0_26"))))
;; 定义 ANT_HOME
(setq jde-ant-home"D:/emacs22/custom/bin/apache-ant")
;; 将 %ANT_HOME%/bin 放在你的环境变量PATH中
(setq jde-ant-program"ant")
;;(setq jde-ant-program"D:/emacs22/custom/bin/apache-ant/bin/ant")
;; Initialize CEDET.
(load-file (expand-file-name"~/site-lisp/cedet/common/cedet.el"))
;; 开启Emacs时就载入Jde,这样msf-abbrev就不会出错
(require'jde)
;; 反编译 C-x C-f 打开一个Jar包,在Class文件上按 j 就会给出反编译的代码
;; 需要 jad.exe 和 unzip.exe 配合
(load-file "~/../lisp/decomp.el")
(require'jmaker)
(require'jjar)
(require'jsee)
(setq jmaker-end-of-line-format (quote dos))
(setq jmaker-java-compiler-options"")
;; load ecb
(add-to-list'load-path (expand-file-name "~/../site-lisp/ecb"))
(require'ecb)
;; 防止CPU占用100%
(setq semantic-idle-scheduler-idle-time432000)
;;
;;java 开发环境
(require'font-lock)
(require'cedet)
(require'ecb)
(require'ecb-autoloads)
(require'jde)
;;
;; If you want Emacs to defer loading the JDE until you open a
;; Java file, edit the following line
;;(setq defer-loading-jde nil)
;; to read:
;;
(setq defer-loading-jde t)
;;
(if defer-loading-jde
(progn
(autoload'jde-mode"jde""JDE mode."t)
(setqauto-mode-alist
(append'(("\\.java\\'". jde-mode))
auto-mode-alist)))
(require 'jde))
;; Sets the basic indentation for Java source files
;; to two spaces.
(defun my-jde-mode-hook ()
(setq c-basic-offset 2))
(add-hook 'jde-mode-hook 'my-jde-mode-hook)