wok-current diff emacs-pkg-text-translator/stuff/90-text-translator-init.el @ rev 13737
xscavenger, xdigger: add menu entry
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Dec 26 11:05:26 2012 +0100 (2012-12-26) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/emacs-pkg-text-translator/stuff/90-text-translator-init.el Wed Dec 26 11:05:26 2012 +0100 1.3 @@ -0,0 +1,30 @@ 1.4 +;; Register 1.5 + 1.6 +(require 'text-translator) 1.7 + 1.8 + 1.9 +;; set global key 1.10 + 1.11 +(global-set-key "\C-x\M-t" 'text-translator) 1.12 +(global-set-key "\C-x\M-T" 'text-translator-translate-last-string) 1.13 +;; translate all sites. 1.14 +;; for example, if you specify "enja", text-translator use google.com_enja, yahoo.com_enja, ... . 1.15 +(global-set-key "\C-x\M-a" 'text-translator-all) 1.16 + 1.17 + 1.18 +;; add keys to major-mode 1.19 + 1.20 +(add-hook 1.21 + 'text-translator-mode-hook 1.22 + (lambda() 1.23 + ;; if you do not change prefix-key, it is executed by C-c M-a 1.24 + (define-key text-translator-mode-pkey-map "\M-a" 'text-translator-translate-recent-type))) 1.25 + 1.26 + 1.27 +;; use proxy 1.28 + 1.29 +;; ;; if you are setting environment variables HTTP_PROXY, 1.30 +;; ;; you have not to set this. 1.31 +;; (setq text-translator-proxy-server "proxy.hogehoge.com") 1.32 +;; (setq text-translator-proxy-port 8080) 1.33 +