2008-09-05
■[emacs]Xrefactoryの日本語文字化け対応
C++のリファクタリングツール Xrefactory の弱点の一つは、日本語が文字化けすること。
中の人は、 「xref-novc-find-file() を↓のように直せば文字化けしないよ」と言っているが、これがとんだ嘘っぱち。
(defun xref-novc-find-file (file) (let ((buff)) (setq buff (get-file-buffer file)) (if (and buff (verify-visited-file-modtime buff)) (switch-to-buffer buff) ;; be conformant with find-file (if xref-run-find-file-hooks (progn (find-file file) ;; full standard find-file (setq buffer-file-coding-system (set-auto-coding file (- (point-max) (point)))) ) (setq buff (create-file-buffer file)) (switch-to-buffer buff) (insert-file-contents file t nil nil t) (after-find-file nil t t nil t) )) ))
下記の修正で解決。ただし、副作用の有無は未確認。
(defun xref-server-read-answer-file-and-dispatch (dispatch-data tmp-files) - (let ((res) (cb) (i) (coding-system-for-read 'raw-text)) + (let ((res) (cb) (i) )
トラックバック - http://d.hatena.ne.jp/grandVin/20080905/1220627028
リンク元
- 3 http://d.hatena.ne.jp/keyword/UAC
- 2 http://d.hatena.ne.jp/rubikitch/
- 2 http://d.hatena.ne.jp/rubikitch/20080901/1220216159
- 2 http://www.google.com/search?hl=ja&lr=lang_ja&ie=UTF-8&oe=UTF-8&q=cifs+linux&num=50
- 1 http://d.hatena.ne.jp/keyword/Emacs
- 1 http://d.hatena.ne.jp/keyword/Lisp
- 1 http://d.hatena.ne.jp/keyword/anything.el
- 1 http://d.hatena.ne.jp/rubikitch/searchdiary?word=*[anything]
- 1 http://d.hatena.ne.jp/rubikitch/searchdiary?word=*[emacs]
- 1 http://d.hatena.ne.jp/rubikitch/searchdiary?word=ri