wok annotate emacs-pkg-text-translator/stuff/90-text-translator-init.el @ rev 19365

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