瀏覽代碼

Experimental implement of translate-popup-at-point

pull/15/head
10sr 8 年之前
父節點
當前提交
13204f6a08
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. +9
    -0
      emacs.el

+ 9
- 0
emacs.el 查看文件

@@ -1858,4 +1858,13 @@ This mode is a simplified version of `adoc-mode'.")
(add-to-list 'auto-mode-alist
'("\\.adoc\\'" . adoc-simple-mode)))

(when (safe-require-or-eval 'google-translate)
(add-to-list 'google-translate-translation-directions-alist
'("en" . "ja"))
(defun translate-popup-at-point ()
"Translate popup at point."
(interactive)
(let ((google-translate-output-destination 'popup))
(google-translate-translate "en" "ja" (current-word t t)))))

;;; emacs.el ends here

Loading…
取消
儲存