emacs-unicode-2 emacs
目前的配置
;;chinese config
(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)
;;(modify-coding-system-alist 'process "*" 'euc-cn)
;;(setq default-process-coding-system
;; '(euc-cn . euc-cn))
;;(setq-default pathname-coding-system 'euc-cn)
(require 'un-define)
(if window-system
(if (not (member
'("-*-simsun-normal-r-*-*-13-*-*-*-p-*-fontset-chinese"
. "fontset-chinese") fontset-alias-alist))
(progn
(create-fontset-from-fontset-spec
"-*-simsun-normal-r-*-*-13-*-*-*-p-*-fontset-chinese,
chinese-utf-8:-*-MS Song-normal-r-*-*-16-*-*-*-p-*-utf-8*-*,
chinese-big5-1:-*-MingLiU-normal-r-*-*-16-*-*-*-p-*-big5*-*,
chinese-big5-2:-*-MingLiU-normal-r-*-*-16-*-*-*-p-*-big5*-*" t)
(setq default-frame-alist
(append
'((font . "fontset-chinese"))
default-frame-alist))
)
)
)
;;end chinese config
(transient-mark-mode t)
(display-time)
(fset 'yes-or-no-p 'y-or-n-p)
(setq-default cursor-type 'bar)
;;remove toolbar button
(tool-bar-mode -1)
(setq auto-mode-alist
(cons '("\\.py$" . python-mode) auto-mode-alist))
(setq interpreter-mode-alist
(cons '("python" . python-mode)
interpreter-mode-alist))
(autoload 'python-mode "python-mode" "Python editing mode." t)
(setq font-lock-maximum-decoration t)
;;set fill column value
(setq default-fill-column 60)
;; setup the colors
;; we should check to see if we have a color or b/w display maybe?
(set-foreground-color "#dedca0")
(set-background-color "Black")
(set-cursor-color "red")
(set-mouse-color "yellow")
(set-border-color "black")
;; modeline colors
(set-face-foreground 'modeline "yellow")
(set-face-background 'modeline "black")
;;color select
;;(require 'color-theme)
;;(color-theme-comidia)
;;no backup files
(setq-default make-backup-files nil)
;;mouse avoidance
(mouse-avoidance-mode 'animate)
;;list row number
(setq column-number-mode t)
;;title format
(setq frame-title-format "emacs@%b")
;;find my mouse yank point
(setq mouse-yank-at-point t)
;;dont go to before ' " [ {
(show-paren-mode t)
(setq show-paren-style 'parentheses)
;;all end of line
(setq track-eol t)
;;no bell boring
(setq visible-bell t)
;;under console dont flash
(setq ring-bell-function (lambda () t))
;;high light
(global-font-lock-mode t)
;;no start info
(setq inhibit-startup-message t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Personal modifications
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun my-c++-mode-hook()
(setq tab-width 4 indent-tabs-mode nil)
(c-set-style "stroustrup")
(c-set-offset 'inline-open 0)
(c-set-offset 'innamespace 0)
(c-set-offset 'friend '-)
)
(add-hook 'c++-mode-hook 'my-c++-mode-hook)
(add-hook 'c-mode-hook 'my-c++-mode-hook)
(add-hook 'java-mode-hook 'my-c++-mode-hook)
;;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
(put 'upcase-region 'disabled nil)