emacs需要编辑utf8文件,配置好的sr-speedbar在windows下却无法显示中文文件名。
显示的内容都是些\342\123\类似的编码。
请教一下这问题怎么解决?字体已经修改为宋体了。
贴一下自己的配置文件:
(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.
'(column-number-mode t)
'(current-language-environment "UTF-8")
'(show-paren-mode t)
'(speedbar-default-position (quote left-right))
'(speedbar-tag-regroup-maximum-length 6)
'(speedbar-use-images nil)
'(transient-mark-mode 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.
)
(set-default-font "-outline-新宋体-normal-r-normal-normal-14-*-96-96-c-*-UTF-8")
;;---------- php
(add-to-list 'load-path (expand-file-name "D:/emacs/site-lisp"))
(require 'php-mode)
(setq x-select-enable-clipboard t) ;;支持emacs和外部程序的粘贴
;(transient-mark-mode t) ;;高亮选定区域
(show-paren-mode t) ;;括号匹配时显示另外一边的括号,而不跳到另一个括号
;;(semantic-load-enable-code-helpers)
;(set-file-name-coding-system 'gb2312)
(setq inhibit-startup-message t) ;;关闭启动画面
;(setq column-number-mode t) ;;显示列号
(require 'linum) ;行号显示模块
(global-linum-mode 1)
(setq file-name-coding-system 'utf-8) ;;读取或写入文件名的编码方式
(setq truncate-partial-width-windows nil) ;;窗口中内容自动换行
;(require 'unicad) ;;自动检测文件编码(打开文件变慢,尤其是用mpg123读入多个文件时)
(require 'sr-speedbar) ;; 嵌入式speedbar
(sr-speedbar-open)
(setq speedbar-show-unknown-files t);;显示所有文件名
(setq make-backup-file nil) ;;关闭自动备份
(require 'tabbar)
(tabbar-mode)
(global-set-key (kbd "C-`") 'tabbar-backward)
;(load-library "color-theme") ;;目录引用方法
;(color-theme-initialize) ;;6.6.0版theme需要初始化
;(color-theme-robin-hood);;6.6.0版需要
;(setq color-theme-is-global t)
;(setq color-theme-load-all-themes nil)
;(color-theme-select);;启动手动选择
;(color-theme-shaman) ;;Classic颜色方案 含空格的方案名用"-"分割
windows版 emacs22 ,sr-speedbar插件显示中文的问题
-
- 帖子: 5
- 注册时间: 2009-09-18 2:26
-
- 帖子: 5
- 注册时间: 2009-09-18 2:26
-
- 帖子: 353
- 注册时间: 2008-07-09 0:39
Re: windows版 emacs22 ,sr-speedbar插件显示中文的问题
请用Emacs23
7号机-----神舟 优雅A460P-i7G D2
CPU: i7-2670QM
RAM: 8G
HD:500G
OS:Fedora 17 x86_64
热衷话题:Package Management\Programming
CPU: i7-2670QM
RAM: 8G
HD:500G
OS:Fedora 17 x86_64
热衷话题:Package Management\Programming
-
- 帖子: 5
- 注册时间: 2009-09-18 2:26
Re: windows版 emacs22 ,sr-speedbar插件显示中文的问题
emacs23不支持php高亮呢。。。 有解决办法么?如果23能支持php高亮也可以。
-
- 帖子: 5
- 注册时间: 2009-09-18 2:26
Re: windows版 emacs22 ,sr-speedbar插件显示中文的问题

(autoload 'php-mode "php-mode" "Major mode for editing php code." t)
(add-to-list 'auto-mode-alist '("\\.php$" . php-mode))
(add-to-list 'auto-mode-alist '("\\.inc$" . php-mode))
结帖,结贴