作者 Anonymous [lisp] 2012-12-31 19:54 (点击下载)

  1. ;; .emacs
  2.  
  3. ;;; uncomment this line to disable loading of "default.el" at startup
  4. ;; (setq inhibit-default-init t)
  5.  
  6. ;; enable visual feedback on selections
  7. ;(setq transient-mark-mode t)
  8.  
  9. ;; default to better frame titles
  10. (setq frame-title-format
  11. (concat "%b - emacs@" (system-name)))
  12.  
  13. ;; default to unified diffs
  14. (setq diff-switches "-u")
  15.  
  16. ;; always end a file with a newline
  17. ;(setq require-final-newline 'query)
  18.  
  19. ;;; uncomment for CJK utf-8 support for non-Asian users
  20. ;; (require 'un-define)
  21. (custom-set-variables
  22. ;; custom-set-variables was added by Custom.
  23. ;; If you edit it by hand, you could mess it up, so be careful.
  24. ;; Your init file should contain only one such instance.
  25. ;; If there is more than one, they won't work right.
  26. '(cua-mode t nil (cua-base))
  27. '(inhibit-startup-screen t)
  28. '(show-paren-mode t)
  29. '(cperl-close-paren-offset 2)
  30. '(cperl-continued-statement-offset 2)
  31. '(cperl-indent-level 2)
  32. '(cperl-indent-parens-as-block t)
  33. '(cperl-tab-always-indent t))
  34.  
  35. (custom-set-faces
  36. ;; custom-set-faces was added by Custom.
  37. ;; If you edit it by hand, you could mess it up, so be careful.
  38. ;; Your init file should contain only one such instance.
  39. ;; If there is more than one, they won't work right.
  40. )
  41.  
  42. ;; turn autoindenting on
  43. (global-set-key "r" 'newline-and-indent)
  44.  
  45. ;; insert spaces instead of tabs
  46. (setq-default indent-tabs-mode nil)
  47.  
  48. ;; load color-theme.el
  49. (add-to-list 'load-path "~/.emacs.d")
  50. ;;(require 'color-theme)
  51.  
  52. ;; load cedet
  53. (load-file "~/.emacs.d/cedet-1.1/common/cedet.el")
  54. (semantic-load-enable-minimum-features)
  55. (semantic-load-enable-gaudy-code-helpers)
  56. (semantic-load-enable-all-exuberent-ctags-support)
  57.  
  58. ;; use CPerl-mode
  59. (defalias 'perl-mode 'cperl-mode)
  60.  
  61. ;; use % key to match paren
  62. (global-set-key "%" 'match-paren-or-insert-key)
  63. (defun match-paren-or-insert-key (key)
  64. "match paren or insert raw key"
  65. (interactive "p")
  66. (let ((prev-char (char-to-string (preceding-char)))
  67. (next-char (char-to-string (following-char))))
  68. (cond ((string-match "[[{(<]" next-char) (forward-sexp 1))
  69. ((string-match "[]})>]" prev-char) (backward-sexp 1))
  70. (t (self-insert-command (or key 1))))))
  71.  
  72. (set 'slime-lisp-implementations
  73. '((cmucl ("cmucl" "-quiet"))
  74. (sbcl ("sbcl") :coding-system utf-8-unix)))
  75. (set 'slime-default-lisp 'sbcl)
  76.  
  77. (set 'w3m-default-display-inline-images t)

提交下面的校正或者修改. (点击这里开始一个新的帖子)
姓名: 在 cookie 中记住我的名字

屏幕抓图:(jpeg 或 png)