rcodetools.el の再度バグフィクス
やっぱり rct-complete-symbol が動かない - ひがきの日記
チェックが甘くてすみません。
(string-bytes (buffer-substring (point-at-bol) (point)))
の部分を
(string-bytes (encode-coding-string (buffer-substring (point-at-bol) (point)) buffer-file-coding-system))
に変えると EUC-JP 、 UTF-8 双方で動作しました。そちらではどうでしょうか?
補完候補の表示をよりよくしたいので、その後リリースする予定です。
検証用 Emacs Lisp
(defun foo () (let ((s (buffer-substring (point-at-bol) (point-at-eol)))) (list (length s) (string-width s) (string-bytes s) buffer-file-coding-system (string-bytes (encode-coding-string s buffer-file-coding-system))))) (with-current-buffer (find-file-noselect "hello.euc") (foo)) ;; => (5 10 15 japanese-iso-8bit 10) (with-current-buffer (find-file-noselect "hello.sjis") (foo)) ;; => (5 10 15 japanese-shift-jis 10) (with-current-buffer (find-file-noselect "hello.utf8") (foo)) ;; => (5 10 15 mule-utf-8 15)