Emacs进阶之使用Mepla插件库及有道翻译安装(六)

傅长恨
2023-12-01

 1.有道翻译安装

1.下载配置Melpa插件库
# emacs ~/.emacs添加
;;******************************************************************************
(require 'package)
;;(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages") t)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
                    (not (gnutls-available-p))))
       (proto (if no-ssl "http" "https")))
  ;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
  (add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
  ;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
  (when (< emacs-major-version 24)
    ;; For important compatibility libraries like cl-lib
    (add-to-list 'package-archives '("gnu" . (concat proto "://elpa.gnu.org/packages/")))))
;;******************************************************************************

M-x package-list-packages ;;可以尽情的去安装了插件了。

2.安装有道词典
M-x package-list-packages //找到有道安装
#emacs ~/.emacs
;; Enable Cache
(setq url-automatic-caching t)
(global-set-key (kbd "C-q") 'youdao-dictionary-search-at-point+)

 类似资料: