문제

In Aquamacs in flyspell-mode, when flyspell flags a word as misspelled, I can right-click to add the word to my dictionary if it is in fact correctly spelled.

In GNU Emacs on OSX, when flyspell-mode highlights a word it thinks is misspelled, how can I add the word to the dictionary? Looking at the documentation, I do not see a function like flyspell-learn-word or ispell-add-word-to-personal-dictionary.

도움이 되었습니까?

해결책

The function you are looking for is flyspell-correct-word-before-point. By default it is bound to the keys C-c$. Move your point to the incorrect word and execute the command. You will get a popup-menu with possible corrections and an option to save the word to you dictionary.

If you want a single command to save the current word, this is what I was able to extract from flyspell.el

(defun my-save-word ()
  (interactive)
  (let ((current-location (point))
         (word (flyspell-get-word)))
    (when (consp word)    
      (flyspell-do-correct 'save nil (car word) current-location (cadr word) (caddr word) current-location))))

다른 팁

You can probably use M-$ to open suggestions, then i to save to dictionary. You'd be prompted for confirmation.

Source

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top