浏览代码

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

正在加载...
取消
保存