wok-6.x view emacs-pkg-text-translator/stuff/90-text-translator-init.el @ rev 18308

jansson-dev: add deps
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Aug 25 12:02:03 2015 +0200 (2015-08-25)
parents
children
line source
1 ;; Register
3 (require 'text-translator)
6 ;; set global key
8 (global-set-key "\C-x\M-t" 'text-translator)
9 (global-set-key "\C-x\M-T" 'text-translator-translate-last-string)
10 ;; translate all sites.
11 ;; for example, if you specify "enja", text-translator use google.com_enja, yahoo.com_enja, ... .
12 (global-set-key "\C-x\M-a" 'text-translator-all)
15 ;; add keys to major-mode
17 (add-hook
18 'text-translator-mode-hook
19 (lambda()
20 ;; if you do not change prefix-key, it is executed by C-c M-a
21 (define-key text-translator-mode-pkey-map "\M-a" 'text-translator-translate-recent-type)))
24 ;; use proxy
26 ;; ;; if you are setting environment variables HTTP_PROXY,
27 ;; ;; you have not to set this.
28 ;; (setq text-translator-proxy-server "proxy.hogehoge.com")
29 ;; (setq text-translator-proxy-port 8080)