免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 998 | 回复: 0

我的emacs配置文件 [复制链接]

论坛徽章:
0
发表于 2008-05-14 12:05 |显示全部楼层
;; This .emacs file illustrates the minimul setup
;; required to run the JDE.
;; Set the debug option to enable a backtrace when a
;; problem occurs.
(setq debug-on-error t)
(setq load-path (cons "~/emacs-22.2/lisp" load-path))
;; Update the Emacs load-path to include the path to
;; the JDE and its 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 "~/emacs-22.2/site-lisp/elib"))
(add-to-list 'load-path (expand-file-name "~/emacs-22.2/site-lisp/eieio"))
(add-to-list 'load-path (expand-file-name "~/emacs-22.2/site-lisp/jde/lisp"))
;; Initialize CEDET.
(load-file (expand-file-name "~/emacs-22.2/site-lisp/cedet/common/cedet.el"))
(add-to-list 'load-path (expand-file-name "~/emacs-22.2/site-lisp/semantic"))
(add-to-list 'load-path (expand-file-name "~/emacs-22.2/site-lisp/speedbar"))
; for c code integration
(require 'semantic-c)
; for lisp integration
(require 'semantic-el)
; for makefile
(require 'semantic-make)
; if you use imenu or wich-function
(require 'semantic-imenu)
; for speedbar
(autoload 'semantic-bnf-mode "semantic-bnf" "Mode for Bovine Normal Form." t)
; for editing .bnf file
(add-to-list 'auto-mode-alist '("\.bnf$" . semantic-bnf-mode))
; for semantic-minor-mode
(autoload 'semantic-minor-mode "semantic-mode" "Mode managing semantic parsing." t)
(autoload 'speedbar-frame-mode "speedbar" "popup a speedbar frame" t)
(autoload 'speedbar-get-focus "speedbar" "jump to speedbar frame" t)
;; 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)
      (setq auto-mode-alist
     (append
      '(("
[url=file://\\.java\\']\\.java\\'[/url]
" . 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)
;; Include the following only if you want to run
;; bash as your shell.
;; Setup Emacs to run bash as its primary shell.
(setq shell-file-name "bash")
(setq shell-command-switch "-c")
(setq explicit-shell-file-name shell-file-name)
(setenv "SHELL" shell-file-name)
(setq explicit-sh-args '("-login" "-i"))
(if (boundp 'w32-quote-process-args)
  (setq w32-quote-process-args ?\")) ;; Include only for MS Windows.
(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.
'(jde-jdk-registry (quote (("1.5" . "c:/program files/jdk")))))
(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 dframe-xemacsp nil)
(add-hook 'speedbar-load-hook (lambda () (require 'semantic-sb)))
(global-set-key (kbd " b") 'speedbar)

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/46000/showart_687707.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP