测试环境: mandriva 2009.0 + emacs 22
参考:
1).~myrkr/dictionary/installation.html
2).
过程:
1).安装dictd: sudo urpmi dictd
2).下载emacs扩展包: ~myrkr/dictionary/dictionary-1.8.7.tar.gz
3).tar zxvf dictionary-1.8.7.tar.gz
4).make
5).将byte-complie后的.elc文件放在你集中放的emacs的lisp文件夹面面。
6).配置emcas,在~/.emacs中加入:
;=======dictd=========
(autoload 'dictionary-search "dictionary"
"Ask for a word and search it in all dictionaries" t)
(autoload 'dictionary-match-words "dictionary"
"Ask for a word and search all matching words in the dictionaries" t)
(autoload 'dictionary-lookup-definition "dictionary"
"Unconditionally lookup the word at point." t)
(autoload 'dictionary "dictionary"
"Create a new dictionary buffer" t)
(autoload 'dictionary-mouse-popup-matching-words "dictionary"
"Display entries matching the word at the cursor" t)
(autoload 'dictionary-popup-matching-words "dictionary"
"Display entries matching the word at the point" t)
(autoload 'dictionary-tooltip-mode "dictionary"
"Display tooltips for the current word" t)
(global-set-key (kbd "C-c s") 'dictionary-search)
(global-set-key (kbd "C-c m") 'dictionary-match-words)
(setq dictionary-tooltip-dictionary "wn")
(require 'dictionary)
(global-dictionary-tooltip-mode t)
(global-set-key (kbd "
") 'dictionary-mouse-popup-matching-words)
(global-set-key (kbd "C-c m") 'dictionary-popup-matching-words)
(add-hook 'text-mode-hook 'dictionary-tooltip-mode)
(add-hook 'text-mode-hook 'dictionary-tooltip-mode)
测试:
打开emacs,然后C-c s,输入某个单词,看能否查到。可能速度有点慢,因为要连服务器。不过,目前只能查英文,我还没试出来如何中英文查询。
阅读(1752) | 评论(0) | 转发(0) |