|
楼主 |
发表于 2005-1-24 23:30:34
|
显示全部楼层
Emacs 的配置
我全部的 Emacs 设置都在这里了。我检查了好几遍,呵呵~~
希望朋友们能帮我找出问题来。多谢!
.Xdefaults
=========================================================
XTerm*VT100*translations: #override Ctrl <Key>space: string(0x00)
Emacs: #override Ctrl <Key>space: string(0x00)
Emacs.Font: fontset-song
Emacs.FontsetList: song kai hei lucida
Emacs.Fontset-0:-adobe-courier-medium-r-*-*-14-*-*-*-*-*-fontset-song,\
chinese-gb2312:-*-simsun-medium-r-*--16-*-*-*-*-*-gbk-0,\
mule-unicode-0100-24ff:-misc-fixed-medium-r-normal--16-*-*-*-*-*-iso10646-1,\
korean-ksc5601:-*-medium-r-normal-*-16-*-ksc5601*-*,
chinese-cns11643-5:-*-simsun-medium-r-*--16-*-*-*-*-*-gbk-0,\
chinese-cns11643-6:-*-simsun-medium-r-*--16-*-*-*-*-*-gbk-0,\
chinese-cns11643-7:-*-simsun-medium-r-*--16-*-*-*-*-*-gbk-0
Emacs.Fontset-1:-adobe-courier-medium-r-*-*-14-*-*-*-*-*-fontset-kai,\
chinese-gb2312:-*-simkai-medium-r-*--16-*-*-*-*-*-gbk-0,\
mule-unicode-0100-24ff:-misc-fixed-medium-r-normal--16-*-*-*-*-*-iso10646-1
Emacs.Fontset-2:-adobe-courier-medium-r-*-*-14-*-*-*-*-*-fontset-hei,\
chinese-gb2312:-*-simhei-medium-r-*--16-*-*-*-*-*-gbk-0,\
mule-unicode-0100-24ff:-misc-fixed-medium-r-normal--16-*-*-*-*-*-iso10646-1
Emacs.Fontset-3:-adobe-courier-medium-r-*-*-14-*-*-*-*-*-fontset-lucida,\
ascii:-b&h-lucidatypewriter-medium-r-*-*-12-*-*-*-*-*-iso8859-1,\
chinese-gb2312:-*-simsun-medium-r-*--16-*-*-*-*-*-gbk-0,\
mule-unicode-0100-24ff:-misc-fixed-medium-r-normal--16-*-*-*-*-*-iso10646-1
================================================================
.emacs
===============================
...
(load-file "~/.emacs.d/init-Exaos.el") ;; Load my initializations
init-Exaos.el
=============================================
;; Add personal load-path
(add-to-list 'load-path "~/.emacs.d/lisp")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Load my configurations
( load "safe-load" nil t)
;(safe-load "MacOSX-env" nil t) ;; Load specific settings for Carbon Emacs
(safe-load "custom-exaos" nil t) ;; My custom settings
(safe-load "chinese-env" nil t) ;; Load Chinese environment
;(safe-load "ucs-env" nil t) ;; Load UCS environment
;; scripts above don't work
(safe-load "load-packages" nil t) ;; Load my packages
chinese-env.el
==========================================
;;
;; Load these only for Emacs 21.3.50-pre20041027
(load "/usr/share/emacs/21.3.50/lisp/international/subst-ksc.el")
(load "/usr/share/emacs/21.3.50/lisp/international/subst-jis.el")
(load "/usr/share/emacs/21.3.50/lisp/international/subst-gb2312.el")
;;(load "/usr/share/emacs/21.3.50/lisp/international/subst-big5.el")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 默认环境变量的设置 -- Default settings
;; let Emacs recognize Chinese sentence ends
(setq sentence-end "\\([。!?]\\|……\\|[.?!][]\"')}]*\\($\\|[ \t]\\)\\)[ \t\n]*")
(setq sentence-end-double-space nil)
(set-language-environment 'Chinese-GB)
;(set-keyboard-coding-system 'euc-cn)
(set-keyboard-coding-system 'chinese-iso-8bit)
;(set-clipboard-coding-system 'euc-cn)
(set-clipboard-coding-system 'chinese-iso-8bit)
;(set-terminal-coding-system 'euc-cn)
(set-terminal-coding-system 'chinese-iso-8bit)
;(set-buffer-file-coding-system 'euc-cn)
(set-buffer-file-coding-system 'chinese-iso-8bit)
;(set-selection-coding-system 'euc-cn)
(set-selection-coding-system 'chinese-iso-8bit)
;(modify-coding-system-alist 'process "*" 'euc-cn)
(modify-coding-system-alist 'process "*" 'chinese-iso-8bit)
(setq default-process-coding-system
'(chinese-iso-8bit . chinese-iso-8bit))
; '(euc-cn . euc-cn))
;(setq-default pathname-coding-system 'euc-cn)
(setq-default pathname-coding-system 'chinese-iso-8bit)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; 中文字体显示
;; Alist of fontname patterns vs corresponding encoding info.
;; Each element looks like (REGEXP . ENCODING-INFO),
;; where ENCODING-INFO is an alist of CHARSET vs ENCODING.
;; ENCODING is one of the following integer values:
;; 0: code points 0x20..0x7F or 0x2020..0x7F7F are used,
;; 1: code points 0xA0..0xFF or 0xA0A0..0xFFFF are used,
;; 2: code points 0x20A0..0x7FFF are used,
;; 3: code points 0xA020..0xFF7F are used.
(setq font-encoding-alist
(append '(("MuleTibetan-0" (tibetan . 0))
("GB2312" (chinese-gb2312 . 0))
("BIG5" (chinese-big5 . 0))
("JISX0208" (japanese-jisx0208 . 0))
("JISX0212" (japanese-jisx0212 . 0))
("VISCII" (vietnamese-viscii-lower . 0))
("KSC5601" (korean-ksc5601 . 0))
("MuleArabic-0" (arabic-digit . 0))
("MuleArabic-1" (arabic-1-column . 0))
("MuleArabic-2" (arabic-2-column . 0))
("UTF8" (utf-8 . 0))
("unicode" (unicode . 0))
) font-encoding-alist))
;;
;; 针对 Win32 平台,使用了 intlfonts (假设安装在 C:/emacs/fonts 下)
;;
(when (string-match "w32" (prin1-to-string window-system))
(setq fonts-dir "C:/emacs/fonts/intlfonts")
(setq bdf-directory-list
(list
(expand-file-name "Asian" fonts-dir)
(expand-file-name "Chinese" fonts-dir)
(expand-file-name "Chinese.BIG" fonts-dir)
(expand-file-name "Chinese.X" fonts-dir)
(expand-file-name "Ethiopic" fonts-dir)
(expand-file-name "European" fonts-dir)
(expand-file-name "European.BIG" fonts-dir)
(expand-file-name "Japanese" fonts-dir)
(expand-file-name "Japanese.BIG" fonts-dir)
(expand-file-name "Japanese.X" fonts-dir)
(expand-file-name "Korean.X" fonts-dir)
(expand-file-name "Misc" fonts-dir)
(expand-file-name "TrueType" fonts-dir)
(expand-file-name "Type1" fonts-dir)))
(setq w32-bdf-filename-alist
(w32-find-bdf-fonts bdf-directory-list))
(create-fontset-from-fontset-spec
"-*-fixed-medium-r-normal-*-16-*-*-*-c-*-fontset-bdf,
chinese-gb2312:-*-*-medium-r-normal-*-16-*-*-*-*-*-gb2312.1980-*,
japanese-jisx0208:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0208.1983-*,
katakana-jisx0201:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0201*-*,
latin-jisx0201:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0201*-*,
japanese-jisx0208-1978:-*-*-medium-r-normal-*-16-*-*-*-c-*-jisx0208.1978-*,
thai-tis620:-misc-fixed-medium-r-normal--16-160-72-72-m-80-tis620.2529-1,
lao:-misc-fixed-medium-r-normal--16-160-72-72-m-80-MuleLao-1,
tibetan-1-column:-TibMdXA-fixed-medium-r-normal--16-160-72-72-m-80-MuleTibetan-1,
ethiopic:-Admas-Ethiomx16f-Medium-R-Normal--16-150-100-100-M-160-Ethiopic-Unicode,
tibetan:-TibMdXA-fixed-medium-r-normal--16-160-72-72-m-160-MuleTibetan-0")
(set-default-font "fontset-bdf")
;; Emacs 21.3 中可以这样设置
;; (set-language-environment 'Chinese-GB)
;; (set-default-font "-outline-新宋体-normal-r-normal-normal-12-*-96-96-c-*-gb2312")
)
;;
;; for X windows with FreeType2 and simsun
;;
(when (string-match "x" (prin1-to-string window-system))
(create-fontset-from-fontset-spec
"-*-fixed-medium-r-*-*-14-*-*-*-c-*-fontset-chinese,
chinese-gb2312:-*-simsun-medium-r-*-*-14-*-*-*-c-*-gb2312.1980-*,
chinese-big5-1:-*-mingliu-medium-r-*-*-14-*-*-*-c-*-big5-0,
chinese-big5-2:-*-mingliu-medium-r-*-*-14-*-*-*-c-*-big5-0,
utf-8:-efont-*-medium-r-*-*-14-*-*-*-p-*-iso10646-1,
unicode:-efont-*-medium-r-*-*-14-*-*-*-p-*-iso10646-1")
(set-default-font "fontset-chinese")
) |
|