2017-02-10 89 views
2

Windows 7中,Emacs 25.1Emacs。拼寫檢查「飛」2種語言

我需要爲我的自定義文本「飛行」拼寫檢查(例如,以強調不正確的單詞)。但我寫兩種語言的文字:英文和俄文。我希望在兩種語言的拼寫檢查之間輕鬆切換。

什麼是最好的emacs包?謝謝。

+0

參見[這個問題](HTTP工作: //stackoverflow.com/q/16881903/113848)。 – legoscia

回答

2

你要這個:guess_language.el

(use-package guess-language   ; Automatically detect language for Flyspell 
    :ensure t 
    :defer t 
    :init (add-hook 'text-mode-hook #'guess-language-mode) 
    :config 
    (setq guess-language-langcodes '((en . ("en_GB" "English")) 
            (it . ("it_IT" "Italian"))) 
     guess-language-languages '(en it) 
     guess-language-min-paragraph-length 45) 
    :diminish guess-language-mode) 

此外,如果只通過他們想循環:

(defvar mu-languages-ring nil "Languages ring for Ispell") 

(let ((languages '("en_GB" "it_IT"))) 
    (validate-setq mu-languages-ring (make-ring (length languages))) 
    (dolist (elem languages) (ring-insert mu-languages-ring elem))) 

(defun mu-cycle-ispell-languages() 
    (interactive) 
    (let ((language (ring-ref mu-languages-ring -1))) 
    (ring-insert mu-languages-ring language) 
    (ispell-change-dictionary language))) 

這些應該與FlySpell