;; .emacs
;;; uncomment this line to disable loading of "default.el" at startup
;; (setq inhibit-default-init t)
;; enable visual feedback on selections
;(setq transient-mark-mode t)
;; default to better frame titles
(setq frame-title-format
(concat "%b - emacs@" (system-name)))
;; default to unified diffs
(setq diff-switches "-u")
;; always end a file with a newline
;(setq require-final-newline 'query)
;;; uncomment for CJK utf-8 support for non-Asian users
;; (require 'un-define)
(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.
'(cua-mode t nil (cua-base))
'(inhibit-startup-screen t)
'(show-paren-mode t)
'(cperl-close-paren-offset 2)
'(cperl-continued-statement-offset 2)
'(cperl-indent-level 2)
'(cperl-indent-parens-as-block t)
'(cperl-tab-always-indent 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.
)
;; turn autoindenting on
(global-set-key "r" 'newline-and-indent)
;; insert spaces instead of tabs
(setq-default indent-tabs-mode nil)
;; load color-theme.el
(add-to-list 'load-path "~/.emacs.d")
;;(require 'color-theme)
;; load cedet
(load-file "~/.emacs.d/cedet-1.1/common/cedet.el")
(semantic-load-enable-minimum-features)
(semantic-load-enable-gaudy-code-helpers)
(semantic-load-enable-all-exuberent-ctags-support)
;; use CPerl-mode
(defalias 'perl-mode 'cperl-mode)
;; use % key to match paren
(global-set-key "%" 'match-paren-or-insert-key)
(defun match-paren-or-insert-key (key)
"match paren or insert raw key"
(interactive "p")
(let ((prev-char (char-to-string (preceding-char)))
(next-char (char-to-string (following-char))))
(cond ((string-match "[[{(<]" next-char) (forward-sexp 1))
((string-match "[]})>]" prev-char) (backward-sexp 1))
(t (self-insert-command (or key 1))))))
(set 'slime-lisp-implementations
'((cmucl ("cmucl" "-quiet"))
(sbcl ("sbcl") :coding-system utf-8-unix)))
(set 'slime-default-lisp 'sbcl)
(set 'w3m-default-display-inline-images t)
-